summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/rewriter/rewriter.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2009-07-02 09:07:53 (GMT)
committerErik Verbruggen <erik.verbruggen@nokia.com>2009-07-02 09:07:53 (GMT)
commitf3499122c99ef31cd064559c32b3a7afda6ec5b0 (patch)
tree33f8f9f393753b46fc7297cba1026fc633bb2be6 /src/declarative/qml/rewriter/rewriter.cpp
parent8491b0476a221cf136b412bda532662a69063045 (diff)
downloadQt-f3499122c99ef31cd064559c32b3a7afda6ec5b0.zip
Qt-f3499122c99ef31cd064559c32b3a7afda6ec5b0.tar.gz
Qt-f3499122c99ef31cd064559c32b3a7afda6ec5b0.tar.bz2
Small change to make move and replace methods overridable.
Diffstat (limited to 'src/declarative/qml/rewriter/rewriter.cpp')
-rw-r--r--src/declarative/qml/rewriter/rewriter.cpp9
1 files changed, 7 insertions, 2 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