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:
@@ -57,11 +57,18 @@ bool FindValueOperation::setArguments(const QStringList &args)
|
||||
}
|
||||
|
||||
QVariant v = Operation::valueFromString(current);
|
||||
if (!v.isValid())
|
||||
if (!v.isValid()) {
|
||||
std::cerr << "Value for key '" << qPrintable(current) << "' is not valid." << std::endl << std::endl;
|
||||
return false;
|
||||
}
|
||||
m_values << v;
|
||||
}
|
||||
|
||||
if (m_file.isEmpty())
|
||||
std::cerr << "No file given." << std::endl << std::endl;
|
||||
if (m_values.isEmpty())
|
||||
std::cerr << "No values given." << std::endl << std::endl;
|
||||
|
||||
return (!m_file.isEmpty() && !m_values.isEmpty());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user