Commit 4bb73ada authored by Daniel Teske's avatar Daniel Teske Committed by Tobias Hunger

sdktool: Add operations: Fix adding to a empty map, check the right map

Change-Id: Iddcf85d3a19bed28baa9bd4c5f964c370f8c9c42
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 6c928b33
......@@ -82,7 +82,7 @@ int AddKeysOperation::execute() const
QVariantMap map = load(m_file);
QVariantMap result = addKeys(map, m_data);
if (map.isEmpty() || map == result)
if (result.isEmpty() || map == result)
return -4;
// Write data again:
......
......@@ -218,7 +218,7 @@ int AddKitOperation::execute() const
QVariantMap result = addKit(map, m_id, m_displayName, m_icon, m_debuggerEngine, m_debugger,
m_deviceType.toUtf8(), m_sysRoot, m_tc, m_qt, m_mkspec, m_extra);
if (map.isEmpty() || map == result)
if (result.isEmpty() || map == result)
return -2;
return save(result, QLatin1String("profiles")) ? 0 : -3;
......
......@@ -154,7 +154,7 @@ int AddQtOperation::execute() const
QVariantMap result = addQt(map, m_id, m_displayName, m_type, m_qmake, m_extra);
if (map.isEmpty() || result == map)
if (result.isEmpty() || result == map)
return -2;
return save(result, QLatin1String("qtversions")) ? 0 : -3;
......
......@@ -150,7 +150,7 @@ int AddToolChainOperation::execute() const
map = initializeToolChains();
QVariantMap result = addToolChain(map, m_id, m_displayName, m_path, m_targetAbi, m_supportedAbis, m_extra);
if (map.isEmpty() || map == result)
if (result.isEmpty() || map == result)
return -2;
return save(result, QLatin1String("toolchains")) ? 0 : -3;
......
......@@ -89,7 +89,7 @@ int RmKitOperation::execute() const
QVariantMap result = rmKit(map, m_id);
if (result.isEmpty() || result == map)
if (result == map)
return -2;
return save(result, QLatin1String("profiles")) ? 0 : -3;
......
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