summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@digia.com>2013-05-16 15:47:47 +0200
committerTobias Hunger <tobias.hunger@digia.com>2013-05-17 12:33:58 +0200
commit4bb73adad6e510e7c7db6df3d3c622c4c6baa6d3 (patch)
tree69ff720a9c5bf28f638fa5f2c1075e919ea02d0e /src/tools
parent6c928b3305b17493aad6dd2cd1c56955efc89539 (diff)
downloadqt-creator-4bb73adad6e510e7c7db6df3d3c622c4c6baa6d3.tar.gz
sdktool: Add operations: Fix adding to a empty map, check the right map
Change-Id: Iddcf85d3a19bed28baa9bd4c5f964c370f8c9c42 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/sdktool/addkeysoperation.cpp2
-rw-r--r--src/tools/sdktool/addkitoperation.cpp2
-rw-r--r--src/tools/sdktool/addqtoperation.cpp2
-rw-r--r--src/tools/sdktool/addtoolchainoperation.cpp2
-rw-r--r--src/tools/sdktool/rmkitoperation.cpp2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/sdktool/addkeysoperation.cpp b/src/tools/sdktool/addkeysoperation.cpp
index eea188db9a..41fc91ba69 100644
--- a/src/tools/sdktool/addkeysoperation.cpp
+++ b/src/tools/sdktool/addkeysoperation.cpp
@@ -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:
diff --git a/src/tools/sdktool/addkitoperation.cpp b/src/tools/sdktool/addkitoperation.cpp
index 33486f3981..40c8b694a3 100644
--- a/src/tools/sdktool/addkitoperation.cpp
+++ b/src/tools/sdktool/addkitoperation.cpp
@@ -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;
diff --git a/src/tools/sdktool/addqtoperation.cpp b/src/tools/sdktool/addqtoperation.cpp
index 5fa0b47298..5e8b6ad7c7 100644
--- a/src/tools/sdktool/addqtoperation.cpp
+++ b/src/tools/sdktool/addqtoperation.cpp
@@ -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;
diff --git a/src/tools/sdktool/addtoolchainoperation.cpp b/src/tools/sdktool/addtoolchainoperation.cpp
index 0eeeb8dfde..2d19d932d2 100644
--- a/src/tools/sdktool/addtoolchainoperation.cpp
+++ b/src/tools/sdktool/addtoolchainoperation.cpp
@@ -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;
diff --git a/src/tools/sdktool/rmkitoperation.cpp b/src/tools/sdktool/rmkitoperation.cpp
index 31d9537332..fe677ea433 100644
--- a/src/tools/sdktool/rmkitoperation.cpp
+++ b/src/tools/sdktool/rmkitoperation.cpp
@@ -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;