summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-03 00:15:39 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-03 00:15:39 (GMT)
commit1ee2bf9f693799c06f10bd6a02ecc65874fb6622 (patch)
treebc96f29ab5f514c9d1347788130b039bb501da36 /src/declarative
parentbdaf37f74e69f74c8fec23739e4dad23121af415 (diff)
parentf3499122c99ef31cd064559c32b3a7afda6ec5b0 (diff)
downloadQt-1ee2bf9f693799c06f10bd6a02ecc65874fb6622.zip
Qt-1ee2bf9f693799c06f10bd6a02ecc65874fb6622.tar.gz
Qt-1ee2bf9f693799c06f10bd6a02ecc65874fb6622.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/qml/rewriter/rewriter.cpp9
-rw-r--r--src/declarative/qml/rewriter/rewriter_p.h3
2 files changed, 9 insertions, 3 deletions
diff --git a/src/declarative/qml/rewriter/rewriter.cpp b/src/declarative/qml/rewriter/rewriter.cpp
index 2ce927c..ed45f16 100644
--- a/src/declarative/qml/rewriter/rewriter.cpp
+++ b/src/declarative/qml/rewriter/rewriter.cpp
@@ -83,14 +83,19 @@ void Rewriter::moveTextBefore(const AST::SourceLocation &firstLoc,
const AST::SourceLocation &lastLoc,
const AST::SourceLocation &loc)
{
- textWriter.move(firstLoc.offset, lastLoc.offset + lastLoc.length - firstLoc.offset, loc.offset);
+ move(firstLoc.offset, lastLoc.offset + lastLoc.length - firstLoc.offset, loc.offset);
}
void Rewriter::moveTextAfter(const AST::SourceLocation &firstLoc,
const AST::SourceLocation &lastLoc,
const AST::SourceLocation &loc)
{
- textWriter.move(firstLoc.offset, lastLoc.offset + lastLoc.length - firstLoc.offset, loc.offset + loc.length);
+ move(firstLoc.offset, lastLoc.offset + lastLoc.length - firstLoc.offset, loc.offset + loc.length);
+}
+
+void Rewriter::move(int pos, int length, int to)
+{
+ textWriter.move(pos, length, to);
}
QT_END_NAMESPACE
diff --git a/src/declarative/qml/rewriter/rewriter_p.h b/src/declarative/qml/rewriter/rewriter_p.h
index fcb9ca5..44f3cce 100644
--- a/src/declarative/qml/rewriter/rewriter_p.h
+++ b/src/declarative/qml/rewriter/rewriter_p.h
@@ -121,7 +121,8 @@ public:
//
// low-level offset based API
//
- void replace(int offset, int length, const QString &text);
+ virtual void replace(int offset, int length, const QString &text);
+ virtual void move(int pos, int length, int to);
void insertText(int offset, const QString &text);
void removeText(int offset, int length);