Commit ecff6377 authored by Laurent Montel's avatar Laurent Montel 😁

Pedantic

parent 3f60455a
Pipeline #41305 failed with stage
in 18 minutes
......@@ -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;
......
......@@ -87,7 +87,7 @@ public:
void percent(KJob *job, long unsigned int percent) override
{
Q_UNUSED(job);
Q_UNUSED(job)
mPercent = percent;
}
......
......@@ -175,7 +175,7 @@ void NewMailNotifierAgent::itemsRemoved(const Item::List &items)
void NewMailNotifierAgent::itemsFlagsChanged(const Akonadi::Item::List &items, const QSet<QByteArray> &addedFlags, const QSet<QByteArray> &removedFlags)
{
Q_UNUSED(removedFlags);
Q_UNUSED(removedFlags)
if (!isActive()) {
return;
......
......@@ -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;
......
......@@ -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();
......
......@@ -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<QString, QString> &map)
......
......@@ -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<QString, QString> &map)
{
Q_UNUSED(map);
Q_UNUSED(map)
}
void EwsPasswordAuth::setUsername(const QString &username)
......
......@@ -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;
......
......@@ -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);
......
......@@ -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);
......
......@@ -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
......
......@@ -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);
......
......@@ -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);
}
......
......@@ -101,8 +101,8 @@ void FacebookResource::retrieveItems(const Akonadi::Collection &collection)
bool FacebookResource::retrieveItems(const Akonadi::Item::List &items, const QSet<QByteArray> &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
......
......@@ -37,7 +37,7 @@ ICalResource::~ICalResource()
bool ICalResource::doRetrieveItem(const Akonadi::Item &item, const QSet<QByteArray> &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<QByteArray>
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());
......
......@@ -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());
......
......@@ -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());
}
......@@ -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)
......
......@@ -17,7 +17,7 @@ MessageHelper::~MessageHelper()
Akonadi::Item MessageHelper::createItemFromMessage(const KMime::Message::Ptr &message, const qint64 uid, const qint64 size, const QMap<QByteArray, QVariant> &attrs, const QList<QByteArray> &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) {
......
......@@ -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;
......
......@@ -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);
}
......
......@@ -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();
}
......
......@@ -252,7 +252,7 @@ void SubscriptionDialog::onFullListingDone(KJob *job)
void SubscriptionDialog::onSubscribedMailBoxesReceived(const QList<KIMAP::MailBoxDescriptor> &mailBoxes, const QList< QList<QByteArray> > &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 QList<KIMAP::MailBo
void SubscriptionDialog::onReloadDone(KJob *job)
{
Q_UNUSED(job);
Q_UNUSED(job)
mUser1Button->setEnabled(true);
}
......
......@@ -240,7 +240,7 @@ bool KAlarmResource::writeToFile(const QString &fileName)
*/
bool KAlarmResource::doRetrieveItem(const Akonadi::Item &item, const QSet<QByteArray> &parts)
{
Q_UNUSED(parts);
Q_UNUSED(parts)
const QString rid = item.remoteId();
const KCalendarCore::Event::Ptr kcalEvent = calendar()->event(rid);
if (!kcalEvent) {
......
......@@ -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);
}
......
......@@ -32,7 +32,7 @@ QString TimezoneConverter::normalizeTimezone(const QString &tz)
QString TimezoneConverter::fromGMTOffsetTimezone(const QString &tz)
{
Q_UNUSED(tz);
Q_UNUSED(tz)
return QString();
}
......
......@@ -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");
......
......@@ -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()
......
......@@ -187,7 +187,7 @@ MaildirResource::~MaildirResource()
bool MaildirResource::retrieveItems(const Akonadi::Item::List &items, const QSet<QByteArray> &parts)
{
Q_UNUSED(parts);
Q_UNUSED(parts)
const Maildir md = maildirForCollection(items.at(0).parentCollection());
if (!md.isValid()) {
......
......@@ -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<QByteArray> &parts)
{
Q_UNUSED(parts);
Q_UNUSED(parts)
if (!mMBox) {
Q_EMIT error(i18n("MBox not loaded."));
......
......@@ -221,7 +221,7 @@ void MixedMaildirResource::retrieveItems(const Collection &col)
bool MixedMaildirResource::retrieveItems(const Item::List &items, const QSet<QByteArray> &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);
......
......@@ -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();
......
......@@ -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()
......
......@@ -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;
}
......
......@@ -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<QByteArray> &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();
......
......@@ -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"
......
......@@ -32,7 +32,7 @@ VCardResource::~VCardResource()
bool VCardResource::retrieveItem(const Akonadi::Item &item, const QSet<QByteArray> &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());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment