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:
		@@ -51,12 +51,12 @@
 | 
			
		||||
#include <coreplugin/documentmanager.h>
 | 
			
		||||
#include <coreplugin/icore.h>
 | 
			
		||||
#include <coreplugin/jsexpander.h>
 | 
			
		||||
#include <coreplugin/variablemanager.h>
 | 
			
		||||
#include <coreplugin/vcsmanager.h>
 | 
			
		||||
#include <cppeditor/cppeditorconstants.h>
 | 
			
		||||
 | 
			
		||||
#include <utils/fileutils.h>
 | 
			
		||||
#include <utils/hostosinfo.h>
 | 
			
		||||
#include <utils/macroexpander.h>
 | 
			
		||||
#include <utils/qtcassert.h>
 | 
			
		||||
 | 
			
		||||
#include <QtPlugin>
 | 
			
		||||
@@ -191,7 +191,7 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
 | 
			
		||||
    mcpptools->addAction(command);
 | 
			
		||||
    connect(openInNextSplitAction, SIGNAL(triggered()), this, SLOT(switchHeaderSourceInNextSplit()));
 | 
			
		||||
 | 
			
		||||
    Utils::MacroExpander *expander = globalMacroExpander();
 | 
			
		||||
    Utils::MacroExpander *expander = Utils::globalMacroExpander();
 | 
			
		||||
    expander->registerVariable("Cpp:LicenseTemplate",
 | 
			
		||||
                               tr("The license template."),
 | 
			
		||||
                               [this]() { return CppToolsPlugin::licenseTemplate(); });
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user