Make expanders work with subexpanders

Change-Id: I30bad85ce2fbaf1f02043b3d97f657461f5a1995
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
hjk
2014-10-20 23:13:13 +02:00
parent 58be8e6476
commit c6ef3addcc
19 changed files with 247 additions and 130 deletions

View File

@@ -35,12 +35,22 @@
#include <functional>
#include <QList>
#include <QVector>
#include <QCoreApplication>
namespace Utils {
namespace Internal { class MacroExpanderPrivate; }
class MacroExpander;
typedef std::function<MacroExpander *()> MacroExpanderProvider;
typedef QVector<MacroExpander *> MacroExpanders;
class QTCREATOR_UTILS_EXPORT MacroExpander : public AbstractMacroExpander
{
Q_DECLARE_TR_FUNCTIONS("MacroExpander")
public:
explicit MacroExpander();
~MacroExpander();
@@ -71,9 +81,16 @@ public:
QList<QByteArray> variables();
QString variableDescription(const QByteArray &variable);
MacroExpanders subExpanders() const;
QString displayName() const;
void setDisplayName(const QString &displayName);
void registerSubProvider(const MacroExpanderProvider &provider);
bool isAccumulating() const;
void setAccumulating(bool on);
private:
MacroExpander(const MacroExpander &) Q_DECL_EQ_DELETE;
void operator=(const MacroExpander &) Q_DECL_EQ_DELETE;