Reformatting: Reformat some lines that would become really long
authorChristian Kamm <mail@ckamm.de>
Wed, 17 May 2017 08:54:57 +0000 (10:54 +0200)
committerckamm <mail@ckamm.de>
Wed, 17 May 2017 10:26:27 +0000 (12:26 +0200)
src/gui/accountsettings.cpp
src/gui/creds/httpcredentialsgui.cpp
src/gui/folder.cpp
src/gui/socketapi.cpp
src/gui/sslbutton.cpp
src/libsync/propagateremotedelete.cpp
src/libsync/propagateremotemkdir.cpp
src/libsync/propagateremotemove.cpp
src/libsync/propagatorjobs.cpp

index 975ddf3e456008dc7148c149087fe9cc52f1cd44..b12d245f7948d7b7c7ceaf2b716c19ba8dcea26b 100644 (file)
@@ -716,10 +716,11 @@ void AccountSettings::refreshSelectiveSyncStatus()
         ui->bigFolderUi->setVisible(false);
     } else {
         ConfigFile cfg;
-        QString info =
-            !cfg.confirmExternalStorage() ? tr("There are folders that were not synchronized because they are too big: ") :
-            !cfg.newBigFolderSizeLimit().first ? tr("There are folders that were not synchronized because they are external storages: ") :
-            tr("There are folders that were not synchronized because they are too big or external storages: ");
+        QString info = !cfg.confirmExternalStorage()
+                ? tr("There are folders that were not synchronized because they are too big: ")
+                : !cfg.newBigFolderSizeLimit().first
+                  ? tr("There are folders that were not synchronized because they are external storages: ")
+                  : tr("There are folders that were not synchronized because they are too big or external storages: ");
 
         ui->selectiveSyncNotification->setText(info + msg);
         ui->selectiveSyncButtons->setVisible(false);
index dbfce816943cf24a12fa544b705d155b45b1efe4..d157f4c57cbfec1af269533dec1ec847d0e9b429 100644 (file)
@@ -45,8 +45,9 @@ void HttpCredentialsGui::askFromUserAsync()
         msg += QLatin1String("<br>") + reqTxt + QLatin1String("<br>");
     }
     if (!_fetchErrorString.isEmpty()) {
-        msg += QLatin1String("<br>") + tr("Reading from keychain failed with error: '%1'").arg(
-                    Utility::escape(_fetchErrorString)) + QLatin1String("<br>");
+        msg += QLatin1String("<br>")
+                + tr("Reading from keychain failed with error: '%1'")
+                .arg(Utility::escape(_fetchErrorString)) + QLatin1String("<br>");
     }
 
     QInputDialog dialog;
index 8230d6b2fedc27748ca41cef7c093094da3663fc..f9ef2caeb9e3da29e0a201ba85442805d395f0f1 100644 (file)
@@ -338,7 +338,8 @@ void Folder::showSyncResultPopup()
         if(renTarget != renSource) {
             status = LogStatusMove;
         }
