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:
Tobias Hunger
2016-04-11 15:27:27 +02:00
parent 3e30319634
commit badd6d0125

View File

@@ -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);