diff options
author | Liang Qi <liang.qi@qt.io> | 2016-10-18 08:33:26 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-10-18 08:33:26 +0200 |
commit | f04c2c40fd7ee91e5cbff2ca4df0fdc30dfbbcd5 (patch) | |
tree | 4e96d097987deb8d4d1a963e911dcbd1641a8502 /src/qml/util | |
parent | 0da811cdfebdae1d96c99fe681e6a776e73d2f7f (diff) | |
parent | e76ed6a2655894bd671ee7397a15f2e57cfc8d33 (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
src/qml/jsruntime/qv4variantobject.cpp
src/qml/types/qquickworkerscript.cpp
src/quick/scenegraph/util/qsgdefaultpainternode_p.h
tools/qmljs/qmljs.cpp
Change-Id: I876242714ec8c046238d8fd673a5ace2455b2b59
Diffstat (limited to 'src/qml/util')
-rw-r--r-- | src/qml/util/qqmlchangeset_p.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/qml/util/qqmlchangeset_p.h b/src/qml/util/qqmlchangeset_p.h index b7a637fb2e..8e1fa3f9f2 100644 --- a/src/qml/util/qqmlchangeset_p.h +++ b/src/qml/util/qqmlchangeset_p.h @@ -68,16 +68,31 @@ public: int offset; }; - struct Change + // The storrage for Change (below). This struct is trivial, which it has to be in order to store + // it in a QV4::Heap::Base object. The Change struct doesn't add any storage fields, so it is + // safe to cast ChangeData to/from Change. + struct ChangeData { - Change() : index(0), count(0), moveId(-1) {} - Change(int index, int count, int moveId = -1, int offset = 0) - : index(index), count(count), moveId(moveId), offset(offset) {} - int index; int count; int moveId; int offset; + }; + + struct Change: ChangeData + { + Change() { + index = 0; + count = 0; + moveId = -1; + offset = 0; + } + Change(int index, int count, int moveId = -1, int offset = 0) { + this->index = index; + this->count = count; + this->moveId = moveId; + this->offset = offset; + } bool isMove() const { return moveId >= 0; } |