forked from qt-creator/qt-creator
CMakePM: Add "generator" link to the kit's CMake settings
This way the user can access all the details from the CMake's generator documentation. Change-Id: I90990bf7ec0062122bc3f32d611e19da8f5f9afc Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -352,6 +352,11 @@ public:
|
||||
m_label(createSubWidget<ElidingLabel>()),
|
||||
m_changeButton(createSubWidget<QPushButton>())
|
||||
{
|
||||
const CMakeTool *tool = CMakeKitAspect::cmakeTool(kit);
|
||||
connect(this, &KitAspectWidget::labelLinkActivated, this, [=](const QString &link) {
|
||||
CMakeTool::openCMakeHelpUrl(tool, "%1/manual/cmake-generators.7.html");
|
||||
});
|
||||
|
||||
m_label->setToolTip(ki->description());
|
||||
m_changeButton->setText(tr("Change..."));
|
||||
refresh();
|
||||
@@ -561,7 +566,7 @@ CMakeGeneratorKitAspect::CMakeGeneratorKitAspect()
|
||||
{
|
||||
setObjectName(QLatin1String("CMakeGeneratorKitAspect"));
|
||||
setId(GENERATOR_ID);
|
||||
setDisplayName(tr("CMake generator"));
|
||||
setDisplayName(tr("CMake <a href=\"generator\">generator</a>"));
|
||||
setDescription(tr("CMake generator defines how a project is built when using CMake.<br>"
|
||||
"This setting is ignored when using other build systems."));
|
||||
setPriority(19000);
|
||||
|
@@ -755,6 +755,9 @@ void KitAspectWidget::addToLayoutWithLabel(QWidget *parent)
|
||||
QTC_ASSERT(parent, return);
|
||||
auto label = createSubWidget<QLabel>(m_kitInformation->displayName() + ':');
|
||||
label->setToolTip(m_kitInformation->description());
|
||||
connect(label, &QLabel::linkActivated, this, [this](const QString &link) {
|
||||
emit labelLinkActivated(link);
|
||||
});
|
||||
|
||||
LayoutExtender builder(parent->layout());
|
||||
builder.finishRow();
|
||||
|
Reference in New Issue
Block a user