summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor/snippets/snippet.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/texteditor/snippets/snippet.h')
-rw-r--r--src/plugins/texteditor/snippets/snippet.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/plugins/texteditor/snippets/snippet.h b/src/plugins/texteditor/snippets/snippet.h
index dcd5d24011..8163f31a47 100644
--- a/src/plugins/texteditor/snippets/snippet.h
+++ b/src/plugins/texteditor/snippets/snippet.h
@@ -36,8 +36,19 @@
#include <QList>
#include <QString>
+namespace Core { class Id; }
+
namespace TextEditor {
+class TEXTEDITOR_EXPORT NameMangler
+{
+public:
+ virtual ~NameMangler() { }
+
+ virtual Core::Id id() const = 0;
+ virtual QString mangle(const QString &unmangled) const = 0;
+};
+
class TEXTEDITOR_EXPORT Snippet
{
public:
@@ -73,9 +84,10 @@ public:
QString text;
bool success;
struct Range {
- Range(int s, int l) : start(s), length(l) { }
+ Range(int s, int l, NameMangler *m) : start(s), length(l), mangler(m) { }
int start;
int length;
+ NameMangler *mangler;
};
QList<Range> ranges;
};