summaryrefslogtreecommitdiff
path: root/src/tools/sdktool/addkitoperation.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@digia.com>2013-02-07 10:42:24 +0100
committerTobias Hunger <tobias.hunger@digia.com>2013-02-07 12:16:45 +0100
commit56582e8c06ad0fb29e252a72a904bf481dd9e2c6 (patch)
tree68608d46cf81b10e4d287ebf9866d9b98a58e23d /src/tools/sdktool/addkitoperation.cpp
parentc8a34f05a059941a88725268246c3301c673a8fe (diff)
downloadqt-creator-56582e8c06ad0fb29e252a72a904bf481dd9e2c6.tar.gz
SDKtool: Fix return values and improve error reporting
Change-Id: I1a44a39d5cd96be48608fdb4fab252a51046971e Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/tools/sdktool/addkitoperation.cpp')
-rw-r--r--src/tools/sdktool/addkitoperation.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/tools/sdktool/addkitoperation.cpp b/src/tools/sdktool/addkitoperation.cpp
index 92982ee85f..499f2280f5 100644
--- a/src/tools/sdktool/addkitoperation.cpp
+++ b/src/tools/sdktool/addkitoperation.cpp
@@ -80,12 +80,12 @@ QString AddKitOperation::helpText() const
QString AddKitOperation::argumentsHelpText() const
{
- return QLatin1String(" --id <ID> id of the new kit.\n"
- " --name <NAME> display name of the new kit.\n"
+ return QLatin1String(" --id <ID> id of the new kit (required).\n"
+ " --name <NAME> display name of the new kit (required).\n"
" --icon <PATH> icon of the new kit.\n"
" --debuggerengine <ENGINE> debuggerengine of the new kit.\n"
" --debugger <PATH> debugger of the new kit.\n"
- " --devicetype <TYPE> device type of the new kit.\n"
+ " --devicetype <TYPE> device type of the new kit (required).\n"
" --sysroot <PATH> sysroot of the new kit.\n"
" --toolchain <ID> tool chain of the new kit.\n"
" --qt <ID> Qt of the new kit.\n"
@@ -198,6 +198,13 @@ bool AddKitOperation::setArguments(const QStringList &args)
if (m_icon.isEmpty())
m_icon = QLatin1String(":///DESKTOP///");
+ if (m_id.isEmpty())
+ std::cerr << "No id given for kit." << std::endl << std::endl;
+ if (m_displayName.isEmpty())
+ std::cerr << "No name given for kit." << std::endl << std::endl;
+ if (m_deviceType.isEmpty())
+ std::cerr << "No devicetype given for kit." << std::endl << std::endl;
+
return !m_id.isEmpty() && !m_displayName.isEmpty() && !m_deviceType.isEmpty();
}