forked from qt-creator/qt-creator
CMakePM: PE: Hide (imported) suffix for buildtype names
Amends 67d2299596
CMake Presets are implemented on top of build import functionality in Qt
Creator, since this can create kits / compilers etc.
But these build imports are artificial and should not be marked as
(imported) since this is something that Qt Creator does and not done by
the users.
Change-Id: I2ddf75d6fb3e4726f45b7431cacafc65f89bc39d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -1227,6 +1227,9 @@ const QList<BuildInfo> CMakeProjectImporter::buildInfoList(void *directoryData)
|
||||
config.insert(Constants::QML_DEBUG_SETTING,
|
||||
data->hasQmlDebugging ? TriState::Enabled.toVariant()
|
||||
: TriState::Default.toVariant());
|
||||
if (!data->cmakePreset.isEmpty())
|
||||
config["hideImportedSuffix"] = true;
|
||||
|
||||
info.extraInfo = config;
|
||||
|
||||
qCDebug(cmInputLog) << "BuildInfo configured.";
|
||||
|
@@ -143,7 +143,9 @@ const QList<BuildInfo> ProjectImporter::import(const Utils::FilePath &importPath
|
||||
continue;
|
||||
}
|
||||
for (BuildInfo i : infoList) {
|
||||
i.displayName = Tr::tr("%1 (imported)").arg(i.displayName);
|
||||
const QVariantMap extraInfo = i.extraInfo.toMap();
|
||||
if (!extraInfo["hideImportedSuffix"].toBool())
|
||||
i.displayName = Tr::tr("%1 (imported)").arg(i.displayName);
|
||||
i.kitId = k->id();
|
||||
i.factory = factory;
|
||||
if (!result.contains(i))
|
||||
|
Reference in New Issue
Block a user