VariableManager: Allow variables that are triggered by a prefix

E.g. "Env:<some environment var>".

Remove the special handling for the "Env:" varibale that was coded
into the VaribaleManager.

Change-Id: If8b074b66eeaa97903b41634f9a3c86dd73087d4
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Tobias Hunger
2014-09-12 12:57:00 +02:00
parent c7703600be
commit c8db57e663
2 changed files with 48 additions and 10 deletions

View File

@@ -51,10 +51,13 @@ public:
static QString expandedString(const QString &stringWithVariables);
static Utils::AbstractMacroExpander *macroExpander();
typedef std::function<QString(QString)> PrefixFunction;
typedef std::function<QString()> StringFunction;
typedef std::function<int()> IntFunction;
static void registerPrefix(const QByteArray &prefix,
const QString &description, const PrefixFunction &value);
static void registerVariable(const QByteArray &variable,
const QString &description, const StringFunction &value);