Commit a7485bb8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: we depend against c++17

parent 662a9310
Pipeline #68604 skipped
......@@ -27,12 +27,12 @@ void FilterConvertToSieve::convert()
if (!mListFilters.isEmpty()) {
QStringList requiresModule;
QString code;
for (MailFilter *filter : qAsConst(mListFilters)) {
for (MailFilter *filter : std::as_const(mListFilters)) {
filter->generateSieveScript(requiresModule, code);
code += QLatin1Char('\n');
}
QString requireStr;
for (const QString &require : qAsConst(requiresModule)) {
for (const QString &require : std::as_const(requiresModule)) {
requireStr += QStringLiteral("require \"%1\";").arg(require);
requireStr += QLatin1Char('\n');
}
......
......@@ -87,7 +87,7 @@ void FilterImporterBalsa::parseCondition(const QString &condition, MailCommon::M
// no multi condition
conditionList << condition;
}
for (QString cond : qAsConst(conditionList)) {
for (QString cond : std::as_const(conditionList)) {
cond = cond.trimmed();
if (cond.startsWith(QLatin1String("NOT"))) {
cond = cond.right(cond.length() - 3);
......
......@@ -165,7 +165,7 @@ QStringList FilterLog::logEntries() const
void FilterLog::dump()
{
qCDebug(MAILCOMMON_LOG) << "----- starting filter log -----";
for (const QString &entry : qAsConst(d->mLogEntries)) {
for (const QString &entry : std::as_const(d->mLogEntries)) {
qCDebug(MAILCOMMON_LOG) << entry;
}
qCDebug(MAILCOMMON_LOG) << "------ end of filter log ------";
......@@ -180,7 +180,7 @@ bool FilterLog::saveToFile(const QString &fileName) const
file.write("<html>\n<body>\n");
file.write("<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n");
for (const QString &entry : qAsConst(d->mLogEntries)) {
for (const QString &entry : std::as_const(d->mLogEntries)) {
const QString line = QLatin1String("<p>") + entry + QLatin1String("</p>") + QLatin1Char('\n');
file.write(line.toLocal8Bit());
}
......
......@@ -108,7 +108,7 @@ bool BackupJob::queueFolders(const Akonadi::Collection &root)
bool BackupJob::hasChildren(const Akonadi::Collection &collection) const
{
for (const Akonadi::Collection &curCol : qAsConst(mAllFolders)) {
for (const Akonadi::Collection &curCol : std::as_const(mAllFolders)) {
if (collection == curCol.parentCollection()) {
return true;
}
......@@ -281,7 +281,7 @@ bool BackupJob::writeDirHelper(const QString &directoryPath)
QString BackupJob::collectionName(const Akonadi::Collection &collection) const
{
for (const Akonadi::Collection &curCol : qAsConst(mAllFolders)) {
for (const Akonadi::Collection &curCol : std::as_const(mAllFolders)) {
if (curCol == collection) {
return curCol.name();
}
......
......@@ -347,7 +347,7 @@ QDataStream &SearchPattern::operator>>(QDataStream &s) const
break;
}
for (const SearchRule::Ptr &rule : qAsConst(*this)) {
for (const SearchRule::Ptr &rule : std::as_const(*this)) {
*rule >> s;
}
return s;
......
......@@ -76,7 +76,7 @@ void AddTagDialog::slotSave()
{
const QString name(d->mTagWidget->tagNameLineEdit()->text());
for (const MailCommon::Tag::Ptr &tag : qAsConst(d->mTags)) {
for (const MailCommon::Tag::Ptr &tag : std::as_const(d->mTags)) {
if (tag->name() == name) {
KMessageBox::error(this, i18n("Tag %1 already exists", name));
d->mTagWidget->tagNameLineEdit()->setFocus();
......
......@@ -169,7 +169,7 @@ KMime::Message::Ptr CryptoUtils::assembleMessage(const KMime::Message::Ptr &orig
// Copy over headers from the original message, except for CT, CTE and CD
// headers, we want to preserve those from the new content
QVector<KMime::Headers::Base *> headers = orig->headers();
for (const auto hdr : qAsConst(headers)) {
for (const auto hdr : std::as_const(headers)) {
if (isContentHeader(hdr)) {
continue;
}
......@@ -179,7 +179,7 @@ KMime::Message::Ptr CryptoUtils::assembleMessage(const KMime::Message::Ptr &orig
// Overwrite some headers by those provided by the new content
headers = newContent->headers();
for (const auto hdr : qAsConst(headers)) {
for (const auto hdr : std::as_const(headers)) {
if (isContentHeader(hdr)) {
copyHeader(hdr, out);
}
......
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