forked from qt-creator/qt-creator
SDKtool: Fix return values and improve error reporting
Change-Id: I1a44a39d5cd96be48608fdb4fab252a51046971e Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
@@ -66,14 +66,19 @@ bool RmQtOperation::setArguments(const QStringList &args)
|
||||
const QString next = ((i + 1) < args.count()) ? args.at(i + 1) : QString();
|
||||
|
||||
if (current == QLatin1String("--id")) {
|
||||
if (next.isNull())
|
||||
if (next.isNull()) {
|
||||
std::cerr << "No parameter for --id given." << std::endl << std::endl;
|
||||
return false;
|
||||
}
|
||||
++i; // skip next;
|
||||
m_id = next;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_id.isEmpty())
|
||||
std::cerr << "No id given." << std::endl << std::endl;
|
||||
|
||||
return !m_id.isEmpty();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user