Commit 4362214b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some clazy warning

parent 4a9c84a4
Pipeline #73991 failed with stage
in 25 minutes and 28 seconds
......@@ -26,7 +26,8 @@ static const QMap<QString, QCA::CertificateInfoTypeKnown> stringToKnownCertInfoT
static QMultiMap<QCA::CertificateInfoType, QString> parseCertSubjectInfo(const QString &info)
{
QMultiMap<QCA::CertificateInfoType, QString> map;
for (const auto &token : info.split(QLatin1Char(','), Qt::SkipEmptyParts)) {
const auto infos{info.split(QLatin1Char(','), Qt::SkipEmptyParts)};
for (const auto &token : infos) {
const auto keyval = token.trimmed().split(QLatin1Char('='));
if (keyval.count() == 2) {
if (stringToKnownCertInfoType.contains(keyval[0])) {
......
......@@ -413,7 +413,7 @@ bool EwsFetchFoldersIncrJobPrivate::processRemoteFolders()
}
/* Build the resulting collection list. */
for (auto it = mFolderHash.begin(), end = mFolderHash.end(); it != end; ++it) {
for (auto it = mFolderHash.cbegin(), end = mFolderHash.cend(); it != end; ++it) {
if (it->isRemoved()) {
q->mDeletedFolders.append(it->collection);
} else if (it->isProcessed()) {
......
......@@ -382,7 +382,7 @@ void EwsFetchItemsJob::compareItemLists()
Q_EMIT status(AgentBase::Running, i18nc("@info:status", "Retrieving %1 items", mCollection.name()));
bool fetch = false;
for (const auto iType : toFetchItems.keys()) {
for (const auto &iType : toFetchItems.keys()) {
for (int i = 0; i < toFetchItems[iType].size(); i += fetchBatchSize) {
EwsItemHandler *handler = EwsItemHandler::itemHandler(static_cast<EwsItemType>(iType));
if (!handler) {
......
......@@ -79,7 +79,8 @@ void EwsModifyMailJob::updateItemFinished(KJob *job)
Q_ASSERT(req->responses().size() == mItems.size());
Item::List::iterator it = mItems.begin();
Q_FOREACH (const EwsUpdateItemRequest::Response &resp, req->responses()) {
const auto responses{req->responses()};
for (const EwsUpdateItemRequest::Response &resp : responses) {
if (!resp.isSuccess()) {
setErrorText(QStringLiteral("Item update failed: ") + resp.responseMessage());
emitResult();
......
......@@ -181,7 +181,7 @@ bool TestAgentInstance::setOnline(bool online, bool wait)
MsgRootInboxDialogEntry::MsgRootInboxDialogEntry(const QString &rootId, const QString &inboxId, const QString &descr, const ReplyCallback &callback)
: DialogEntryBase(descr, callback)
{
xQuery = IsolatedTestBase::loadResourceAsString(QStringLiteral(":/xquery/getfolder-inbox-msgroot")).arg(rootId).arg(inboxId);
xQuery = IsolatedTestBase::loadResourceAsString(QStringLiteral(":/xquery/getfolder-inbox-msgroot")).arg(rootId, inboxId);
description = QStringLiteral("GetFolder request for inbox and msgroot");
}
......@@ -332,6 +332,5 @@ ValidateFolderIdsDialogEntry::ValidateFolderIdsDialogEntry(const QStringList &id
xQuery = IsolatedTestBase::loadResourceAsString(QStringLiteral(":/xquery/getfolder-validateids"))
.arg(folderIndex)
.arg(xQueryFolderIds.join(QStringLiteral(" and ")))
.arg(responseXml);
.arg(xQueryFolderIds.join(QStringLiteral(" and ")), responseXml);
}
......@@ -456,8 +456,7 @@ QString tokenCallbackString(const QString &accessToken,
.arg(extTokenLifetime)
.arg(idToken)
.arg(time)
.arg(refreshToken)
.arg(resource);
.arg(refreshToken, resource);
}
QString requestWalletMapString()
......
......@@ -73,7 +73,7 @@ QMap<QString, QString> O2ReplyServer::parseQueryParams(QByteArray *data)
QString value = QUrl::fromPercentEncoding(tokenPair.second.trimmed().toLatin1());
queryParams.insert(key, value);
}
return queryParams;
return std::move(queryParams);
}
QByteArray O2ReplyServer::replyContent() const
......
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