From ecff6377a9a833f53d5efe1b269dcaabfed79632 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Tue, 17 Nov 2020 08:58:51 +0100 Subject: [PATCH] Pedantic --- agents/maildispatcher/sendjob.cpp | 2 +- agents/migration/autotests/schedulertest.cpp | 2 +- agents/newmailnotifier/newmailnotifieragent.cpp | 2 +- kioslave/pop3/pop3.cpp | 2 +- resources/birthdays/birthdaysresource.cpp | 4 ++-- resources/ews/ewsclient/auth/ewsoauth.cpp | 8 ++++---- resources/ews/ewsclient/auth/ewspasswordauth.cpp | 6 +++--- .../ews/ewsclient/ewsgetstreamingeventsrequest.cpp | 2 +- .../ews/ewsclient/ewspoxautodiscoverrequest.cpp | 2 +- resources/ews/ewsclient/ewsrequest.cpp | 2 +- resources/ews/test/unittests/ewsoauth_ut_mock.cpp | 8 ++++---- resources/ews/test/unittests/fakehttppost.h | 4 ++-- resources/ews/test/unittests/faketransferjob.cpp | 2 +- resources/facebook/resource.cpp | 4 ++-- resources/ical/shared/icalresource.cpp | 4 ++-- resources/imap/gmailpasswordrequester.cpp | 2 +- resources/imap/imapidlemanager.cpp | 2 +- resources/imap/imapresourcebase.cpp | 8 ++++---- resources/imap/messagehelper.cpp | 2 +- resources/imap/moveitemstask.cpp | 2 +- resources/imap/retrievecollectionstask.cpp | 2 +- resources/imap/retrieveitemstask.cpp | 4 ++-- resources/imap/subscriptiondialog.cpp | 4 ++-- resources/kalarm/kalarm/kalarmresource.cpp | 2 +- resources/kolab/kolabretrievecollectionstask.cpp | 2 +- .../kolab/pimkolab/conversion/timezoneconverter.cpp | 2 +- resources/kolab/pimkolab/icalendar/imip.cpp | 2 +- resources/kolab/pimkolab/kolabformatV2/incidence.cpp | 2 +- resources/maildir/maildirresource.cpp | 2 +- resources/mbox/mboxresource.cpp | 4 ++-- resources/mixedmaildir/mixedmaildirresource.cpp | 10 +++++----- resources/mixedmaildir/mixedmaildirstore.cpp | 6 +++--- resources/pop3/autotests/fakeserver/fakeserver.cpp | 4 ++-- resources/pop3/jobs.cpp | 12 ++++++------ resources/pop3/pop3resource.cpp | 10 +++++----- resources/shared/filestore/sessionimpls.cpp | 2 +- resources/vcard/vcardresource.cpp | 4 ++-- 37 files changed, 72 insertions(+), 72 deletions(-) diff --git a/agents/maildispatcher/sendjob.cpp b/agents/maildispatcher/sendjob.cpp index a85cf2788..3b1a31fdd 100644 --- a/agents/maildispatcher/sendjob.cpp +++ b/agents/maildispatcher/sendjob.cpp @@ -208,7 +208,7 @@ void SendJob::resourceProgress(const AgentInstance &instance) void SendJob::resourceResult(qlonglong itemId, int result, const QString &message) { - Q_UNUSED(itemId); + Q_UNUSED(itemId) Q_ASSERT(mInterface); delete mInterface; // So that abort() knows the transport job is over. mInterface = nullptr; diff --git a/agents/migration/autotests/schedulertest.cpp b/agents/migration/autotests/schedulertest.cpp index 02fd819e0..189ebdb1b 100644 --- a/agents/migration/autotests/schedulertest.cpp +++ b/agents/migration/autotests/schedulertest.cpp @@ -87,7 +87,7 @@ public: void percent(KJob *job, long unsigned int percent) override { - Q_UNUSED(job); + Q_UNUSED(job) mPercent = percent; } diff --git a/agents/newmailnotifier/newmailnotifieragent.cpp b/agents/newmailnotifier/newmailnotifieragent.cpp index 7b0aa6f6a..f78302596 100644 --- a/agents/newmailnotifier/newmailnotifieragent.cpp +++ b/agents/newmailnotifier/newmailnotifieragent.cpp @@ -175,7 +175,7 @@ void NewMailNotifierAgent::itemsRemoved(const Item::List &items) void NewMailNotifierAgent::itemsFlagsChanged(const Akonadi::Item::List &items, const QSet &addedFlags, const QSet &removedFlags) { - Q_UNUSED(removedFlags); + Q_UNUSED(removedFlags) if (!isActive()) { return; diff --git a/kioslave/pop3/pop3.cpp b/kioslave/pop3/pop3.cpp index a376fa874..f93a707d9 100644 --- a/kioslave/pop3/pop3.cpp +++ b/kioslave/pop3/pop3.cpp @@ -1061,7 +1061,7 @@ void POP3Protocol::get(const QUrl &url) void POP3Protocol::listDir(const QUrl &url) { - Q_UNUSED(url); + Q_UNUSED(url) bool isINT; int num_messages = 0; diff --git a/resources/birthdays/birthdaysresource.cpp b/resources/birthdays/birthdaysresource.cpp index f83f46250..9c8fd9694 100644 --- a/resources/birthdays/birthdaysresource.cpp +++ b/resources/birthdays/birthdaysresource.cpp @@ -78,7 +78,7 @@ void BirthdaysResource::retrieveCollections() void BirthdaysResource::retrieveItems(const Akonadi::Collection &collection) { - Q_UNUSED(collection); + Q_UNUSED(collection) itemsRetrievedIncremental(Akonadi::valuesToVector(mPendingItems), Akonadi::valuesToVector(mDeletedItems)); mPendingItems.clear(); mDeletedItems.clear(); @@ -86,7 +86,7 @@ void BirthdaysResource::retrieveItems(const Akonadi::Collection &collection) bool BirthdaysResource::retrieveItem(const Akonadi::Item &item, const QSet< QByteArray > &parts) { - Q_UNUSED(parts); + Q_UNUSED(parts) qint64 contactId = item.remoteId().mid(1).toLongLong(); ItemFetchJob *job = new ItemFetchJob(Item(contactId), this); job->fetchScope().fetchFullPayload(); diff --git a/resources/ews/ewsclient/auth/ewsoauth.cpp b/resources/ews/ewsclient/auth/ewsoauth.cpp index eb3f1427e..73733cbc3 100644 --- a/resources/ews/ewsclient/auth/ewsoauth.cpp +++ b/resources/ews/ewsclient/auth/ewsoauth.cpp @@ -385,7 +385,7 @@ void EwsOAuthPrivate::error(const QString &error, const QString &errorDescriptio { Q_Q(EwsOAuth); - Q_UNUSED(uri); + Q_UNUSED(uri) mAuthenticated = false; @@ -414,8 +414,8 @@ bool EwsOAuth::getAuthData(QString &username, QString &password, QStringList &cu { Q_D(const EwsOAuth); - Q_UNUSED(username); - Q_UNUSED(password); + Q_UNUSED(username) + Q_UNUSED(password) if (d->mAuthenticated) { customHeaders.append(QStringLiteral("Authorization: Bearer ") + d->mOAuth2.token()); @@ -456,7 +456,7 @@ const QString &EwsOAuth::authFailedPrompt() const void EwsOAuth::walletPasswordRequestFinished(const QString &password) { - Q_UNUSED(password); + Q_UNUSED(password) } void EwsOAuth::walletMapRequestFinished(const QMap &map) diff --git a/resources/ews/ewsclient/auth/ewspasswordauth.cpp b/resources/ews/ewsclient/auth/ewspasswordauth.cpp index 3fff56b8f..45b06c8d9 100644 --- a/resources/ews/ewsclient/auth/ewspasswordauth.cpp +++ b/resources/ews/ewsclient/auth/ewspasswordauth.cpp @@ -23,7 +23,7 @@ void EwsPasswordAuth::init() bool EwsPasswordAuth::getAuthData(QString &username, QString &password, QStringList &customHeaders) { - Q_UNUSED(customHeaders); + Q_UNUSED(customHeaders) if (!mPassword.isNull()) { username = mUsername; @@ -40,7 +40,7 @@ void EwsPasswordAuth::notifyRequestAuthFailed() bool EwsPasswordAuth::authenticate(bool interactive) { - Q_UNUSED(interactive); + Q_UNUSED(interactive) return false; } @@ -70,7 +70,7 @@ void EwsPasswordAuth::walletPasswordRequestFinished(const QString &password) void EwsPasswordAuth::walletMapRequestFinished(const QMap &map) { - Q_UNUSED(map); + Q_UNUSED(map) } void EwsPasswordAuth::setUsername(const QString &username) diff --git a/resources/ews/ewsclient/ewsgetstreamingeventsrequest.cpp b/resources/ews/ewsclient/ewsgetstreamingeventsrequest.cpp index 82c4004a1..c7f396fd1 100644 --- a/resources/ews/ewsclient/ewsgetstreamingeventsrequest.cpp +++ b/resources/ews/ewsclient/ewsgetstreamingeventsrequest.cpp @@ -61,7 +61,7 @@ void EwsGetStreamingEventsRequest::start() void EwsGetStreamingEventsRequest::requestData(KIO::Job *job, const QByteArray &data) { - Q_UNUSED(job); + Q_UNUSED(job) mRespTimer.stop(); qCDebug(EWSCLI_PROTO_LOG) << "data" << job << data; diff --git a/resources/ews/ewsclient/ewspoxautodiscoverrequest.cpp b/resources/ews/ewsclient/ewspoxautodiscoverrequest.cpp index d00feb810..505609ad1 100644 --- a/resources/ews/ewsclient/ewspoxautodiscoverrequest.cpp +++ b/resources/ews/ewsclient/ewspoxautodiscoverrequest.cpp @@ -95,7 +95,7 @@ void EwsPoxAutodiscoverRequest::start() void EwsPoxAutodiscoverRequest::requestData(KIO::Job *job, const QByteArray &data) { - Q_UNUSED(job); + Q_UNUSED(job) qCDebug(EWSCLI_PROTO_LOG) << "data" << job << data; mResponseData += QString::fromUtf8(data); diff --git a/resources/ews/ewsclient/ewsrequest.cpp b/resources/ews/ewsclient/ewsrequest.cpp index 3ca93a538..e1fdfbba8 100644 --- a/resources/ews/ewsclient/ewsrequest.cpp +++ b/resources/ews/ewsclient/ewsrequest.cpp @@ -218,7 +218,7 @@ bool EwsRequest::readSoapFault(QXmlStreamReader &reader) void EwsRequest::requestData(KIO::Job *job, const QByteArray &data) { - Q_UNUSED(job); + Q_UNUSED(job) qCDebug(EWSCLI_PROTO_LOG) << "data" << job << data; mResponseData += QString::fromUtf8(data); diff --git a/resources/ews/test/unittests/ewsoauth_ut_mock.cpp b/resources/ews/test/unittests/ewsoauth_ut_mock.cpp index 66927531a..a41217579 100644 --- a/resources/ews/test/unittests/ewsoauth_ut_mock.cpp +++ b/resources/ews/test/unittests/ewsoauth_ut_mock.cpp @@ -451,10 +451,10 @@ const QString &KJob::errorString() const EwsPKeyAuthJob::EwsPKeyAuthJob(const QUrl &pkeyUri, const QString &certFile, const QString &keyFile, const QString &keyPassword, QObject *parent) : KJob(parent) { - Q_UNUSED(pkeyUri); - Q_UNUSED(certFile); - Q_UNUSED(keyFile); - Q_UNUSED(keyPassword); + Q_UNUSED(pkeyUri) + Q_UNUSED(certFile) + Q_UNUSED(keyFile) + Q_UNUSED(keyPassword) } const QUrl &EwsPKeyAuthJob::resultUri() const diff --git a/resources/ews/test/unittests/fakehttppost.h b/resources/ews/test/unittests/fakehttppost.h index 7817e1de0..edecb524c 100644 --- a/resources/ews/test/unittests/fakehttppost.h +++ b/resources/ews/test/unittests/fakehttppost.h @@ -14,8 +14,8 @@ namespace KIO { inline TransferJob *http_post(const QUrl &url, const QByteArray &postData, JobFlags flags) { - Q_UNUSED(url); - Q_UNUSED(flags); + Q_UNUSED(url) + Q_UNUSED(flags) FakeTransferJob::Verifier vfy = FakeTransferJob::getVerifier(); auto *job = new FakeTransferJob(postData, vfy.fn, vfy.object); diff --git a/resources/ews/test/unittests/faketransferjob.cpp b/resources/ews/test/unittests/faketransferjob.cpp index daed1fb0e..0c59b8a7c 100644 --- a/resources/ews/test/unittests/faketransferjob.cpp +++ b/resources/ews/test/unittests/faketransferjob.cpp @@ -17,7 +17,7 @@ FakeTransferJob::FakeTransferJob(const QByteArray &postData, const VerifierFn &f , mPostData(postData) , mVerifier(fn) { - Q_UNUSED(parent); + Q_UNUSED(parent) metaObject()->invokeMethod(this, "callVerifier", Qt::QueuedConnection); } diff --git a/resources/facebook/resource.cpp b/resources/facebook/resource.cpp index ed879910a..1d5541be8 100644 --- a/resources/facebook/resource.cpp +++ b/resources/facebook/resource.cpp @@ -101,8 +101,8 @@ void FacebookResource::retrieveItems(const Akonadi::Collection &collection) bool FacebookResource::retrieveItems(const Akonadi::Item::List &items, const QSet &parts) { - Q_UNUSED(items); - Q_UNUSED(parts); + Q_UNUSED(items) + Q_UNUSED(parts) // We always do full re-sync, and we always retrieve the entire payload, so // there's no need to implement this function diff --git a/resources/ical/shared/icalresource.cpp b/resources/ical/shared/icalresource.cpp index 913de3ce3..ea0f7ee9f 100644 --- a/resources/ical/shared/icalresource.cpp +++ b/resources/ical/shared/icalresource.cpp @@ -37,7 +37,7 @@ ICalResource::~ICalResource() bool ICalResource::doRetrieveItem(const Akonadi::Item &item, const QSet &parts) { - Q_UNUSED(parts); + Q_UNUSED(parts) const QString rid = item.remoteId(); Incidence::Ptr incidence = calendar()->instance(rid); if (!incidence) { @@ -112,7 +112,7 @@ void ICalResource::itemChanged(const Akonadi::Item &item, const QSet void ICalResource::doRetrieveItems(const Akonadi::Collection &col) { - Q_UNUSED(col); + Q_UNUSED(col) const Incidence::List incidences = calendar()->incidences(); Item::List items; items.reserve(incidences.count()); diff --git a/resources/imap/gmailpasswordrequester.cpp b/resources/imap/gmailpasswordrequester.cpp index 00ac1f268..2a8803d40 100644 --- a/resources/imap/gmailpasswordrequester.cpp +++ b/resources/imap/gmailpasswordrequester.cpp @@ -28,7 +28,7 @@ GmailPasswordRequester::~GmailPasswordRequester() void GmailPasswordRequester::requestPassword(RequestType request, const QString &serverError) { - Q_UNUSED(serverError); // we don't get anything useful from XOAUTH2 SASL + Q_UNUSED(serverError) // we don't get anything useful from XOAUTH2 SASL if (request == WrongPasswordRequest) { auto promise = KGAPI2::AccountManager::instance()->findAccount(GOOGLE_API_KEY, mResource->settings()->userName()); diff --git a/resources/imap/imapidlemanager.cpp b/resources/imap/imapidlemanager.cpp index 433fbbce9..8ccbda874 100644 --- a/resources/imap/imapidlemanager.cpp +++ b/resources/imap/imapidlemanager.cpp @@ -183,7 +183,7 @@ void ImapIdleManager::onStatsReceived(KIMAP::IdleJob *job, const QString &mailBo void ImapIdleManager::onFlagsChanged(KIMAP::IdleJob *job) { - Q_UNUSED(job); + Q_UNUSED(job) qCDebug(IMAPRESOURCE_LOG) << "IDLE flags changed in" << m_session->selectedMailBox(); m_resource->synchronizeCollection(m_state->collection().id()); } diff --git a/resources/imap/imapresourcebase.cpp b/resources/imap/imapresourcebase.cpp index ab2754e29..b20b2b256 100644 --- a/resources/imap/imapresourcebase.cpp +++ b/resources/imap/imapresourcebase.cpp @@ -457,14 +457,14 @@ void ImapResourceBase::collectionMoved(const Akonadi::Collection &collection, co void ImapResourceBase::addSearch(const QString &query, const QString &queryLanguage, const Collection &resultCollection) { - Q_UNUSED(query); - Q_UNUSED(queryLanguage); - Q_UNUSED(resultCollection); + Q_UNUSED(query) + Q_UNUSED(queryLanguage) + Q_UNUSED(resultCollection) } void ImapResourceBase::removeSearch(const Collection &resultCollection) { - Q_UNUSED(resultCollection); + Q_UNUSED(resultCollection) } void ImapResourceBase::search(const QString &query, const Collection &collection) diff --git a/resources/imap/messagehelper.cpp b/resources/imap/messagehelper.cpp index 93461cfb2..c6536ff08 100644 --- a/resources/imap/messagehelper.cpp +++ b/resources/imap/messagehelper.cpp @@ -17,7 +17,7 @@ MessageHelper::~MessageHelper() Akonadi::Item MessageHelper::createItemFromMessage(const KMime::Message::Ptr &message, const qint64 uid, const qint64 size, const QMap &attrs, const QList &flags, const KIMAP::FetchJob::FetchScope &scope, bool &ok) const { - Q_UNUSED(attrs); + Q_UNUSED(attrs) Akonadi::Item i; if (scope.mode == KIMAP::FetchJob::FetchScope::Flags) { diff --git a/resources/imap/moveitemstask.cpp b/resources/imap/moveitemstask.cpp index f8f344cd8..ccfa5a7a3 100644 --- a/resources/imap/moveitemstask.cpp +++ b/resources/imap/moveitemstask.cpp @@ -112,7 +112,7 @@ void MoveItemsTask::startMove(KIMAP::Session *session) set.add(item.remoteId().toLong()); } catch (const Akonadi::PayloadException &e) { - Q_UNUSED(e); + Q_UNUSED(e) qCWarning(IMAPRESOURCE_LOG) << "Move failed, payload exception " << item.id() << item.remoteId(); cancelTask(i18n("Failed to move item, it has no message payload. Remote id: %1", item.remoteId())); return; diff --git a/resources/imap/retrievecollectionstask.cpp b/resources/imap/retrievecollectionstask.cpp index 590391e7d..86cefc3fa 100644 --- a/resources/imap/retrievecollectionstask.cpp +++ b/resources/imap/retrievecollectionstask.cpp @@ -212,7 +212,7 @@ void RetrieveCollectionsTask::onMailBoxesReceiveDone(KJob *job) void RetrieveCollectionsTask::onFullMailBoxesReceived(const QList< KIMAP::MailBoxDescriptor > &descriptors, const QList< QList< QByteArray > > &flags) { - Q_UNUSED(flags); + Q_UNUSED(flags) for (const KIMAP::MailBoxDescriptor &descriptor : descriptors) { m_fullReportedCollections.insert(descriptor.name); } diff --git a/resources/imap/retrieveitemstask.cpp b/resources/imap/retrieveitemstask.cpp index 5a5ee628c..d75a7e1b2 100644 --- a/resources/imap/retrieveitemstask.cpp +++ b/resources/imap/retrieveitemstask.cpp @@ -177,7 +177,7 @@ void RetrieveItemsTask::onPreExpungeSelectDone(KJob *job) void RetrieveItemsTask::triggerExpunge(const QString &mailBox) { - Q_UNUSED(mailBox); + Q_UNUSED(mailBox) auto *expunge = new KIMAP::ExpungeJob(m_session); connect(expunge, &KJob::result, this, &RetrieveItemsTask::onExpungeDone); @@ -511,7 +511,7 @@ void RetrieveItemsTask::retrieveItems(const KIMAP::ImapSet &set, const KIMAP::Fe void RetrieveItemsTask::onReadyForNextBatch(int size) { - Q_UNUSED(size); + Q_UNUSED(size) if (m_batchFetcher) { m_batchFetcher->fetchNextBatch(); } diff --git a/resources/imap/subscriptiondialog.cpp b/resources/imap/subscriptiondialog.cpp index 130f5314e..194325130 100644 --- a/resources/imap/subscriptiondialog.cpp +++ b/resources/imap/subscriptiondialog.cpp @@ -252,7 +252,7 @@ void SubscriptionDialog::onFullListingDone(KJob *job) void SubscriptionDialog::onSubscribedMailBoxesReceived(const QList &mailBoxes, const QList< QList > &flags) { - Q_UNUSED(flags); + Q_UNUSED(flags) const int numberOfMailBoxes(mailBoxes.size()); for (int i = 0; i < numberOfMailBoxes; ++i) { KIMAP::MailBoxDescriptor mailBox = mailBoxes.at(i); @@ -268,7 +268,7 @@ void SubscriptionDialog::onSubscribedMailBoxesReceived(const QListsetEnabled(true); } diff --git a/resources/kalarm/kalarm/kalarmresource.cpp b/resources/kalarm/kalarm/kalarmresource.cpp index 283a7fe7b..7aafbfd1f 100644 --- a/resources/kalarm/kalarm/kalarmresource.cpp +++ b/resources/kalarm/kalarm/kalarmresource.cpp @@ -240,7 +240,7 @@ bool KAlarmResource::writeToFile(const QString &fileName) */ bool KAlarmResource::doRetrieveItem(const Akonadi::Item &item, const QSet &parts) { - Q_UNUSED(parts); + Q_UNUSED(parts) const QString rid = item.remoteId(); const KCalendarCore::Event::Ptr kcalEvent = calendar()->event(rid); if (!kcalEvent) { diff --git a/resources/kolab/kolabretrievecollectionstask.cpp b/resources/kolab/kolabretrievecollectionstask.cpp index 80be953f9..a6726a947 100644 --- a/resources/kolab/kolabretrievecollectionstask.cpp +++ b/resources/kolab/kolabretrievecollectionstask.cpp @@ -502,7 +502,7 @@ void KolabRetrieveCollectionsTask::checkDone() void KolabRetrieveCollectionsTask::onFullMailBoxesReceived(const QList< KIMAP::MailBoxDescriptor > &descriptors, const QList< QList< QByteArray > > &flags) { - Q_UNUSED(flags); + Q_UNUSED(flags) for (const KIMAP::MailBoxDescriptor &descriptor : descriptors) { mSubscribedMailboxes.insert(descriptor.name); } diff --git a/resources/kolab/pimkolab/conversion/timezoneconverter.cpp b/resources/kolab/pimkolab/conversion/timezoneconverter.cpp index bdfe69c3e..4b5ddc39c 100644 --- a/resources/kolab/pimkolab/conversion/timezoneconverter.cpp +++ b/resources/kolab/pimkolab/conversion/timezoneconverter.cpp @@ -32,7 +32,7 @@ QString TimezoneConverter::normalizeTimezone(const QString &tz) QString TimezoneConverter::fromGMTOffsetTimezone(const QString &tz) { - Q_UNUSED(tz); + Q_UNUSED(tz) return QString(); } diff --git a/resources/kolab/pimkolab/icalendar/imip.cpp b/resources/kolab/pimkolab/icalendar/imip.cpp index dec63b7c0..c51835ca0 100644 --- a/resources/kolab/pimkolab/icalendar/imip.cpp +++ b/resources/kolab/pimkolab/icalendar/imip.cpp @@ -22,7 +22,7 @@ //From MailClient::send KMime::Message::Ptr createMessage(const QString &from, const QString &_to, const QString &cc, const QString &subject, const QString &body, bool hidden, bool bccMe, const QString &attachment /*, const QString &mailTransport */) { - Q_UNUSED(hidden); + Q_UNUSED(hidden) const bool outlookConformInvitation = false; QString userAgent = QStringLiteral("libkolab"); diff --git a/resources/kolab/pimkolab/kolabformatV2/incidence.cpp b/resources/kolab/pimkolab/kolabformatV2/incidence.cpp index 819c2cc66..0e422e4b6 100644 --- a/resources/kolab/pimkolab/kolabformatV2/incidence.cpp +++ b/resources/kolab/pimkolab/kolabformatV2/incidence.cpp @@ -25,7 +25,7 @@ Incidence::Incidence(const QString &tz, const KCalendarCore::Incidence::Ptr &inc , mHasAlarm(false) , mPriority(0) { - Q_UNUSED(incidence); + Q_UNUSED(incidence) } Incidence::~Incidence() diff --git a/resources/maildir/maildirresource.cpp b/resources/maildir/maildirresource.cpp index 454698077..d69c223a7 100644 --- a/resources/maildir/maildirresource.cpp +++ b/resources/maildir/maildirresource.cpp @@ -187,7 +187,7 @@ MaildirResource::~MaildirResource() bool MaildirResource::retrieveItems(const Akonadi::Item::List &items, const QSet &parts) { - Q_UNUSED(parts); + Q_UNUSED(parts) const Maildir md = maildirForCollection(items.at(0).parentCollection()); if (!md.isValid()) { diff --git a/resources/mbox/mboxresource.cpp b/resources/mbox/mboxresource.cpp index 266958ada..e67b17a23 100644 --- a/resources/mbox/mboxresource.cpp +++ b/resources/mbox/mboxresource.cpp @@ -78,7 +78,7 @@ Collection MboxResource::rootCollection() const void MboxResource::retrieveItems(const Akonadi::Collection &col) { - Q_UNUSED(col); + Q_UNUSED(col) if (!mMBox) { cancelTask(); return; @@ -130,7 +130,7 @@ void MboxResource::retrieveItems(const Akonadi::Collection &col) bool MboxResource::retrieveItems(const Akonadi::Item::List &items, const QSet &parts) { - Q_UNUSED(parts); + Q_UNUSED(parts) if (!mMBox) { Q_EMIT error(i18n("MBox not loaded.")); diff --git a/resources/mixedmaildir/mixedmaildirresource.cpp b/resources/mixedmaildir/mixedmaildirresource.cpp index d35e68934..6a7ae8cf5 100644 --- a/resources/mixedmaildir/mixedmaildirresource.cpp +++ b/resources/mixedmaildir/mixedmaildirresource.cpp @@ -221,7 +221,7 @@ void MixedMaildirResource::retrieveItems(const Collection &col) bool MixedMaildirResource::retrieveItems(const Item::List &items, const QSet &parts) { - Q_UNUSED(parts); + Q_UNUSED(parts) FileStore::ItemFetchJob *job = mStore->fetchItems(items); if (parts.contains(Item::FullPayload)) { @@ -299,7 +299,7 @@ void MixedMaildirResource::collectionChanged(const Collection &collection, const mCompactHelper->checkCollectionChanged(collection); - Q_UNUSED(changedAttributes); + Q_UNUSED(changedAttributes) FileStore::CollectionModifyJob *job = mStore->modifyCollection(collection); connect(job, &RetrieveItemsJob::result, this, &MixedMaildirResource::collectionChangedResult); @@ -469,7 +469,7 @@ void MixedMaildirResource::retrieveItemsResult(KJob *job) // last item delete triggers mbox purge, i.e. store compact const bool connected = connect(deleteJob, &KJob::result, this, &MixedMaildirResource::itemsDeleted); Q_ASSERT(connected); - Q_UNUSED(connected); + Q_UNUSED(connected) } // if some items have tags, we need to complete the retrieval and schedule tagging @@ -619,7 +619,7 @@ void MixedMaildirResource::itemRemovedResult(KJob *job) void MixedMaildirResource::itemsDeleted(KJob *job) { - Q_UNUSED(job); + Q_UNUSED(job) scheduleCustomTask(this, "compactStore", QVariant()); } @@ -689,7 +689,7 @@ void MixedMaildirResource::collectionRemovedResult(KJob *job) void MixedMaildirResource::compactStore(const QVariant &arg) { - Q_UNUSED(arg); + Q_UNUSED(arg) FileStore::StoreCompactJob *job = mStore->compactStore(); connect(job, &RetrieveItemsJob::result, this, &MixedMaildirResource::compactStoreResult); diff --git a/resources/mixedmaildir/mixedmaildirstore.cpp b/resources/mixedmaildir/mixedmaildirstore.cpp index 191523f13..b6663860e 100644 --- a/resources/mixedmaildir/mixedmaildirstore.cpp +++ b/resources/mixedmaildir/mixedmaildirstore.cpp @@ -2233,7 +2233,7 @@ bool MixedMaildirStore::Private::visit(FileStore::ItemMoveJob *job) bool MixedMaildirStore::Private::visit(FileStore::StoreCompactJob *job) { - Q_UNUSED(job); + Q_UNUSED(job) Collection::List collections; @@ -2392,8 +2392,8 @@ void MixedMaildirStore::checkItemModify(FileStore::ItemModifyJob *job, int &erro void MixedMaildirStore::checkItemFetch(FileStore::ItemFetchJob *job, int &errorCode, QString &errorText) const { - Q_UNUSED(errorCode); - Q_UNUSED(errorText); + Q_UNUSED(errorCode) + Q_UNUSED(errorText) if (!job->requestedItems().isEmpty()) { // Requesting items const auto items = job->requestedItems(); diff --git a/resources/pop3/autotests/fakeserver/fakeserver.cpp b/resources/pop3/autotests/fakeserver/fakeserver.cpp index d390c0415..a00cc8667 100644 --- a/resources/pop3/autotests/fakeserver/fakeserver.cpp +++ b/resources/pop3/autotests/fakeserver/fakeserver.cpp @@ -152,10 +152,10 @@ void FakeServer::dataAvailable() //qDebug() << "Going to write data:" << removeCRLF( toWrite ); const bool allWritten = mTcpServerConnection->write(toWrite) == toWrite.size(); Q_ASSERT(allWritten); - Q_UNUSED(allWritten); + Q_UNUSED(allWritten) const bool flushed = mTcpServerConnection->flush(); Q_ASSERT(flushed); - Q_UNUSED(flushed); + Q_UNUSED(flushed) } void FakeServer::newConnection() diff --git a/resources/pop3/jobs.cpp b/resources/pop3/jobs.cpp index d773fe4a9..a502d8b74 100644 --- a/resources/pop3/jobs.cpp +++ b/resources/pop3/jobs.cpp @@ -30,7 +30,7 @@ POPSession::~POPSession() void POPSession::slotSlaveError(KIO::Slave *slave, int errorCode, const QString &errorMessage) { - Q_UNUSED(slave); + Q_UNUSED(slave) qCWarning(POP3RESOURCE_LOG) << "Got a slave error:" << errorMessage; if (slave != mSlave) { @@ -216,7 +216,7 @@ void SlaveBaseJob::slotSlaveResult(KJob *job) void SlaveBaseJob::slotSlaveData(KIO::Job *job, const QByteArray &data) { - Q_UNUSED(job); + Q_UNUSED(job) qCWarning(POP3RESOURCE_LOG) << "Got unexpected slave data:" << data.data(); } @@ -307,7 +307,7 @@ void ListJob::start() void ListJob::slotSlaveData(KIO::Job *job, const QByteArray &data) { - Q_UNUSED(job); + Q_UNUSED(job) // Silly slave, why are you sending us empty data? if (data.isEmpty()) { @@ -357,7 +357,7 @@ void UIDListJob::start() void UIDListJob::slotSlaveData(KIO::Job *job, const QByteArray &data) { - Q_UNUSED(job); + Q_UNUSED(job) // Silly slave, why are you sending us empty data? if (data.isEmpty()) { @@ -465,7 +465,7 @@ void FetchJob::connectJob() void FetchJob::slotSlaveData(KIO::Job *job, const QByteArray &data) { - Q_UNUSED(job); + Q_UNUSED(job) mCurrentMessage += data; mBytesDownloaded += data.size(); mDataCounter++; @@ -476,7 +476,7 @@ void FetchJob::slotSlaveData(KIO::Job *job, const QByteArray &data) void FetchJob::slotInfoMessage(KJob *job, const QString &infoMessage, const QString &) { - Q_UNUSED(job); + Q_UNUSED(job) if (infoMessage != QLatin1String("message complete")) { return; } diff --git a/resources/pop3/pop3resource.cpp b/resources/pop3/pop3resource.cpp index 334ee7f10..718f69322 100644 --- a/resources/pop3/pop3resource.cpp +++ b/resources/pop3/pop3resource.cpp @@ -104,14 +104,14 @@ void POP3Resource::slotAbortRequested() void POP3Resource::retrieveItems(const Akonadi::Collection &collection) { - Q_UNUSED(collection); + Q_UNUSED(collection) qCWarning(POP3RESOURCE_LOG) << "This should never be called, we don't have a collection!"; } bool POP3Resource::retrieveItem(const Akonadi::Item &item, const QSet &parts) { - Q_UNUSED(item); - Q_UNUSED(parts); + Q_UNUSED(item) + Q_UNUSED(parts) qCWarning(POP3RESOURCE_LOG) << "This should never be called, we don't have any item!"; return false; } @@ -556,8 +556,8 @@ void POP3Resource::messageFinished(int messageId, KMime::Message::Ptr message) void POP3Resource::messageDownloadProgress(KJob *job, KJob::Unit unit, qulonglong totalBytes) { - Q_UNUSED(totalBytes); - Q_UNUSED(unit); + Q_UNUSED(totalBytes) + Q_UNUSED(unit) Q_ASSERT(unit == KJob::Bytes); QString statusMessage; const int totalMessages = mIdsToDownload.size() + mDownloadedIDs.size(); diff --git a/resources/shared/filestore/sessionimpls.cpp b/resources/shared/filestore/sessionimpls.cpp index c244be8d9..93bfc0401 100644 --- a/resources/shared/filestore/sessionimpls.cpp +++ b/resources/shared/filestore/sessionimpls.cpp @@ -153,7 +153,7 @@ public: protected: void enqueue(FileStore::Job *job, const char *className) override { - Q_UNUSED(className); + Q_UNUSED(className) mJobQueue.enqueue(job); // qDebug() << "adding" << className << ". Queue now with" diff --git a/resources/vcard/vcardresource.cpp b/resources/vcard/vcardresource.cpp index 257048c57..e65422796 100644 --- a/resources/vcard/vcardresource.cpp +++ b/resources/vcard/vcardresource.cpp @@ -32,7 +32,7 @@ VCardResource::~VCardResource() bool VCardResource::retrieveItem(const Akonadi::Item &item, const QSet &parts) { - Q_UNUSED(parts); + Q_UNUSED(parts) const QString rid = item.remoteId(); if (!mAddressees.contains(rid)) { Q_EMIT error(i18n("Contact with uid '%1' not found.", rid)); @@ -104,7 +104,7 @@ void VCardResource::itemRemoved(const Akonadi::Item &item) void VCardResource::retrieveItems(const Akonadi::Collection &col) { // vCard does not support folders so we can safely ignore the collection - Q_UNUSED(col); + Q_UNUSED(col) Item::List items; items.reserve(mAddressees.count()); -- GitLab