From 56582e8c06ad0fb29e252a72a904bf481dd9e2c6 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Thu, 7 Feb 2013 10:42:24 +0100 Subject: SDKtool: Fix return values and improve error reporting Change-Id: I1a44a39d5cd96be48608fdb4fab252a51046971e Reviewed-by: David Faure --- src/tools/sdktool/addkitoperation.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/tools/sdktool/addkitoperation.cpp') 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 of the new kit.\n" - " --name display name of the new kit.\n" + return QLatin1String(" --id id of the new kit (required).\n" + " --name display name of the new kit (required).\n" " --icon icon of the new kit.\n" " --debuggerengine debuggerengine of the new kit.\n" " --debugger debugger of the new kit.\n" - " --devicetype device type of the new kit.\n" + " --devicetype device type of the new kit (required).\n" " --sysroot sysroot of the new kit.\n" " --toolchain tool chain of the new kit.\n" " --qt 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(); } -- cgit v1.2.1