forked from qt-creator/qt-creator
CMakePM: fix optional check
Change-Id: I4145b1f29a63bd69fefb0385aff92c6a23939b5f Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -673,8 +673,7 @@ bool CMakeBuildSystem::addSrcFiles(Node *context, const FilePaths &filePaths, Fi
|
||||
};
|
||||
// Special case: when qt_add_executable and qt_add_qml_module use the same target name
|
||||
// then qt_add_qml_module function should be used
|
||||
if (auto preferred = findFunction(*cmakeListFile, qtAddModule); !preferred.has_value())
|
||||
function = preferred;
|
||||
function = findFunction(*cmakeListFile, qtAddModule).value_or(*function);
|
||||
|
||||
const QString newSourceFiles = newFilesForFunction(function->LowerCaseName(),
|
||||
filePaths,
|
||||
|
||||
Reference in New Issue
Block a user