Commit 65c40797 authored by Laurent Montel's avatar Laurent Montel
Browse files

const'ify + add missing Q_REQUIRED_RESULT + remove unused return value

parent 02237663
Pipeline #231643 failed with stage
in 5 minutes and 47 seconds
......@@ -222,7 +222,7 @@ void DavFreeBusyHandler::onRetrieveFreeBusyJobFinished(KJob *job)
}
if (retrievalJobCount == 0) {
QString fbStr = format.createScheduleMessage(mRequestsTracker[email].resultingFreeBusy[requestId], KCalendarCore::iTIPRequest);
const QString fbStr = format.createScheduleMessage(mRequestsTracker[email].resultingFreeBusy[requestId], KCalendarCore::iTIPRequest);
Q_EMIT freeBusyRetrieved(email, fbStr, true, QString());
}
}
......@@ -700,8 +700,7 @@ void DavGroupwareResource::onRetrieveCollectionsFinished(KJob *job)
}
bool initialCacheSync = job->property("initialCacheSync").toBool();
Akonadi::Collection::List collections;
collections << mDavCollectionRoot;
Akonadi::Collection::List collections{mDavCollectionRoot};
QSet<QString> seenCollectionsUrls;
const KDAV::DavCollection::List davCollections = fetchJob->collections();
......
......@@ -73,7 +73,7 @@ static QString settingsToUrl(const QWizard *wizard, const QString &protocol)
if (!service->property(QStringLiteral("X-DavGroupware-Provider")).isNull()) {
providerName = service->property(QStringLiteral("X-DavGroupware-Provider")).toString();
}
QString localPath = wizard->field(QStringLiteral("installationPath")).toString();
const QString localPath = wizard->field(QStringLiteral("installationPath")).toString();
if (!localPath.isEmpty()) {
if (providerName == QLatin1String("davical")) {
if (!localPath.endsWith(QLatin1Char('/'))) {
......
......@@ -240,7 +240,7 @@ void UrlConfigurationDialog::onModelDataChanged(const QModelIndex &topLeft, cons
QUrl fullUrl(url);
fullUrl.setUserInfo(QString());
KDAV::DavUrl davUrl(fullUrl, protocol());
const KDAV::DavUrl davUrl(fullUrl, protocol());
auto job = new KDAV::DavCollectionModifyJob(davUrl);
job->setProperty(QStringLiteral("displayname"), newName);
connect(job, &KDAV::DavCollectionModifyJob::result, this, &UrlConfigurationDialog::onChangeDisplayNameFinished);
......
......@@ -38,7 +38,7 @@ protected:
void itemRemoved(const Akonadi::Item &item) override;
private:
bool doRetrieveItem(Akonadi::Item &item);
Q_REQUIRED_RESULT bool doRetrieveItem(Akonadi::Item &item);
private:
QMap<QString, KContacts::Addressee> mAddressees;
......
......@@ -53,7 +53,7 @@ void VCardDirResource::aboutToQuit()
VcardDirResourceSettings::self()->save();
}
bool VCardDirResource::loadAddressees()
void VCardDirResource::loadAddressees()
{
mAddressees.clear();
......@@ -78,8 +78,6 @@ bool VCardDirResource::loadAddressees()
}
Q_EMIT status(Idle);
return true;
}
bool VCardDirResource::retrieveItems(const Akonadi::Item::List &items, const QSet<QByteArray> &parts)
......
......@@ -38,11 +38,11 @@ protected:
private:
void slotReloadConfig();
bool loadAddressees();
QString vCardDirectoryName() const;
QString vCardDirectoryFileName(const QString &file) const;
void loadAddressees();
Q_REQUIRED_RESULT QString vCardDirectoryName() const;
Q_REQUIRED_RESULT QString vCardDirectoryFileName(const QString &file) const;
void initializeVCardDirectory() const;
bool doRetrieveItem(Akonadi::Item &item);
Q_REQUIRED_RESULT bool doRetrieveItem(Akonadi::Item &item);
private:
QMap<QString, KContacts::Addressee> mAddressees;
......
Supports Markdown
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