diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2009-11-26 14:42:19 +0100 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2009-11-26 14:45:11 +0100 |
commit | 746bea8e1ec18bc5b690e789c93d4e34bc41f70e (patch) | |
tree | f9395855b410d0742f1dd621cbe0e4a02c400dfe /src/libs/utils/changeset.h | |
parent | 36913baf940395cb1c593c09e1234850b3bc00f3 (diff) | |
download | qt-creator-746bea8e1ec18bc5b690e789c93d4e34bc41f70e.tar.gz |
Make flip in ChangeSet move two different-length strings around.
Instead of just flipping same-length strings.
Also fix an incorrect replace position adjustment.
Diffstat (limited to 'src/libs/utils/changeset.h')
-rw-r--r-- | src/libs/utils/changeset.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libs/utils/changeset.h b/src/libs/utils/changeset.h index 7f953b402a..2f46bd835d 100644 --- a/src/libs/utils/changeset.h +++ b/src/libs/utils/changeset.h @@ -66,13 +66,14 @@ public: Copy }; - EditOp(): type(Unset), pos1(0), pos2(0), length(0) {} - EditOp(Type t): type(t), pos1(0), pos2(0), length(0) {} + EditOp(): type(Unset), pos1(0), pos2(0), length1(0), length2(0) {} + EditOp(Type t): type(t), pos1(0), pos2(0), length1(0), length2(0) {} Type type; int pos1; int pos2; - int length; + int length1; + int length2; QString text; }; @@ -89,7 +90,7 @@ public: bool move(int pos, int length, int to); bool insert(int pos, const QString &text); bool remove(int pos, int length); - bool flip(int pos1, int length, int pos2); + bool flip(int pos1, int length1, int pos2, int length2); bool copy(int pos, int length, int to); bool hadErrors(); |