OpenCoverage

qqmlchangeset_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/util/qqmlchangeset_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4class __attribute__((visibility("default"))) QQmlChangeSet-
5{-
6public:-
7 struct MoveKey-
8 {-
9 MoveKey() {}-
10 MoveKey(int moveId, int offset) : moveId(moveId), offset(offset) {}
executed 4000 times by 2 tests: end of block
Executed by:
  • tst_qquickgridview
  • tst_qquicklistview
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 block
Executed by:
  • tst_qquickgridview
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 block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlhangeset
  • tst_qqmlinstantiator
  • tst_qqmllistcompositor
  • tst_qqmllistmodel
  • tst_qqmlobjectmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • ...
39582
40-
41 bool isMove() const { return
executed 92619 times by 15 tests: return moveId >= 0;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistcompositor
  • tst_qqmlobjectmodel
  • tst_qqmlqt
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickvisualdatamodel
moveId >= 0;
executed 92619 times by 15 tests: return moveId >= 0;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmllistcompositor
  • tst_qqmlobjectmodel
  • tst_qqmlqt
  • tst_qquickgridview
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickvisualdatamodel
}
92619
42-
43 MoveKey moveKey(int index) const {-
44 return
executed 4000 times by 2 tests: return MoveKey(moveId, index - Change::index + offset);
Executed by:
  • tst_qquickgridview
  • tst_qquicklistview
MoveKey(moveId, index - Change::index + offset);
executed 4000 times by 2 tests: return MoveKey(moveId, index - Change::index + offset);
Executed by:
  • tst_qquickgridview
  • tst_qquicklistview
}
4000
45-
46 int start() const { return
never executed: return index;
index;
never executed: return index;
}
0
47 int end() const { return
executed 3290 times by 5 tests: return index + count;
Executed by:
  • tst_examples
  • tst_qqmlhangeset
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
index + count;
executed 3290 times by 5 tests: return index + count;
Executed by:
  • tst_examples
  • tst_qqmlhangeset
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
}
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: return m_removes;
Executed by:
  • tst_examples
  • tst_qqmlhangeset
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlobjectmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
m_removes;
executed 27894 times by 17 tests: return m_removes;
Executed by:
  • tst_examples
  • tst_qqmlhangeset
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlobjectmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
}
27894
57 const QVector<Change> &inserts() const { return
executed 25562 times by 17 tests: return m_inserts;
Executed by:
  • tst_examples
  • tst_qqmlhangeset
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlobjectmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
m_inserts;
executed 25562 times by 17 tests: return m_inserts;
Executed by:
  • tst_examples
  • tst_qqmlhangeset
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlobjectmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
}
25562
58 const QVector<Change> &changes() const { return
executed 826 times by 4 tests: return m_changes;
Executed by:
  • tst_qqmlhangeset
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
m_changes;
executed 826 times by 4 tests: return m_changes;
Executed by:
  • tst_qqmlhangeset
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
}
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: return m_removes.empty() && m_inserts.empty() && m_changes.isEmpty();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
m_removes.empty() && m_inserts.empty() && m_changes.isEmpty();
executed 242628 times by 14 tests: return m_removes.empty() && m_inserts.empty() && m_changes.isEmpty();
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmllistmodel
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickrepeater
  • tst_qquickspringanimation
  • tst_qquickvisualdatamodel
}
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 block
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlhangeset
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquicktableview
  • ...
82903
80-
81 int difference() const { return
executed 67492 times by 28 tests: return m_difference;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlhangeset
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquicktableview
  • ...
m_difference;
executed 67492 times by 28 tests: return m_difference;
Executed by:
  • tst_examples
  • tst_multipointtoucharea_interop
  • tst_qqmlecmascript
  • tst_qqmlhangeset
  • tst_qqmlinstantiator
  • tst_qqmllistmodel
  • tst_qqmlqt
  • tst_qqmltypeloader
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickdraghandler
  • tst_qquickflickable
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquickitemparticle
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickrepeater
  • tst_qquickshortcut
  • tst_qquickspringanimation
  • tst_qquicktableview
  • ...
}
67492
82-
83private:-
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-
93template<> 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"; } };-
94template<> 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-
96inline uint qHash(const QQmlChangeSet::MoveKey &key) { return
executed 7237 times by 3 tests: return qHash(qMakePair(key.moveId, key.offset));
Executed by:
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
qHash(qMakePair(key.moveId, key.offset));
executed 7237 times by 3 tests: return qHash(qMakePair(key.moveId, key.offset));
Executed by:
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
}
7237
97inline bool operator ==(const QQmlChangeSet::MoveKey &l, const QQmlChangeSet::MoveKey &r) {-
98 return
executed 4298 times by 3 tests: return l.moveId == r.moveId && l.offset == r.offset;
Executed by:
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
l.moveId == r.moveId && l.offset == r.offset;
executed 4298 times by 3 tests: return l.moveId == r.moveId && l.offset == r.offset;
Executed by:
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickvisualdatamodel
}
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 codePreprocessed file

Generated by Squish Coco 4.2.0