-        createGuiLog( _syncResult.firstItemRenamed()->_originalFile, status, _syncResult.numRenamedItems(), _syncResult.firstItemRenamed()->_renameTarget );
+        createGuiLog( _syncResult.firstItemRenamed()->_originalFile, status,
+                      _syncResult.numRenamedItems(), _syncResult.firstItemRenamed()->_renameTarget );
     }
 
     if( _syncResult.firstConflictItem() ) {
index b79467baa379be02c00b18410bdf4fe241beba8b..a4973aeb84a0e6a74e6804cf3ee195113872d7fa 100644 (file)
@@ -314,12 +314,12 @@ void SocketApi::slotUpdateFolderView(Folder *f)
 
     if (f) {
         // do only send UPDATE_VIEW for a couple of status
-        if( f->syncResult().status() == SyncResult::SyncPrepare ||
-                f->syncResult().status() == SyncResult::Success ||
-                f->syncResult().status() == SyncResult::Paused  ||
-                f->syncResult().status() == SyncResult::Problem ||
-                f->syncResult().status() == SyncResult::Error   ||
-                f->syncResult().status() == SyncResult::SetupError ) {
+        if( f->syncResult().status() == SyncResult::SyncPrepare
+                || f->syncResult().status() == SyncResult::Success
+                || f->syncResult().status() == SyncResult::Paused
+                || f->syncResult().status() == SyncResult::Problem
+                || f->syncResult().status() == SyncResult::Error
+                || f->syncResult().status() == SyncResult::SetupError ) {
 
             QString rootPath = removeTrailingSlash(f->path());
             broadcastStatusPushMessage(rootPath, f->syncEngine().syncFileStatusTracker().fileStatus(""));
index a36747e7c2047c4317638b46155e701b2ec692af..8a6a4d50365cef5d97d369f05e8528a2fb653715 100644 (file)
@@ -69,8 +69,8 @@ static QString addCertDetailsField(const QString &key, const QString &value)
 // necessary indication only, not sufficient for primary validation!
 static bool isSelfSigned(const QSslCertificate &certificate)
 {
-    return certificate.issuerInfo(QSslCertificate::CommonName) == certificate.subjectInfo(QSslCertificate::CommonName) &&
-           certificate.issuerInfo(QSslCertificate::OrganizationalUnitName) == certificate.subjectInfo(QSslCertificate::OrganizationalUnitName);
+    return certificate.issuerInfo(QSslCertificate::CommonName) == certificate.subjectInfo(QSslCertificate::CommonName)
+           && certificate.issuerInfo(QSslCertificate::OrganizationalUnitName) == certificate.subjectInfo(QSslCertificate::OrganizationalUnitName);
 }
 
 QMenu* SslButton::buildCertMenu(QMenu *parent, const QSslCertificate& cert,
@@ -90,9 +90,9 @@ QMenu* SslButton::buildCertMenu(QMenu *parent, const QSslCertificate& cert,
 #else
     QByteArray sha265hash = cert.digest(QCryptographicHash::Sha256).toHex();
     QString sha256escaped =
-            Utility::escape(Utility::formatFingerprint(sha265hash.left(sha265hash.length()/2), false)) +
-            QLatin1String("<br/>") +
-            Utility::escape(Utility::formatFingerprint(sha265hash.mid(sha265hash.length()/2), false));
+            Utility::escape(Utility::formatFingerprint(sha265hash.left(sha265hash.length()/2), false))
+            + QLatin1String("<br/>")
+            Utility::escape(Utility::formatFingerprint(sha265hash.mid(sha265hash.length()/2), false));
 #endif
     QString serial = QString::fromUtf8(cert.serialNumber());
     QString effectiveDate = cert.effectiveDate().date().toString();
@@ -245,8 +245,8 @@ void SslButton::slotUpdateMenu() {
 
         // find trust anchor (informational only, verification is done by QSslSocket!)
         foreach(QSslCertificate rootCA, QSslSocket::systemCaCertificates()) {
-            if (rootCA.issuerInfo(QSslCertificate::CommonName) == chain.last().issuerInfo(QSslCertificate::CommonName) &&
-                    rootCA.issuerInfo(QSslCertificate::Organization) == chain.last().issuerInfo(QSslCertificate::Organization)) {
+            if (rootCA.issuerInfo(QSslCertificate::CommonName) == chain.last().issuerInfo(QSslCertificate::CommonName)
+                    && rootCA.issuerInfo(QSslCertificate::Organization) == chain.last().issuerInfo(QSslCertificate::Organization)) {
                 chain.append(rootCA);
                 break;
             }
index bc61e1c8d0ce78439000a71a60e4ad8e27ca56b0..d0771e8d6b2842e74d9c4d1b4075a6b468033b76 100644 (file)
@@ -111,8 +111,10 @@ void PropagateRemoteDelete::slotDeleteJobFinished()
         // Normally we expect "204 No Content"
         // If it is not the case, it might be because of a proxy or gateway intercepting the request, so we must
         // throw an error.
-        done(SyncFileItem::NormalError, tr("Wrong HTTP code returned by server. Expected 204, but received \"%1 %2\".")
-            .arg(_item->_httpErrorCode).arg(_job->reply()->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toString()));
+        done(SyncFileItem::NormalError,
+             tr("Wrong HTTP code returned by server. Expected 204, but received \"%1 %2\".")
+            .arg(_item->_httpErrorCode)
+             .arg(_job->reply()->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toString()));
         return;
     }
 
index 641f33124ceeaf6579f02124f20845059bf1232b..7007eda066bca8dadcd19dc0d1f55d962ca2ea26 100644 (file)
@@ -91,8 +91,10 @@ void PropagateRemoteMkdir::slotMkcolJobFinished()
         // Normally we expect "201 Created"
         // If it is not the case, it might be because of a proxy or gateway intercepting the request, so we must
         // throw an error.
-        done(SyncFileItem::NormalError, tr("Wrong HTTP code returned by server. Expected 201, but received \"%1 %2\".")
-            .arg(_item->_httpErrorCode).arg(_job->reply()->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toString()));
+        done(SyncFileItem::NormalError,
+             tr("Wrong HTTP code returned by server. Expected 201, but received \"%1 %2\".")
+            .arg(_item->_httpErrorCode)
+             .arg(_job->reply()->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toString()));
         return;
     }
 
index de7952de7b52f4a78b47fb439afbd3dfe2017693..373f298b2c6c304509a592d6369ecf195be8b599 100644 (file)
@@ -147,8 +147,10 @@ void PropagateRemoteMove::slotMoveJobFinished()
         // Normally we expect "201 Created"
         // If it is not the case, it might be because of a proxy or gateway intercepting the request, so we must
         // throw an error.
-        done(SyncFileItem::NormalError, tr("Wrong HTTP code returned by server. Expected 201, but received \"%1 %2\".")
-            .arg(_item->_httpErrorCode).arg(_job->reply()->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toString()));
+        done(SyncFileItem::NormalError,
+             tr("Wrong HTTP code returned by server. Expected 201, but received \"%1 %2\".")
+            .arg(_item->_httpErrorCode)
+             .arg(_job->reply()->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toString()));
         return;
     }
 
index c2e08d5a3ee25275dfa2bc63d07dc9611703813a..7c8c5a31a14189e6f588feef26762f84c5d7fe3e 100644 (file)
@@ -215,8 +215,10 @@ void PropagateLocalRename::start()
 
             // Fixme: the file that is the reason for the clash could be named here,
             // it would have to come out the localFileNameClash function
-            done(SyncFileItem::NormalError, tr( "File %1 can not be renamed to %2 because of a local file name clash")
-                 .arg(QDir::toNativeSeparators(_item->_file)).arg(QDir::toNativeSeparators(_item->_renameTarget)) );
+            done(SyncFileItem::NormalError,
+                 tr( "File %1 can not be renamed to %2 because of a local file name clash")
+                 .arg(QDir::toNativeSeparators(_item->_file))
+                 .arg(QDir::toNativeSeparators(_item->_renameTarget)) );
             return;
         }