CMakePM: Add options link to the CMake offline/online documentation

This way a user can quickly find out which options can be used.

Change-Id: I6347759689a4a1431a82ff9414da0c79e357eb45
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Cristian Adam
2022-02-03 16:12:41 +01:00
parent da95472eb7
commit 68cb80f276
6 changed files with 53 additions and 4 deletions

View File

@@ -942,7 +942,12 @@ private:
m_additionalEditor = new QLineEdit;
auto additionalLabel = new QLabel(m_dialog);
additionalLabel->setText(tr("Additional CMake options: "));
additionalLabel->setText(tr("Additional CMake <a href=\"options\">options</a>:"));
connect(additionalLabel, &QLabel::linkActivated, this, [this](const QString &link) {
const CMakeTool *tool = CMakeKitAspect::cmakeTool(kit());
if (tool)
tool->openCMakeHelpUrl("%1/manual/cmake.1.html#options");
});
auto additionalChooser = new VariableChooser(m_dialog);
additionalChooser->addSupportedWidget(m_additionalEditor);