From 38bca2f01a9bf8663f56b45b2cec2e9cf00ffa85 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 18 Jul 2011 11:44:02 +0200 Subject: style cleanup --- src/urlbar/sslwidget.cpp | 72 ++++++++++++++++++++++++------------------------ src/urlbar/sslwidget.h | 2 +- src/urlbar/urlbar.cpp | 8 +++--- 3 files changed, 41 insertions(+), 41 deletions(-) (limited to 'src/urlbar') diff --git a/src/urlbar/sslwidget.cpp b/src/urlbar/sslwidget.cpp index b1819700..fd0b97b8 100644 --- a/src/urlbar/sslwidget.cpp +++ b/src/urlbar/sslwidget.cpp @@ -49,7 +49,7 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent) setMinimumWidth(400); QSslCertificate cert = info.certificateChain().first(); - + QGridLayout *layout = new QGridLayout(this); QLabel *label; @@ -62,27 +62,27 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent) label = new QLabel(this); label->setWordWrap(true); - label->setText( i18n("

Identity

") ); + label->setText(i18n("

Identity

")); layout->addWidget(label, rows++, 1); - - if (cert.isNull()) + + if(cert.isNull()) { label = new QLabel(this); label->setWordWrap(true); - label->setText( i18n("Warning: this site is carrying a NULL certificate!") ); - + label->setText(i18n("Warning: this site is carrying a NULL certificate!")); + imageLabel->setPixmap(KIcon("security-low").pixmap(32)); } else { - if (cert.isValid()) + if(cert.isValid()) { label = new QLabel(this); label->setWordWrap(true); - label->setText( i18n("This certificate for this site is valid and has been verified by:\n%1.", - cert.issuerInfo(QSslCertificate::CommonName)) ); - - + label->setText(i18n("This certificate for this site is valid and has been verified by:\n%1.", + cert.issuerInfo(QSslCertificate::CommonName))); + + imageLabel->setPixmap(KIcon("security-high").pixmap(32)); } else @@ -91,24 +91,24 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent) label->setWordWrap(true); QList errorList = SslInfoDialog::errorsFromString(m_info.certificateErrors()); - if (errorList.at(0).isEmpty()) + if(errorList.at(0).isEmpty()) { - label->setText( i18n("The certificate for this site is valid, but some on the certificate chain are not!") ); + label->setText(i18n("The certificate for this site is valid, but some on the certificate chain are not!")); imageLabel->setPixmap(KIcon("security-medium").pixmap(32)); } else { QStringList sl = errorList.at(0); QString c = QL1S(""); - label->setText( i18n("The certificate for this site is NOT valid, for the following reasons:\n%1", c) ); + label->setText(i18n("The certificate for this site is NOT valid, for the following reasons:\n%1", c)); label->setTextFormat(Qt::RichText); - imageLabel->setPixmap(KIcon("security-low").pixmap(32)); + imageLabel->setPixmap(KIcon("security-low").pixmap(32)); } } } @@ -120,32 +120,32 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent) label->setText("Certificate Information"); connect(label, SIGNAL(linkActivated(const QString &)), this, SLOT(showMoreSslInfos(const QString &))); layout->addWidget(label, rows++, 1); - + // ------------------------------------------------------------------------------------------------------------------ label = new QLabel(this); label->setWordWrap(true); - label->setText( QL1S("

Encryption

") ); // ----------------------------------------------- // + label->setText(QL1S("

Encryption

")); // ----------------------------------------------- // layout->addWidget(label, rows, 1); imageLabel = new QLabel(this); layout->addWidget(imageLabel, rows++ , 0, Qt::AlignCenter); - if (cert.isNull()) + if(cert.isNull()) { label = new QLabel(this); label->setWordWrap(true); - label->setText( i18n("Your connection to %1 is NOT encrypted!!\n\n", m_url.host()) ); + label->setText(i18n("Your connection to %1 is NOT encrypted!!\n\n", m_url.host())); layout->addWidget(label, rows++ , 1); - + imageLabel->setPixmap(KIcon("security-low").pixmap(32)); } else { label = new QLabel(this); label->setWordWrap(true); - label->setText( i18n("Your connection to %1 is encrypted with %2-bit encryption.\n\n", m_url.host(), m_info.supportedChiperBits()) ); + label->setText(i18n("Your connection to %1 is encrypted with %2-bit encryption.\n\n", m_url.host(), m_info.supportedChiperBits())); layout->addWidget(label, rows++, 1); - + int vers = cert.version().toInt(); QString sslVersion; switch(vers) @@ -170,29 +170,29 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent) label = new QLabel(this); label->setWordWrap(true); - label->setText( i18n("The connection uses %1.\n\n", sslVersion) ); + label->setText(i18n("The connection uses %1.\n\n", sslVersion)); layout->addWidget(label, rows++, 1); - + const QStringList cipherInfo = m_info.ciphers().split('\n', QString::SkipEmptyParts); label = new QLabel(this); label->setWordWrap(true); - label->setText( + label->setText( i18n("The connection is encrypted using %1 at %2 bits with %3 for message authentication and %4 as the key exchange mechanism.\n\n", - cipherInfo[0], - m_info.usedChiperBits(), - cipherInfo[3], - cipherInfo[1]) ); + cipherInfo[0], + m_info.usedChiperBits(), + cipherInfo[3], + cipherInfo[1])); layout->addWidget(label, rows++, 1); - + } - + // ------------------------------------------------------------------------------------------------------------------ imageLabel = new QLabel(this); layout->addWidget(imageLabel, rows , 0, Qt::AlignCenter); label = new QLabel(this); label->setWordWrap(true); - label->setText( i18n("

Site Information

") ); + label->setText(i18n("

Site Information

")); layout->addWidget(label, rows++, 1); label = new QLabel(this); @@ -200,14 +200,14 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent) HistoryItem firstVisit = rApp->historyManager()->find(url.toString()).first(); - if (firstVisit.visitCount == 1) + if(firstVisit.visitCount == 1) { - label->setText( i18n("It's your first time visiting this site!") ); + label->setText(i18n("It's your first time visiting this site!")); imageLabel->setPixmap(KIcon("security-medium").pixmap(32)); } else { - label->setText( i18n("You just visited this site!\nYour first visit was on %1.\n", firstVisit.firstDateTimeVisit.toString()) ); + label->setText(i18n("You just visited this site!\nYour first visit was on %1.\n", firstVisit.firstDateTimeVisit.toString())); imageLabel->setPixmap(KIcon("security-high").pixmap(32)); } layout->addWidget(label, rows++, 1); diff --git a/src/urlbar/sslwidget.h b/src/urlbar/sslwidget.h index 00478f59..94f0494a 100644 --- a/src/urlbar/sslwidget.h +++ b/src/urlbar/sslwidget.h @@ -48,7 +48,7 @@ public: private Q_SLOTS: void showMoreSslInfos(const QString &); void accept(); - + private: QUrl m_url; WebSslInfo m_info; diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index 8b3dac65..ea60f474 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -183,8 +183,8 @@ void UrlBar::paintEvent(QPaintEvent *event) if(_tab->url().scheme() == QL1S("https")) { backgroundColor = _tab->page()->hasSslValid() - ? colorScheme.background(KColorScheme::PositiveBackground).color() - : colorScheme.background(KColorScheme::NegativeBackground).color(); + ? colorScheme.background(KColorScheme::PositiveBackground).color() + : colorScheme.background(KColorScheme::NegativeBackground).color(); foregroundColor = colorScheme.foreground(KColorScheme::NormalText).color(); } @@ -466,8 +466,8 @@ IconButton *UrlBar::addRightIcon(UrlBar::icon ic) break; case UrlBar::SSL: _tab->page()->hasSslValid() - ? rightIcon->setIcon(KIcon("object-locked")) - : rightIcon->setIcon(KIcon("object-unlocked")); + ? rightIcon->setIcon(KIcon("object-locked")) + : rightIcon->setIcon(KIcon("object-unlocked")); rightIcon->setToolTip(i18n("Show SSL Info")); break; case UrlBar::BK: -- cgit v1.2.1