aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-09-05 14:38:22 +0200
committerIvan Komissarov <ABBAPOH@gmail.com>2020-09-07 09:13:37 +0000
commita4eda429e24fc3bc0e9d2bf25d8a22cd7d51a3ce (patch)
treef98e186d77b6cebb2711cb28b6bb92a17d89dfb9 /src
parente64ad82de3130178aa21e1945aebe05e22f2bae8 (diff)
Use auto when iterating in getModulePrototype()
Change-Id: Idcbcfc937271105b06e1c6dae84243a4e165e41e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/lib/corelib/language/moduleloader.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/lib/corelib/language/moduleloader.cpp b/src/lib/corelib/language/moduleloader.cpp
index d099c72a9..32d431386 100644
--- a/src/lib/corelib/language/moduleloader.cpp
+++ b/src/lib/corelib/language/moduleloader.cpp
@@ -3332,18 +3332,16 @@ Item *ModuleLoader::getModulePrototype(ProductContext *productContext,
// This is the reason we need to have different items per profile.
const QVariantMap profileModuleProperties
= productContext->moduleProperties.value(fullModuleName).toMap();
- for (QVariantMap::const_iterator vmit = profileModuleProperties.begin();
- vmit != profileModuleProperties.end(); ++vmit)
- {
- if (Q_UNLIKELY(!module->hasProperty(vmit.key()))) {
+ for (auto it = profileModuleProperties.cbegin(); it != profileModuleProperties.cend(); ++it) {
+ if (Q_UNLIKELY(!module->hasProperty(it.key()))) {
productContext->unknownProfilePropertyErrors[module].emplace_back
- (Tr::tr("Unknown property: %1.%2").arg(fullModuleName, vmit.key()));
+ (Tr::tr("Unknown property: %1.%2").arg(fullModuleName, it.key()));
continue;
}
- const PropertyDeclaration decl = module->propertyDeclaration(vmit.key());
- VariantValuePtr v = VariantValue::create(convertToPropertyType(vmit.value(), decl.type(),
- QStringList(fullModuleName), vmit.key()));
- module->setProperty(vmit.key(), v);
+ const PropertyDeclaration decl = module->propertyDeclaration(it.key());
+ VariantValuePtr v = VariantValue::create(convertToPropertyType(it.value(), decl.type(),
+ QStringList(fullModuleName), it.key()));
+ module->setProperty(it.key(), v);
}
return module;