forked from qt-creator/qt-creator
CMakePM: Update generator label in Kit's CMake settings
Now only the parts of the generator that have a value are displayed. Previously the label had "<none>" for the missing values. Change-Id: I666bd04c94c47410ee71912dc0cebbcc6c6c79d2 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -396,12 +396,18 @@ private:
|
|||||||
const QString platform = CMakeGeneratorKitAspect::platform(kit());
|
const QString platform = CMakeGeneratorKitAspect::platform(kit());
|
||||||
const QString toolset = CMakeGeneratorKitAspect::toolset(kit());
|
const QString toolset = CMakeGeneratorKitAspect::toolset(kit());
|
||||||
|
|
||||||
const QString message = tr("%1 - %2, Platform: %3, Toolset: %4")
|
QStringList messageLabel;
|
||||||
.arg(extraGenerator.isEmpty() ? tr("<none>") : extraGenerator)
|
if (!extraGenerator.isEmpty())
|
||||||
.arg(generator.isEmpty() ? tr("<none>") : generator)
|
messageLabel << extraGenerator << " - ";
|
||||||
.arg(platform.isEmpty() ? tr("<none>") : platform)
|
|
||||||
.arg(toolset.isEmpty() ? tr("<none>") : toolset);
|
messageLabel << generator;
|
||||||
m_label->setText(message);
|
|
||||||
|
if (!platform.isEmpty())
|
||||||
|
messageLabel << ", " << tr("Platform") << ": " << platform;
|
||||||
|
if (!toolset.isEmpty())
|
||||||
|
messageLabel << ", " << tr("Toolset") << ": " << toolset;
|
||||||
|
|
||||||
|
m_label->setText(messageLabel.join(""));
|
||||||
}
|
}
|
||||||
|
|
||||||
void changeGenerator()
|
void changeGenerator()
|
||||||
@@ -495,6 +501,8 @@ private:
|
|||||||
extraGeneratorCombo->currentData().toString(),
|
extraGeneratorCombo->currentData().toString(),
|
||||||
platformEdit->isEnabled() ? platformEdit->text() : QString(),
|
platformEdit->isEnabled() ? platformEdit->text() : QString(),
|
||||||
toolsetEdit->isEnabled() ? toolsetEdit->text() : QString());
|
toolsetEdit->isEnabled() ? toolsetEdit->text() : QString());
|
||||||
|
|
||||||
|
refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user