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 <>
parent 0d9e4b74
......@@ -764,7 +764,9 @@ bool Target::fromMap(const QVariantMap &map)
QVariantMap valueMap = map.value(key).toMap();
DeployConfigurationFactory *factory = DeployConfigurationFactory::find(this, valueMap);
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"));
DeployConfiguration *dc = factory->restore(this, valueMap);
......@@ -795,7 +797,7 @@ bool Target::fromMap(const QVariantMap &map)
// Ignore missing RCs: We will just populate them using the default ones.
QVariantMap valueMap = map.value(key).toMap();
IRunConfigurationFactory *factory = IRunConfigurationFactory::find(this, valueMap);
if (!factory || !factory->canRestore(this, valueMap))
if (!factory)
RunConfiguration *rc = factory->restore(this, valueMap);
if (!rc)
Supports Markdown
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