Commit 7315f6cd authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Target: Simplify code a bit and fix a possible qWarning



Change-Id: Idb4f7a39221fd3147d3e1ff1001b327532870c08
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 0d9e4b74
...@@ -764,7 +764,9 @@ bool Target::fromMap(const QVariantMap &map) ...@@ -764,7 +764,9 @@ bool Target::fromMap(const QVariantMap &map)
QVariantMap valueMap = map.value(key).toMap(); QVariantMap valueMap = map.value(key).toMap();
DeployConfigurationFactory *factory = DeployConfigurationFactory::find(this, valueMap); DeployConfigurationFactory *factory = DeployConfigurationFactory::find(this, valueMap);
if (!factory) { if (!factory) {
qWarning("No factory found to restore deployment configuration!"); Core::Id id = idFromMap(valueMap);
qWarning("No factory found to restore deployment configuration of id '%s'!",
qPrintable(id.isValid() ? id.toString() : "UNKNOWN"));
continue; continue;
} }
DeployConfiguration *dc = factory->restore(this, valueMap); DeployConfiguration *dc = factory->restore(this, valueMap);
...@@ -795,7 +797,7 @@ bool Target::fromMap(const QVariantMap &map) ...@@ -795,7 +797,7 @@ bool Target::fromMap(const QVariantMap &map)
// Ignore missing RCs: We will just populate them using the default ones. // Ignore missing RCs: We will just populate them using the default ones.
QVariantMap valueMap = map.value(key).toMap(); QVariantMap valueMap = map.value(key).toMap();
IRunConfigurationFactory *factory = IRunConfigurationFactory::find(this, valueMap); IRunConfigurationFactory *factory = IRunConfigurationFactory::find(this, valueMap);
if (!factory || !factory->canRestore(this, valueMap)) if (!factory)
continue; continue;
RunConfiguration *rc = factory->restore(this, valueMap); RunConfiguration *rc = factory->restore(this, valueMap);
if (!rc) if (!rc)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment