From ae263d60bd6d1bc0eb0c3712bab11de120b8cdd3 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Wed, 17 May 2017 10:54:57 +0200 Subject: [PATCH] Reformatting: Reformat some lines that would become really long --- src/gui/accountsettings.cpp | 9 +++++---- src/gui/creds/httpcredentialsgui.cpp | 5 +++-- src/gui/folder.cpp | 3 ++- src/gui/socketapi.cpp | 12 ++++++------ src/gui/sslbutton.cpp | 14 +++++++------- src/libsync/propagateremotedelete.cpp | 6 ++++-- src/libsync/propagateremotemkdir.cpp | 6 ++++-- src/libsync/propagateremotemove.cpp | 6 ++++-- src/libsync/propagatorjobs.cpp | 6 ++++-- 9 files changed, 39 insertions(+), 28 deletions(-) diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index 975ddf3e4..b12d245f7 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -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); diff --git a/src/gui/creds/httpcredentialsgui.cpp b/src/gui/creds/httpcredentialsgui.cpp index dbfce8169..d157f4c57 100644 --- a/src/gui/creds/httpcredentialsgui.cpp +++ b/src/gui/creds/httpcredentialsgui.cpp @@ -45,8 +45,9 @@ void HttpCredentialsGui::askFromUserAsync() msg += QLatin1String("
") + reqTxt + QLatin1String("
"); } if (!_fetchErrorString.isEmpty()) { - msg += QLatin1String("
") + tr("Reading from keychain failed with error: '%1'").arg( - Utility::escape(_fetchErrorString)) + QLatin1String("
"); + msg += QLatin1String("
") + + tr("Reading from keychain failed with error: '%1'") + .arg(Utility::escape(_fetchErrorString)) + QLatin1String("
"); } QInputDialog dialog; diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 8230d6b2f..f9ef2caeb 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -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() ) { diff --git a/src/gui/socketapi.cpp b/src/gui/socketapi.cpp index b79467baa..a4973aeb8 100644 --- a/src/gui/socketapi.cpp +++ b/src/gui/socketapi.cpp @@ -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("")); diff --git a/src/gui/sslbutton.cpp b/src/gui/sslbutton.cpp index a36747e7c..8a6a4d503 100644 --- a/src/gui/sslbutton.cpp +++ b/src/gui/sslbutton.cpp @@ -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("
") + - Utility::escape(Utility::formatFingerprint(sha265hash.mid(sha265hash.length()/2), false)); + Utility::escape(Utility::formatFingerprint(sha265hash.left(sha265hash.length()/2), false)) + + QLatin1String("
") + + 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; } diff --git a/src/libsync/propagateremotedelete.cpp b/src/libsync/propagateremotedelete.cpp index bc61e1c8d..d0771e8d6 100644 --- a/src/libsync/propagateremotedelete.cpp +++ b/src/libsync/propagateremotedelete.cpp @@ -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; } diff --git a/src/libsync/propagateremotemkdir.cpp b/src/libsync/propagateremotemkdir.cpp index 641f33124..7007eda06 100644 --- a/src/libsync/propagateremotemkdir.cpp +++ b/src/libsync/propagateremotemkdir.cpp @@ -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; } diff --git a/src/libsync/propagateremotemove.cpp b/src/libsync/propagateremotemove.cpp index de7952de7..373f298b2 100644 --- a/src/libsync/propagateremotemove.cpp +++ b/src/libsync/propagateremotemove.cpp @@ -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; } diff --git a/src/libsync/propagatorjobs.cpp b/src/libsync/propagatorjobs.cpp index c2e08d5a3..7c8c5a31a 100644 --- a/src/libsync/propagatorjobs.cpp +++ b/src/libsync/propagatorjobs.cpp @@ -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; } -- 2.30.2