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:
@@ -59,8 +59,10 @@ bool AddKeysOperation::setArguments(const QStringList &args)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (next.isNull())
|
||||
if (next.isNull()) {
|
||||
std::cerr << "Missing value for key '" << qPrintable(current) << "'." << std::endl << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
++i;
|
||||
KeyValuePair pair(current, next);
|
||||
@@ -81,10 +83,10 @@ int AddKeysOperation::execute() const
|
||||
|
||||
map = addKeys(map, m_data);
|
||||
if (map.isEmpty())
|
||||
return 1;
|
||||
return -4;
|
||||
|
||||
// Write data again:
|
||||
return save(map, m_file) ? 0 : 2;
|
||||
return save(map, m_file) ? 0 : -5;
|
||||
}
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
|
||||
Reference in New Issue
Block a user