forked from qt-creator/qt-creator
VariableChooser: Rework
Allow multiple expanders to be registered for lineedits, e.g. a local and the global ones, and actually show them. Use a tree view in the chooser for somewhat more structured display. Change-Id: I769f92144e5249f45e54381de52aa6973eb20118 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
@@ -39,11 +39,13 @@
|
||||
|
||||
#include <coreplugin/iversioncontrol.h>
|
||||
#include <coreplugin/mimedatabase.h>
|
||||
#include <coreplugin/variablemanager.h>
|
||||
#include <coreplugin/vcsmanager.h>
|
||||
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
|
||||
#include <utils/macroexpander.h>
|
||||
|
||||
#include <QtPlugin>
|
||||
#include <QDebug>
|
||||
|
||||
@@ -87,7 +89,7 @@ bool VcsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
this, SLOT(slotSettingsChanged()));
|
||||
slotSettingsChanged();
|
||||
|
||||
Utils::MacroExpander *expander = globalMacroExpander();
|
||||
Utils::MacroExpander *expander = Utils::globalMacroExpander();
|
||||
expander->registerVariable(Constants::VAR_VCS_NAME,
|
||||
tr("Name of the version control system in use by the current project."),
|
||||
[]() -> QString {
|
||||
|
||||
Reference in New Issue
Block a user