| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/util/qqmlchangeset_p.h |
| Switch to Source code | Preprocessed file |
| Line | Source | Count |
|---|---|---|
| 1 | - | |
| 2 | - | |
| 3 | - | |
| 4 | class __attribute__((visibility("default"))) QQmlChangeSet | - |
| 5 | { | - |
| 6 | public: | - |
| 7 | struct MoveKey | - |
| 8 | { | - |
| 9 | MoveKey() {} | - |
| 10 | MoveKey(int moveId, int offset) : moveId(moveId), offset(offset) {} executed 4000 times by 2 tests: end of blockExecuted by:
| 4000 |
| 11 | int moveId = -1; | - |
| 12 | int offset = 0; | - |
| 13 | }; | - |
| 14 | - | |
| 15 | - | |
| 16 | - | |
| 17 | - | |
| 18 | struct ChangeData | - |
| 19 | { | - |
| 20 | int index; | - |
| 21 | int count; | - |
| 22 | int moveId; | - |
| 23 | int offset; | - |
| 24 | }; | - |
| 25 | - | |
| 26 | struct Change: ChangeData | - |
| 27 | { | - |
| 28 | Change() { | - |
| 29 | index = 0; | - |
| 30 | count = 0; | - |
| 31 | moveId = -1; | - |
| 32 | offset = 0; | - |
| 33 | } executed 6 times by 1 test: end of blockExecuted by:
| 6 |
| 34 | Change(int index, int count, int moveId = -1, int offset = 0) { | - |
| 35 | this->index = index; | - |
| 36 | this->count = count; | - |
| 37 | this->moveId = moveId; | - |
| 38 | this->offset = offset; | - |
| 39 | } executed 39582 times by 30 tests: end of blockExecuted by:
| 39582 |
| 40 | - | |
| 41 | bool isMove() const { return executed 92619 times by 15 tests: moveId >= 0;return moveId >= 0;Executed by:
executed 92619 times by 15 tests: }return moveId >= 0;Executed by:
| 92619 |
| 42 | - | |
| 43 | MoveKey moveKey(int index) const { | - |
| 44 | return executed 4000 times by 2 tests: MoveKey(moveId, index - Change::index + offset);return MoveKey(moveId, index - Change::index + offset);Executed by:
executed 4000 times by 2 tests: }return MoveKey(moveId, index - Change::index + offset);Executed by:
| 4000 |
| 45 | - | |
| 46 | int start() const { return never executed: index;return index;never executed: }return index; | 0 |
| 47 | int end() const { return executed 3290 times by 5 tests: index + count;return index + count;Executed by:
executed 3290 times by 5 tests: }return index + count;Executed by:
| 3290 |
| 48 | }; | - |
| 49 | - | |
| 50 | QQmlChangeSet(); | - |
| 51 | QQmlChangeSet(const QQmlChangeSet &changeSet); | - |
| 52 | ~QQmlChangeSet(); | - |
| 53 | - | |
| 54 | QQmlChangeSet &operator =(const QQmlChangeSet &changeSet); | - |
| 55 | - | |
| 56 | const QVector<Change> &removes() const { return executed 27894 times by 17 tests: m_removes;return m_removes;Executed by:
executed 27894 times by 17 tests: }return m_removes;Executed by:
| 27894 |
| 57 | const QVector<Change> &inserts() const { return executed 25562 times by 17 tests: m_inserts;return m_inserts;Executed by:
executed 25562 times by 17 tests: }return m_inserts;Executed by:
| 25562 |
| 58 | const QVector<Change> &changes() const { return executed 826 times by 4 tests: m_changes;return m_changes;Executed by:
executed 826 times by 4 tests: }return m_changes;Executed by:
| 826 |
| 59 | - | |
| 60 | void insert(int index, int count); | - |
| 61 | void remove(int index, int count); | - |
| 62 | void move(int from, int to, int count, int moveId); | - |
| 63 | void change(int index, int count); | - |
| 64 | - | |
| 65 | void insert(const QVector<Change> &inserts); | - |
| 66 | void remove(const QVector<Change> &removes, QVector<Change> *inserts = nullptr); | - |
| 67 | void move(const QVector<Change> &removes, const QVector<Change> &inserts); | - |
| 68 | void change(const QVector<Change> &changes); | - |
| 69 | void apply(const QQmlChangeSet &changeSet); | - |
| 70 | - | |
| 71 | bool isEmpty() const { return executed 242628 times by 14 tests: m_removes.empty() && m_inserts.empty() && m_changes.isEmpty();return m_removes.empty() && m_inserts.empty() && m_changes.isEmpty();Executed by:
executed 242628 times by 14 tests: }return m_removes.empty() && m_inserts.empty() && m_changes.isEmpty();Executed by:
| 242628 |
| 72 | - | |
| 73 | void clear() | - |
| 74 | { | - |
| 75 | m_removes.clear(); | - |
| 76 | m_inserts.clear(); | - |
| 77 | m_changes.clear(); | - |
| 78 | m_difference = 0; | - |
| 79 | } executed 82903 times by 28 tests: end of blockExecuted by:
| 82903 |
| 80 | - | |
| 81 | int difference() const { return executed 67492 times by 28 tests: m_difference;return m_difference;Executed by:
executed 67492 times by 28 tests: }return m_difference;Executed by:
| 67492 |
| 82 | - | |
| 83 | private: | - |
| 84 | void remove(QVector<Change> *removes, QVector<Change> *inserts); | - |
| 85 | void change(QVector<Change> *changes); | - |
| 86 | - | |
| 87 | QVector<Change> m_removes; | - |
| 88 | QVector<Change> m_inserts; | - |
| 89 | QVector<Change> m_changes; | - |
| 90 | int m_difference; | - |
| 91 | }; | - |
| 92 | - | |
| 93 | template<> class QTypeInfo<QQmlChangeSet::Change > { public: enum { isSpecialized = true, isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isRelocatable = !isStatic || ((Q_PRIMITIVE_TYPE) & Q_RELOCATABLE_TYPE), isLarge = (sizeof(QQmlChangeSet::Change)>sizeof(void*)), isPointer = false, isIntegral = std::is_integral< QQmlChangeSet::Change >::value, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0), sizeOf = sizeof(QQmlChangeSet::Change) }; static inline const char *name() { return "QQmlChangeSet::Change"; } }; | - |
| 94 | template<> class QTypeInfo<QQmlChangeSet::MoveKey > { public: enum { isSpecialized = true, isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isRelocatable = !isStatic || ((Q_PRIMITIVE_TYPE) & Q_RELOCATABLE_TYPE), isLarge = (sizeof(QQmlChangeSet::MoveKey)>sizeof(void*)), isPointer = false, isIntegral = std::is_integral< QQmlChangeSet::MoveKey >::value, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0), sizeOf = sizeof(QQmlChangeSet::MoveKey) }; static inline const char *name() { return "QQmlChangeSet::MoveKey"; } }; | - |
| 95 | - | |
| 96 | inline uint qHash(const QQmlChangeSet::MoveKey &key) { return executed 7237 times by 3 tests: qHash(qMakePair(key.moveId, key.offset));return qHash(qMakePair(key.moveId, key.offset));Executed by:
executed 7237 times by 3 tests: }return qHash(qMakePair(key.moveId, key.offset));Executed by:
| 7237 |
| 97 | inline bool operator ==(const QQmlChangeSet::MoveKey &l, const QQmlChangeSet::MoveKey &r) { | - |
| 98 | return executed 4298 times by 3 tests: l.moveId == r.moveId && l.offset == r.offset;return l.moveId == r.moveId && l.offset == r.offset;Executed by:
executed 4298 times by 3 tests: }return l.moveId == r.moveId && l.offset == r.offset;Executed by:
| 4298 |
| 99 | - | |
| 100 | __attribute__((visibility("default"))) QDebug operator <<(QDebug debug, const QQmlChangeSet::Change &change); | - |
| 101 | __attribute__((visibility("default"))) QDebug operator <<(QDebug debug, const QQmlChangeSet &change); | - |
| 102 | - | |
| 103 | - | |
| Switch to Source code | Preprocessed file |