summaryrefslogtreecommitdiff
path: root/src/lib/buildgraph
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2013-08-12 12:17:04 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2013-08-13 12:13:01 +0200
commit6baa3dc6928006ee11b6526997630ff981c08d6c (patch)
treee2b1ace45a2a68e9e19c8ca813e749afc1ba7d4e /src/lib/buildgraph
parentff753cd4b0968f7c54932caecef6fbbd3142da46 (diff)
downloadqbs-6baa3dc6928006ee11b6526997630ff981c08d6c.tar.gz
Remove redundant check when setting up properties.
We only want to prevent the modules property from being exported, so let's just say that. Change-Id: I6d9ccfaf72cf0b9de4bc9d435b633dc659f57f95 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/buildgraph')
-rw-r--r--src/lib/buildgraph/buildgraph.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/buildgraph/buildgraph.cpp b/src/lib/buildgraph/buildgraph.cpp
index d382384be..4be34c644 100644
--- a/src/lib/buildgraph/buildgraph.cpp
+++ b/src/lib/buildgraph/buildgraph.cpp
@@ -114,8 +114,7 @@ private:
= propertyMap.value(QLatin1String("modules")).toMap().value(moduleName).toMap();
for (QVariantMap::ConstIterator it = propMap.constBegin(); it != propMap.constEnd(); ++it) {
const QVariant &value = it.value();
- if (value.isValid()
- && (!value.canConvert<QVariantMap>() || it.key() != QLatin1String("modules")))
+ if (value.isValid() && it.key() != QLatin1String("modules"))
moduleScriptValue.setProperty(it.key(), engine->toScriptValue(value));
}
QScriptValue depfunc = engine->newFunction(&js_moduleDependencies);
@@ -153,7 +152,7 @@ static void setupProductScriptValue(ScriptEngine *engine, QScriptValue &productS
const QVariantMap &propMap = product->properties->value();
for (QVariantMap::ConstIterator it = propMap.constBegin(); it != propMap.constEnd(); ++it) {
const QVariant &value = it.value();
- if (!value.canConvert<QVariantMap>() || it.key() != QLatin1String("modules")) {
+ if (it.key() != QLatin1String("modules")) {
engine->setObservedProperty(productScriptValue, it.key(),
engine->toScriptValue(value), observer);
}