aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/changeset.h
diff options
context:
space:
mode:
authorRoberto Raggi <[email protected]>2010-06-22 10:44:58 +0200
committerRoberto Raggi <[email protected]>2010-06-22 12:13:31 +0200
commite0d7e7c5b9eec7ee1bd3bb326fc24177ab3f1e57 (patch)
treedf31f211ccdc4f5fc0eaa6063c004cf0b1b6d8ca /src/libs/utils/changeset.h
parent27f6b2ceb5a3b946a7e6236470295c0ad4891cdf (diff)
Cleanup
Diffstat (limited to 'src/libs/utils/changeset.h')
-rw-r--r--src/libs/utils/changeset.h42
1 files changed, 11 insertions, 31 deletions
diff --git a/src/libs/utils/changeset.h b/src/libs/utils/changeset.h
index 3fff3b31056..30136c69aae 100644
--- a/src/libs/utils/changeset.h
+++ b/src/libs/utils/changeset.h
@@ -97,37 +97,16 @@ public:
void clear();
- bool replace(const Range &range, const QString &replacement)
- { return replace(range.start, range.end, replacement); }
-
- bool remove(const Range &range)
- { return remove(range.start, range.end); }
-
- bool move(const Range &range, int to)
- { return move(range.start, range.end, to); }
-
- bool flip(const Range &range1, const Range &range2)
- { return flip(range1.start, range1.end, range2.start, range2.end); }
-
- bool copy(const Range &range, int to)
- { return copy(range.start, range.end, to); }
-
-
- bool replace(int start, int end, const QString &replacement)
- { return replace_helper(start, end - start, replacement); }
-
- bool remove(int start, int end)
- { return remove_helper(start, end - start); }
-
- bool move(int start, int end, int to)
- { return move_helper(start, end - start, to); }
-
- bool flip(int start1, int end1, int start2, int end2)
- { return flip_helper(start1, end1 - start1, start2, end2 - start2); }
-
- bool copy(int start, int end, int to)
- { return copy_helper(start, end - start, to); }
-
+ bool replace(const Range &range, const QString &replacement);
+ bool remove(const Range &range);
+ bool move(const Range &range, int to);
+ bool flip(const Range &range1, const Range &range2);
+ bool copy(const Range &range, int to);
+ bool replace(int start, int end, const QString &replacement);
+ bool remove(int start, int end);
+ bool move(int start, int end, int to);
+ bool flip(int start1, int end1, int start2, int end2);
+ bool copy(int start, int end, int to);
bool insert(int pos, const QString &text);
bool hadErrors();
@@ -136,6 +115,7 @@ public:
void apply(QTextCursor *textCursor);
private:
+ // length-based API.
bool replace_helper(int pos, int length, const QString &replacement);
bool move_helper(int pos, int length, int to);
bool remove_helper(int pos, int length);