diff --git a/src/core/kconfigwatcher.cpp b/src/core/kconfigwatcher.cpp index 1aec121..4d4d135 100644 --- a/src/core/kconfigwatcher.cpp +++ b/src/core/kconfigwatcher.cpp @@ -70,7 +70,7 @@ KConfigWatcher::KConfigWatcher(const KSharedConfig::Ptr &config): QStringList watchedPaths; watchedPaths << QLatin1Char('/') + d->m_config->name(); - for (const QString file: d->m_config->additionalConfigSources()) { + for (const QString &file: d->m_config->additionalConfigSources()) { watchedPaths << QLatin1Char('/') + file; } if (d->m_config->openFlags() & KConfig::IncludeGlobals) { diff --git a/src/core/kcoreconfigskeleton.cpp b/src/core/kcoreconfigskeleton.cpp index 2d8048a..b3eb001 100644 --- a/src/core/kcoreconfigskeleton.cpp +++ b/src/core/kcoreconfigskeleton.cpp @@ -1009,7 +1009,7 @@ KCoreConfigSkeleton::KCoreConfigSkeleton(KSharedConfig::Ptr pConfig, QObject *pa d(new KCoreConfigSkeletonPrivate) { //qDebug() << "Creating KCoreConfigSkeleton (" << (void *)this << ")"; - d->mConfig = pConfig; + d->mConfig = std::move(pConfig); } KCoreConfigSkeleton::~KCoreConfigSkeleton() @@ -1044,7 +1044,7 @@ KSharedConfig::Ptr KCoreConfigSkeleton::sharedConfig() const void KCoreConfigSkeleton::setSharedConfig(KSharedConfig::Ptr pConfig) { - d->mConfig = pConfig; + d->mConfig = std::move(pConfig); } KConfigSkeletonItem::List KCoreConfigSkeleton::items() const diff --git a/src/gui/kconfigloader.cpp b/src/gui/kconfigloader.cpp index 63a5bc6..63d3ff6 100644 --- a/src/gui/kconfigloader.cpp +++ b/src/gui/kconfigloader.cpp @@ -367,7 +367,7 @@ KConfigLoader::KConfigLoader(const QString &configFile, QIODevice *xml, QObject } KConfigLoader::KConfigLoader(KSharedConfigPtr config, QIODevice *xml, QObject *parent) - : KConfigSkeleton(config, parent), + : KConfigSkeleton(std::move(config), parent), d(new ConfigLoaderPrivate) { d->parse(this, xml); diff --git a/src/gui/kconfigskeleton.cpp b/src/gui/kconfigskeleton.cpp index 22f3c25..25ab875 100644 --- a/src/gui/kconfigskeleton.cpp +++ b/src/gui/kconfigskeleton.cpp @@ -29,7 +29,7 @@ KConfigSkeleton::KConfigSkeleton(const QString &configname, QObject *parent) } KConfigSkeleton::KConfigSkeleton(KSharedConfig::Ptr pConfig, QObject *parent) - : KCoreConfigSkeleton(pConfig, parent) + : KCoreConfigSkeleton(std::move(pConfig), parent) { } diff --git a/src/kconfig_compiler/kconfig_compiler.cpp b/src/kconfig_compiler/kconfig_compiler.cpp index 349afee..4c823f7 100644 --- a/src/kconfig_compiler/kconfig_compiler.cpp +++ b/src/kconfig_compiler/kconfig_compiler.cpp @@ -2330,7 +2330,7 @@ int main(int argc, char **argv) cpp << "}" << endl << endl; if (cfgFileNameArg) { - auto instance = [&cfg, &cpp] (const QString &type, const QString arg, bool wrap) { + auto instance = [&cfg, &cpp] (const QString &type, const QString &arg, bool wrap) { cpp << "void " << cfg.className << "::instance(" << type << " " << arg << ")" << endl; cpp << "{" << endl; cpp << " if (s_global" << cfg.className << "()->q) {" << endl;