forked from qt-creator/qt-creator
Allow for variable replacement in build directory and build arguments
of a generic project. This way one can use variables like
${CURRENT_DOCUMENT:path} or ${CURRENT_DOCUMENT:baseName}.
Amend: Fix coding style according to apoenitz's comment.
Amend2: Some more coding style issues.
Merge-request: 820
Reviewed-by: con <qtc-committer@nokia.com>
This commit is contained in:
@@ -31,10 +31,12 @@
|
||||
#define VARIABLEMANAGER_H
|
||||
|
||||
#include "core_global.h"
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QFileInfo>
|
||||
|
||||
namespace Core {
|
||||
|
||||
@@ -49,11 +51,16 @@ public:
|
||||
static VariableManager* instance() { return m_instance; }
|
||||
|
||||
void insert(const QString &variable, const QString &value);
|
||||
void insertFileInfo(const QString &tag, const QFileInfo &file);
|
||||
void removeFileInfo(const QString &tag);
|
||||
QString value(const QString &variable);
|
||||
QString value(const QString &variable, const QString &defaultValue);
|
||||
void remove(const QString &variable);
|
||||
QString resolve(const QString &stringWithVariables);
|
||||
|
||||
private slots:
|
||||
void updateCurrentDocument(Core::IEditor *editor);
|
||||
|
||||
private:
|
||||
QMap<QString, QString> m_map;
|
||||
static VariableManager *m_instance;
|
||||
|
||||
Reference in New Issue
Block a user