From 82167d2422a4b6e3071dca68cf65a66e1da41ab4 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 17 Jul 2011 16:46:24 +0200 Subject: A round of the "new" astyle 2.01... --- src/websslinfo.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/websslinfo.cpp') diff --git a/src/websslinfo.cpp b/src/websslinfo.cpp index e77e24e8..720c2209 100644 --- a/src/websslinfo.cpp +++ b/src/websslinfo.cpp @@ -30,7 +30,7 @@ class WebSslInfo::WebSslInfoPrivate { public: WebSslInfoPrivate() - : usedCipherBits(0), supportedCipherBits(0) {} + : usedCipherBits(0), supportedCipherBits(0) {} QUrl url; QString ciphers; @@ -45,12 +45,12 @@ public: }; WebSslInfo::WebSslInfo() - : d(new WebSslInfo::WebSslInfoPrivate) + : d(new WebSslInfo::WebSslInfoPrivate) { } WebSslInfo::WebSslInfo(const WebSslInfo& other) - : d(new WebSslInfo::WebSslInfoPrivate) + : d(new WebSslInfo::WebSslInfoPrivate) { *this = other; } @@ -113,7 +113,7 @@ QList WebSslInfo::certificateChain() const WebSslInfo& WebSslInfo::operator=(const WebSslInfo & other) { - if (d) + if(d) { d->ciphers = other.d->ciphers; d->protocol = other.d->protocol; @@ -133,7 +133,7 @@ WebSslInfo& WebSslInfo::operator=(const WebSslInfo & other) bool WebSslInfo::saveTo(QMap& data) const { const bool ok = isValid(); - if (ok) + if(ok) { data.insert("ssl_in_use", true); data.insert("ssl_peer_ip", d->peerAddress.toString()); @@ -154,10 +154,10 @@ bool WebSslInfo::saveTo(QMap& data) const void WebSslInfo::restoreFrom(const QVariant& value, const QUrl& url) { - if (value.isValid() && value.type() == QVariant::Map) + if(value.isValid() && value.type() == QVariant::Map) { QMap metaData = value.toMap(); - if (metaData.value("ssl_in_use", false).toBool()) + if(metaData.value("ssl_in_use", false).toBool()) { setCertificateChain(metaData.value("ssl_peer_chain").toByteArray()); setPeerAddress(metaData.value("ssl_peer_ip").toString()); @@ -174,54 +174,54 @@ void WebSslInfo::restoreFrom(const QVariant& value, const QUrl& url) void WebSslInfo::setUrl(const QUrl &url) { - if (d) + if(d) d->url = url; } void WebSslInfo::setPeerAddress(const QString& address) { - if (d) + if(d) d->peerAddress = address; } void WebSslInfo::setParentAddress(const QString& address) { - if (d) + if(d) d->parentAddress = address; } void WebSslInfo::setProtocol(const QString& protocol) { - if (d) + if(d) d->protocol = protocol; } void WebSslInfo::setCertificateChain(const QByteArray& chain) { - if (d) + if(d) d->certificateChain = QSslCertificate::fromData(chain); } void WebSslInfo::setCiphers(const QString& ciphers) { - if (d) + if(d) d->ciphers = ciphers; } void WebSslInfo::setUsedCipherBits(const QString& bits) { - if (d) + if(d) d->usedCipherBits = bits.toInt(); } void WebSslInfo::setSupportedCipherBits(const QString& bits) { - if (d) + if(d) d->supportedCipherBits = bits.toInt(); } void WebSslInfo::setCertificateErrors(const QString& certErrors) { - if (d) + if(d) d->certErrors = certErrors; } -- cgit v1.2.1