Commit 2b3664e1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix clazy warning

parent 519aa2d4
......@@ -56,7 +56,7 @@ NewMailNotifierAgent::NewMailNotifierAgent(const QString &id)
Kdelibs4ConfigMigrator migrate(QStringLiteral("newmailnotifieragent"));
migrate.setConfigFiles(QStringList() << QStringLiteral("akonadi_newmailnotifier_agentrc") << QStringLiteral("akonadi_newmailnotifier_agent.notifyrc"));
migrate.migrate();
connect(this, &Akonadi::AgentBase::reloadConfiguration, this, &NewMailNotifierAgent::reloadConfiguration);
connect(this, &Akonadi::AgentBase::reloadConfiguration, this, &NewMailNotifierAgent::slotReloadConfiguration);
KLocalizedString::setApplicationDomain("akonadi_newmailnotifier_agent");
Akonadi::AttributeFactory::registerAttribute<Akonadi::NewMailNotifierAttribute>();
new NewMailNotifierAdaptor(this);
......@@ -97,7 +97,7 @@ NewMailNotifierAgent::NewMailNotifierAgent(const QString &id)
}
}
void NewMailNotifierAgent::reloadConfiguration()
void NewMailNotifierAgent::slotReloadConfiguration()
{
NewMailNotifierAgentSettings::self()->load();
}
......
......@@ -71,7 +71,7 @@ private:
bool isActive() const;
void clearAll();
bool excludeSpecialCollection(const Akonadi::Collection &collection) const;
void reloadConfiguration();
void slotReloadConfiguration();
QString mDefaultIconName;
QStringList mListEmails;
QHash<Akonadi::Collection, QList<Akonadi::Item::Id> > mNewMails;
......
......@@ -83,9 +83,9 @@ void EwsPKeyAuthJob::start()
params[it.first.toLower()] = QUrl::fromPercentEncoding(it.second.toLatin1());
}
if (params.contains(QLatin1String("submiturl")) && params.contains(QLatin1String("nonce"))
&& params.contains(QLatin1String("certauthorities")) && params.contains(QLatin1String("context"))
&& params.contains(QLatin1String("version"))) {
if (params.contains(QStringLiteral("submiturl")) && params.contains(QStringLiteral("nonce"))
&& params.contains(QStringLiteral("certauthorities")) && params.contains(QStringLiteral("context"))
&& params.contains(QStringLiteral("version"))) {
const auto respToken = buildAuthResponse(params);
if (!respToken.isEmpty()) {
......
......@@ -131,7 +131,7 @@ QString EwsMailbox::emailWithName() const
if (d->mName.isEmpty()) {
return d->mEmail;
} else {
return QStringLiteral("%1 <%2>").arg(d->mName).arg(d->mEmail);
return QStringLiteral("%1 <%2>").arg(d->mName, d->mEmail);
}
}
......
......@@ -316,8 +316,8 @@ FakeEwsServer::DialogEntry::HttpResponse FakeEwsConnection::handleGetEventsReque
return {errorResp, 200};
}
resp += QLatin1String("<SubscriptionId>") + match.captured(QLatin1String("subid")) + QLatin1String("<SubscriptionId>");
resp += QLatin1String("<PreviousWatermark>") + match.captured(QLatin1String("watermark")) + QLatin1String("<PreviousWatermark>");
resp += QLatin1String("<SubscriptionId>") + match.captured(QStringLiteral("subid")) + QLatin1String("<SubscriptionId>");
resp += QLatin1String("<PreviousWatermark>") + match.captured(QStringLiteral("watermark")) + QLatin1String("<PreviousWatermark>");
resp += QStringLiteral("<MoreEvents>false<MoreEvents>");
FakeEwsServer *server = qobject_cast<FakeEwsServer *>(parent());
......
......@@ -67,7 +67,7 @@ void FakeEwsServer::setDialog(const DialogEntry::List &dialog)
mDialog = dialog;
}
void FakeEwsServer::setDefaultReplyCallback(DialogEntry::ReplyCallback defaultReplyCallback)
void FakeEwsServer::setDefaultReplyCallback(const DialogEntry::ReplyCallback &defaultReplyCallback)
{
QMutexLocker lock(&mMutex);
......
......@@ -52,7 +52,7 @@ public:
explicit FakeEwsServer(QObject *parent);
~FakeEwsServer() override;
bool start();
void setDefaultReplyCallback(DialogEntry::ReplyCallback defaultReplyCallback);
void setDefaultReplyCallback(const DialogEntry::ReplyCallback &defaultReplyCallback);
void queueEventsXml(const QStringList &events);
void setDialog(const DialogEntry::List &dialog);
ushort portNumber() const;
......
......@@ -237,7 +237,7 @@ QString UtEwsOAuth::formatJsonSorted(const QVariantMap &map)
QStringList keys = map.keys();
keys.sort();
QStringList elems;
for (const auto &key : keys) {
for (const auto &key : qAsConst(keys)) {
QString val = map[key].toString();
val.replace(QLatin1Char('"'), QStringLiteral("\\\""));
elems.append(QStringLiteral("\"%1\":\"%2\"").arg(key, val));
......
......@@ -25,7 +25,7 @@ using namespace OXA;
QDomElement DAVUtils::addDavElement(QDomDocument &document, QDomNode &parentNode, const QString &tag)
{
const QDomElement element = document.createElementNS(QLatin1String("DAV:"), QLatin1String("D:") + tag);
const QDomElement element = document.createElementNS(QStringLiteral("DAV:"), QLatin1String("D:") + tag);
parentNode.appendChild(element);
return element;
......@@ -33,7 +33,7 @@ QDomElement DAVUtils::addDavElement(QDomDocument &document, QDomNode &parentNode
QDomElement DAVUtils::addOxElement(QDomDocument &document, QDomNode &parentNode, const QString &tag, const QString &text)
{
QDomElement element = document.createElementNS(QLatin1String("http://www.open-xchange.org"), QLatin1String("ox:") + tag);
QDomElement element = document.createElementNS(QStringLiteral("http://www.open-xchange.org"), QLatin1String("ox:") + tag);
if (!text.isEmpty()) {
const QDomText textNode = document.createTextNode(text);
......
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