diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/kauthorized.cpp | 2 | ||||
| -rw-r--r-- | src/core/kconfig.cpp | 2 | ||||
| -rw-r--r-- | src/core/kconfigini.cpp | 2 | ||||
| -rw-r--r-- | src/core/kconfigwatcher.cpp | 2 | ||||
| -rw-r--r-- | src/core/kcoreconfigskeleton.cpp | 12 | ||||
| -rw-r--r-- | src/core/ksharedconfig.cpp | 2 | ||||
| -rw-r--r-- | src/kconf_update/kconf_update.cpp | 4 | ||||
| -rw-r--r-- | src/kconfig_compiler/KConfigCodeGeneratorBase.cpp | 2 | ||||
| -rw-r--r-- | src/kconfig_compiler/KConfigHeaderGenerator.cpp | 20 | ||||
| -rw-r--r-- | src/kconfig_compiler/KConfigSourceGenerator.cpp | 24 | ||||
| -rw-r--r-- | src/kconfig_compiler/kconfig_compiler.cpp | 2 | 
11 files changed, 37 insertions, 37 deletions
| diff --git a/src/core/kauthorized.cpp b/src/core/kauthorized.cpp index a8784a1c..3c0941d5 100644 --- a/src/core/kauthorized.cpp +++ b/src/core/kauthorized.cpp @@ -378,7 +378,7 @@ authorizeUrlActionInternal(const QString &action, const QUrl &_baseURL, const QU      QUrl destURL(_destURL);      destURL.setPath(QDir::cleanPath(destURL.path())); -    for (const URLActionRule &rule : qAsConst(d->urlActionRestrictions)) { +    for (const URLActionRule &rule : std::as_const(d->urlActionRestrictions)) {          if ((result != rule.permission) && // No need to check if it doesn't make a difference              (action == QLatin1String(rule.action.constData())) && rule.baseMatch(baseURL, baseClass)              && rule.destMatch(destURL, destClass, baseURL, baseClass)) { diff --git a/src/core/kconfig.cpp b/src/core/kconfig.cpp index 0bf6cccd..506e3f90 100644 --- a/src/core/kconfig.cpp +++ b/src/core/kconfig.cpp @@ -774,7 +774,7 @@ void KConfigPrivate::parseConfigFiles()          //        qDebug() << "parsing local files" << files;          const QByteArray utf8Locale = locale.toUtf8(); -        for (const QString &file : qAsConst(files)) { +        for (const QString &file : std::as_const(files)) {              if (file.compare(mBackend->filePath(), sPathCaseSensitivity) == 0) {                  switch (mBackend->parseConfig(utf8Locale, entryMap, KConfigBackend::ParseExpansions)) {                  case KConfigBackend::ParseOk: diff --git a/src/core/kconfigini.cpp b/src/core/kconfigini.cpp index 5bc8743c..7c1e15f0 100644 --- a/src/core/kconfigini.cpp +++ b/src/core/kconfigini.cpp @@ -287,7 +287,7 @@ KConfigBackend::ParseInfo KConfigIniBackend::parseConfig(const QByteArray &curre      }      // now make sure immutable groups are marked immutable -    for (const QByteArray &group : qAsConst(immutableGroups)) { +    for (const QByteArray &group : std::as_const(immutableGroups)) {          entryMap.setEntry(group, QByteArray(), QByteArray(), KEntryMap::EntryImmutable);      } diff --git a/src/core/kconfigwatcher.cpp b/src/core/kconfigwatcher.cpp index 3da2d535..ec3cb541 100644 --- a/src/core/kconfigwatcher.cpp +++ b/src/core/kconfigwatcher.cpp @@ -66,7 +66,7 @@ KConfigWatcher::KConfigWatcher(const KSharedConfig::Ptr &config)          watchedPaths << QStringLiteral("/kdeglobals");      } -    for (const QString &path : qAsConst(watchedPaths)) { +    for (const QString &path : std::as_const(watchedPaths)) {          QDBusConnection::sessionBus().connect(QString(),                                                path,                                                QStringLiteral("org.kde.kconfig.notify"), diff --git a/src/core/kcoreconfigskeleton.cpp b/src/core/kcoreconfigskeleton.cpp index e1c5c1dd..f8097055 100644 --- a/src/core/kcoreconfigskeleton.cpp +++ b/src/core/kcoreconfigskeleton.cpp @@ -1038,7 +1038,7 @@ void KCoreConfigSkeleton::ItemUrlList::readConfig(KConfig *config)          mReference = mDefault;      } else {          QStringList strList; -        for (const QUrl &url : qAsConst(mDefault)) { +        for (const QUrl &url : std::as_const(mDefault)) {              strList.append(url.toString());          }          mReference.clear(); @@ -1060,7 +1060,7 @@ void KCoreConfigSkeleton::ItemUrlList::writeConfig(KConfig *config)              cg.revertToDefault(mKey, writeFlags());          } else {              QStringList strList; -            for (const QUrl &url : qAsConst(mReference)) { +            for (const QUrl &url : std::as_const(mReference)) {                  strList.append(url.toString());              }              cg.writeEntry<QStringList>(mKey, strList, writeFlags()); @@ -1183,7 +1183,7 @@ bool KCoreConfigSkeleton::useDefaults(bool b)      }      d->mUseDefaults = b; -    for (auto *skelItem : qAsConst(d->mItems)) { +    for (auto *skelItem : std::as_const(d->mItems)) {          skelItem->swapDefault();      } @@ -1193,7 +1193,7 @@ bool KCoreConfigSkeleton::useDefaults(bool b)  void KCoreConfigSkeleton::setDefaults()  { -    for (auto *skelItem : qAsConst(d->mItems)) { +    for (auto *skelItem : std::as_const(d->mItems)) {          skelItem->setDefault();      }      usrSetDefaults(); @@ -1207,7 +1207,7 @@ void KCoreConfigSkeleton::load()  void KCoreConfigSkeleton::read()  { -    for (auto *skelItem : qAsConst(d->mItems)) { +    for (auto *skelItem : std::as_const(d->mItems)) {          skelItem->readConfig(d->mConfig.data());      }      usrRead(); @@ -1230,7 +1230,7 @@ bool KCoreConfigSkeleton::isSaveNeeded() const  bool KCoreConfigSkeleton::save()  {      // qDebug(); -    for (auto *skelItem : qAsConst(d->mItems)) { +    for (auto *skelItem : std::as_const(d->mItems)) {          skelItem->writeConfig(d->mConfig.data());      } diff --git a/src/core/ksharedconfig.cpp b/src/core/ksharedconfig.cpp index 98aa4c5e..09cd35f1 100644 --- a/src/core/ksharedconfig.cpp +++ b/src/core/ksharedconfig.cpp @@ -78,7 +78,7 @@ KSharedConfigPtr KSharedConfig::openConfig(const QString &_fileName, OpenFlags f          list->mainConfig = nullptr;      } -    for (auto *cfg : qAsConst(*list)) { +    for (auto *cfg : std::as_const(*list)) {          if (cfg->name() == fileName && cfg->d_ptr->openFlags == flags && cfg->locationType() == resType              //                cfg->backend()->type() == backend          ) { diff --git a/src/kconf_update/kconf_update.cpp b/src/kconf_update/kconf_update.cpp index bfb115dd..eec97d66 100644 --- a/src/kconf_update/kconf_update.cpp +++ b/src/kconf_update/kconf_update.cpp @@ -161,7 +161,7 @@ KonfUpdate::KonfUpdate(QCommandLineParser *parser)          updateAll = true;      } -    for (const QString &file : qAsConst(updateFiles)) { +    for (const QString &file : std::as_const(updateFiles)) {          updateFile(file);      } @@ -169,7 +169,7 @@ KonfUpdate::KonfUpdate(QCommandLineParser *parser)          cg.writeEntry("updateInfoAdded", true);          updateFiles = findUpdateFiles(false); -        for (const auto &file : qAsConst(updateFiles)) { +        for (const auto &file : std::as_const(updateFiles)) {              checkFile(file);          }          updateFiles.clear(); diff --git a/src/kconfig_compiler/KConfigCodeGeneratorBase.cpp b/src/kconfig_compiler/KConfigCodeGeneratorBase.cpp index 0effd7e5..78a5fa0a 100644 --- a/src/kconfig_compiler/KConfigCodeGeneratorBase.cpp +++ b/src/kconfig_compiler/KConfigCodeGeneratorBase.cpp @@ -255,7 +255,7 @@ void KConfigCodeGeneratorBase::memberMutatorBody(const CfgEntry *e)      m_stream << whitespace() << "  " << varExpression << " = v;\n";      const auto listSignal = e->signalList; -    for (const Signal &signal : qAsConst(listSignal)) { +    for (const Signal &signal : std::as_const(listSignal)) {          if (signal.modify) {              m_stream << whitespace() << "  Q_EMIT " << m_this << signal.name << "();\n";          } else { diff --git a/src/kconfig_compiler/KConfigHeaderGenerator.cpp b/src/kconfig_compiler/KConfigHeaderGenerator.cpp index 24829ff5..2c5126d5 100644 --- a/src/kconfig_compiler/KConfigHeaderGenerator.cpp +++ b/src/kconfig_compiler/KConfigHeaderGenerator.cpp @@ -52,7 +52,7 @@ void KConfigHeaderGenerator::doClassDefinition()      createConstructor();      createDestructor(); -    for (const auto *entry : qAsConst(parseResult.entries)) { +    for (const auto *entry : std::as_const(parseResult.entries)) {          const QString returnType = (cfg().useEnumTypes && entry->type == QLatin1String("Enum")) ? enumType(entry, cfg().globalEnums) : cppType(entry->type);          createSetters(entry); @@ -81,7 +81,7 @@ void KConfigHeaderGenerator::doClassDefinition()      }      // Class Parameters -    for (const auto ¶meter : qAsConst(parseResult.parameters)) { +    for (const auto ¶meter : std::as_const(parseResult.parameters)) {          stream() << whitespace() << "" << cppType(parameter.type) << " mParam" << parameter.name << ";\n";      } @@ -152,7 +152,7 @@ void KConfigHeaderGenerator::implementChoiceEnums(const CfgEntry *entry, const C      }      QStringList values; -    for (const auto &choice : qAsConst(chlist)) { +    for (const auto &choice : std::as_const(chlist)) {          values.append(choices.prefix + choice.name);      } @@ -201,7 +201,7 @@ void KConfigHeaderGenerator::implementEnums()          return;      } -    for (const auto *entry : qAsConst(parseResult.entries)) { +    for (const auto *entry : std::as_const(parseResult.entries)) {          const CfgEntry::Choices &choices = entry->choices;          const QStringList values = entry->paramValues; @@ -246,7 +246,7 @@ void KConfigHeaderGenerator::createSignals()      stream() << whitespace() << "};" << Qt::dec << "\n\n";      stream() << "  Q_SIGNALS:"; -    for (const Signal &signal : qAsConst(parseResult.signalList)) { +    for (const Signal &signal : std::as_const(parseResult.signalList)) {          stream() << '\n';          if (!signal.label.isEmpty()) {              stream() << whitespace() << "/**\n"; @@ -261,7 +261,7 @@ void KConfigHeaderGenerator::createSignals()              Param argument = *it;              QString type = param(argument.type);              if (cfg().useEnumTypes && argument.type == QLatin1String("Enum")) { -                for (const auto *entry : qAsConst(parseResult.entries)) { +                for (const auto *entry : std::as_const(parseResult.entries)) {                      if (entry->name == argument.name) {                          type = enumType(entry, cfg().globalEnums);                          break; @@ -290,7 +290,7 @@ void KConfigHeaderGenerator::createDPointer()      // use a private class for both member variables and items      stream() << "  private:\n"; -    for (const auto *entry : qAsConst(parseResult.entries)) { +    for (const auto *entry : std::as_const(parseResult.entries)) {          if (cfg().allDefaultGetters || cfg().defaultGetters.contains(entry->name)) {              stream() << whitespace() << "";              if (cfg().staticAccessors) { @@ -327,7 +327,7 @@ void KConfigHeaderGenerator::createConstructor()      }      bool first = true; -    for (const auto ¶meter : qAsConst(parseResult.parameters)) { +    for (const auto ¶meter : std::as_const(parseResult.parameters)) {          if (first) {              first = false;          } else { @@ -587,7 +587,7 @@ void KConfigHeaderGenerator::createNonDPointerHelpers()      }      QString group; -    for (const auto *entry : qAsConst(parseResult.entries)) { +    for (const auto *entry : std::as_const(parseResult.entries)) {          if (entry->group != group) {              group = entry->group;              stream() << '\n'; @@ -614,7 +614,7 @@ void KConfigHeaderGenerator::createNonDPointerHelpers()      stream() << "\n  private:\n";      if (cfg().itemAccessors) { -        for (const auto *entry : qAsConst(parseResult.entries)) { +        for (const auto *entry : std::as_const(parseResult.entries)) {              stream() << whitespace() << "Item" << itemType(entry->type) << " *" << itemVar(entry, cfg());              if (!entry->param.isEmpty()) {                  stream() << QStringLiteral("[%1]").arg(entry->paramMax + 1); diff --git a/src/kconfig_compiler/KConfigSourceGenerator.cpp b/src/kconfig_compiler/KConfigSourceGenerator.cpp index e221d1ab..a8a05f4b 100644 --- a/src/kconfig_compiler/KConfigSourceGenerator.cpp +++ b/src/kconfig_compiler/KConfigSourceGenerator.cpp @@ -92,7 +92,7 @@ void KConfigSourceGenerator::createPrivateDPointerImplementation()      stream() << "  public:\n";      // Create Members -    for (const auto *entry : qAsConst(parseResult.entries)) { +    for (const auto *entry : std::as_const(parseResult.entries)) {          if (entry->group != group) {              group = entry->group;              stream() << '\n'; @@ -107,7 +107,7 @@ void KConfigSourceGenerator::createPrivateDPointerImplementation()      stream() << "\n    // items\n";      // Create Items. -    for (const auto *entry : qAsConst(parseResult.entries)) { +    for (const auto *entry : std::as_const(parseResult.entries)) {          const QString declType = entry->signalList.isEmpty() ? QString(cfg().inherits + QStringLiteral("::Item") + itemType(entry->type))                                                               : QStringLiteral("KConfigCompilerSignallingItem"); @@ -187,7 +187,7 @@ void KConfigSourceGenerator::createSingletonImplementation()  void KConfigSourceGenerator::createPreamble()  {      QString cppPreamble; -    for (const auto *entry : qAsConst(parseResult.entries)) { +    for (const auto *entry : std::as_const(parseResult.entries)) {          if (entry->paramValues.isEmpty()) {              continue;          } @@ -250,7 +250,7 @@ void KConfigSourceGenerator::createParentConstructorCall()  void KConfigSourceGenerator::createInitializerList()  { -    for (const auto ¶meter : qAsConst(parseResult.parameters)) { +    for (const auto ¶meter : std::as_const(parseResult.parameters)) {          stream() << "  , mParam" << parameter.name << "(" << parameter.name << ")\n";      } @@ -266,7 +266,7 @@ void KConfigSourceGenerator::createEnums(const CfgEntry *entry)      }      stream() << "  QList<" << cfg().inherits << "::ItemEnum::Choice> values" << entry->name << ";\n"; -    for (const auto &choice : qAsConst(entry->choices.choices)) { +    for (const auto &choice : std::as_const(entry->choices.choices)) {          stream() << "  {\n";          stream() << "    " << cfg().inherits << "::ItemEnum::Choice choice;\n";          stream() << "    choice.name = QStringLiteral(\"" << choice.name << "\");\n"; @@ -312,7 +312,7 @@ void KConfigSourceGenerator::createNormalEntry(const CfgEntry *entry, const QStr          stream() << "  " << itemVarStr << "->setWriteFlags(KConfigBase::Notify);\n";      } -    for (const CfgEntry::Choice &choice : qAsConst(entry->choices.choices)) { +    for (const CfgEntry::Choice &choice : std::as_const(entry->choices.choices)) {          if (!choice.val.isEmpty()) {              stream() << "  " << itemVarStr << "->setValueForChoice(QStringLiteral( \"" << choice.name << "\" ), QStringLiteral( \"" << choice.val << "\" ));\n";          } @@ -361,7 +361,7 @@ void KConfigSourceGenerator::createIndexedEntry(const CfgEntry *entry, const QSt              stream() << "  " << innerItemVarStr << "->setMaxValue(" << entry->max << ");\n";          } -        for (const CfgEntry::Choice &choice : qAsConst(entry->choices.choices)) { +        for (const CfgEntry::Choice &choice : std::as_const(entry->choices.choices)) {              if (!choice.val.isEmpty()) {                  stream() << "  " << itemVarStr << "->setValueForChoice(QStringLiteral( \"" << choice.name << "\" ), QStringLiteral( \"" << choice.val                           << "\" ));\n"; @@ -461,7 +461,7 @@ void KConfigSourceGenerator::doConstructor()          stream() << '\n';      } -    for (const auto *entry : qAsConst(parseResult.entries)) { +    for (const auto *entry : std::as_const(parseResult.entries)) {          handleCurrentGroupChange(entry);          const QString key = paramString(entry->key, parseResult.parameters); @@ -572,7 +572,7 @@ void KConfigSourceGenerator::doGetterSetterDPointerMode()      }      // setters and getters go in Cpp if in dpointer mode -    for (const auto *entry : qAsConst(parseResult.entries)) { +    for (const auto *entry : std::as_const(parseResult.entries)) {          createSetterDPointerMode(entry);          createGetterDPointerMode(entry);          createImmutableGetterDPointerMode(entry); @@ -584,7 +584,7 @@ void KConfigSourceGenerator::doGetterSetterDPointerMode()  void KConfigSourceGenerator::createDefaultValueGetterSetter()  {      // default value getters always go in Cpp -    for (const auto *entry : qAsConst(parseResult.entries)) { +    for (const auto *entry : std::as_const(parseResult.entries)) {          QString n = entry->name;          QString t = entry->type; @@ -627,7 +627,7 @@ void KConfigSourceGenerator::createNonModifyingSignalsHelper()      startScope();      stream() << "  const bool res = " << cfg().inherits << "::usrSave();\n";      stream() << "  if (!res) return false;\n\n"; -    for (const Signal &signal : qAsConst(parseResult.signalList)) { +    for (const Signal &signal : std::as_const(parseResult.signalList)) {          if (signal.modify) {              continue;          } @@ -682,7 +682,7 @@ void KConfigSourceGenerator::createSignalFlagsHandler()          stream() << '\n';      } -    for (const Signal &signal : qAsConst(parseResult.signalList)) { +    for (const Signal &signal : std::as_const(parseResult.signalList)) {          if (signal.modify) {              stream() << "  if ( flags & " << signalEnumName(signal.name) << " ) {\n";              stream() << "    Q_EMIT " << signal.name << "();\n"; diff --git a/src/kconfig_compiler/kconfig_compiler.cpp b/src/kconfig_compiler/kconfig_compiler.cpp index 761e64fc..fb7e7a68 100644 --- a/src/kconfig_compiler/kconfig_compiler.cpp +++ b/src/kconfig_compiler/kconfig_compiler.cpp @@ -773,7 +773,7 @@ int main(int argc, char **argv)      }      // TODO: Move this to somewhere saner. -    for (const auto &signal : qAsConst(parseResult.signalList)) { +    for (const auto &signal : std::as_const(parseResult.signalList)) {          parseResult.hasNonModifySignals |= !signal.modify;      } | 
