forked from qt-creator/qt-creator
SDKTool: Allow for explicitly unsetting Qt in addKitOperation
Treat a empty string passed in as argument to --qt as "No Qt" by forcing that to "-1". Fixes: QTCREATORBUG-23168 Change-Id: I03c536d0cc0f7bc2ad291a2bbcc5297df509b524 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -602,6 +602,11 @@ QVariantMap AddKitOperation::addKit(const QVariantMap &map, const QVariantMap &t
|
||||
std::cerr << "Error: Device " << qPrintable(device) << " does not exist." << std::endl;
|
||||
return QVariantMap();
|
||||
}
|
||||
|
||||
// Treat a qt that was explicitly set to '' as "no Qt"
|
||||
if (!qtId.isNull() && qtId.isEmpty())
|
||||
qtId = "-1";
|
||||
|
||||
if (!cmakeId.isEmpty() && !AddCMakeOperation::exists(cmakeMap, cmakeId)) {
|
||||
std::cerr << "Error: CMake tool " << qPrintable(cmakeId) << " does not exist." << std::endl;
|
||||
return QVariantMap();
|
||||
|
||||
Reference in New Issue
Block a user