diff options
| author | Christian Kandeler <christian.kandeler@digia.com> | 2013-08-12 12:17:04 +0200 |
|---|---|---|
| committer | Christian Kandeler <christian.kandeler@digia.com> | 2013-08-13 12:13:01 +0200 |
| commit | 6baa3dc6928006ee11b6526997630ff981c08d6c (patch) | |
| tree | e2b1ace45a2a68e9e19c8ca813e749afc1ba7d4e /src/lib/buildgraph/buildgraph.cpp | |
| parent | ff753cd4b0968f7c54932caecef6fbbd3142da46 (diff) | |
| download | qbs-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/buildgraph.cpp')
| -rw-r--r-- | src/lib/buildgraph/buildgraph.cpp | 5 |
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); } |
