forked from qt-creator/qt-creator
CMake: Add VariableChooser to cmake configuration setup widget
Add a VariableChooser to the configuration widget of a kit's cmake configuration. Change-Id: I4096905b831b069a26779fdb16fbede218d69a92 Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com> Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -30,6 +30,7 @@
|
|||||||
#include "cmaketool.h"
|
#include "cmaketool.h"
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
#include <coreplugin/variablechooser.h>
|
||||||
#include <projectexplorer/kit.h>
|
#include <projectexplorer/kit.h>
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
|
|
||||||
@@ -344,6 +345,10 @@ void CMakeConfigurationKitConfigWidget::editConfigurationChanges()
|
|||||||
"separated from the variable value by \"=\".<br>"
|
"separated from the variable value by \"=\".<br>"
|
||||||
"You may provide a type hint by adding \":TYPE\" before the \"=\"."));
|
"You may provide a type hint by adding \":TYPE\" before the \"=\"."));
|
||||||
|
|
||||||
|
auto chooser = new Core::VariableChooser(m_dialog);
|
||||||
|
chooser->addSupportedWidget(m_editor);
|
||||||
|
chooser->addMacroExpanderProvider([this]() { return kit()->macroExpander(); });
|
||||||
|
|
||||||
auto buttons = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Apply
|
auto buttons = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Apply
|
||||||
|QDialogButtonBox::Reset|QDialogButtonBox::Cancel);
|
|QDialogButtonBox::Reset|QDialogButtonBox::Cancel);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user