| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickitemviewtransition.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||
| 2 | - | |||||||||||||||||||
| 3 | - | |||||||||||||||||||
| 4 | static QList<int> qquickitemviewtransition_emptyIndexes = QList<int>(); | - | ||||||||||||||||||
| 5 | static QList<QObject *> qquickitemviewtransition_emptyTargets = QList<QObject *>(); | - | ||||||||||||||||||
| 6 | - | |||||||||||||||||||
| 7 | - | |||||||||||||||||||
| 8 | class QQuickItemViewTransitionJob : public QQuickTransitionManager | - | ||||||||||||||||||
| 9 | { | - | ||||||||||||||||||
| 10 | public: | - | ||||||||||||||||||
| 11 | QQuickItemViewTransitionJob(); | - | ||||||||||||||||||
| 12 | ~QQuickItemViewTransitionJob(); | - | ||||||||||||||||||
| 13 | - | |||||||||||||||||||
| 14 | void startTransition(QQuickItemViewTransitionableItem *item, int index, QQuickItemViewTransitioner *transitioner, QQuickItemViewTransitioner::TransitionType type, const QPointF &to, bool isTargetItem); | - | ||||||||||||||||||
| 15 | - | |||||||||||||||||||
| 16 | QQuickItemViewTransitioner *m_transitioner; | - | ||||||||||||||||||
| 17 | QQuickItemViewTransitionableItem *m_item; | - | ||||||||||||||||||
| 18 | QPointF m_toPos; | - | ||||||||||||||||||
| 19 | QQuickItemViewTransitioner::TransitionType m_type; | - | ||||||||||||||||||
| 20 | bool m_isTarget; | - | ||||||||||||||||||
| 21 | bool *m_wasDeleted; | - | ||||||||||||||||||
| 22 | - | |||||||||||||||||||
| 23 | protected: | - | ||||||||||||||||||
| 24 | void finished() override; | - | ||||||||||||||||||
| 25 | }; | - | ||||||||||||||||||
| 26 | - | |||||||||||||||||||
| 27 | - | |||||||||||||||||||
| 28 | QQuickItemViewTransitionJob::QQuickItemViewTransitionJob() | - | ||||||||||||||||||
| 29 | : m_transitioner(nullptr) | - | ||||||||||||||||||
| 30 | , m_item(nullptr) | - | ||||||||||||||||||
| 31 | , m_type(QQuickItemViewTransitioner::NoTransition) | - | ||||||||||||||||||
| 32 | , m_isTarget(false) | - | ||||||||||||||||||
| 33 | , m_wasDeleted(nullptr) | - | ||||||||||||||||||
| 34 | { | - | ||||||||||||||||||
| 35 | } executed 10412 times by 4 tests: end of blockExecuted by:
| 10412 | ||||||||||||||||||
| 36 | - | |||||||||||||||||||
| 37 | QQuickItemViewTransitionJob::~QQuickItemViewTransitionJob() | - | ||||||||||||||||||
| 38 | { | - | ||||||||||||||||||
| 39 | if (m_wasDeleted
| 86-10326 | ||||||||||||||||||
| 40 | * executed 86 times by 2 tests: m_wasDeleted = true;*m_wasDeleted = true;Executed by:
executed 86 times by 2 tests: *m_wasDeleted = true;Executed by:
| 86 | ||||||||||||||||||
| 41 | if (m_transitioner
| 466-9946 | ||||||||||||||||||
| 42 | m_transitioner->runningJobs.remove(this); executed 466 times by 3 tests: m_transitioner->runningJobs.remove(this);Executed by:
| 466 | ||||||||||||||||||
| 43 | } executed 10412 times by 4 tests: end of blockExecuted by:
| 10412 | ||||||||||||||||||
| 44 | - | |||||||||||||||||||
| 45 | void QQuickItemViewTransitionJob::startTransition(QQuickItemViewTransitionableItem *item, int index, QQuickItemViewTransitioner *transitioner, QQuickItemViewTransitioner::TransitionType type, const QPointF &to, bool isTargetItem) | - | ||||||||||||||||||
| 46 | { | - | ||||||||||||||||||
| 47 | if (type == QQuickItemViewTransitioner::NoTransition
| 0-10556 | ||||||||||||||||||
| 48 | return; never executed: return; | 0 | ||||||||||||||||||
| 49 | if (!item
| 0-10556 | ||||||||||||||||||
| 50 | QMessageLogger(__FILE__, 93, __PRETTY_FUNCTION__).warning("startTransition(): invalid item"); | - | ||||||||||||||||||
| 51 | return; never executed: return; | 0 | ||||||||||||||||||
| 52 | } | - | ||||||||||||||||||
| 53 | if (!transitioner
| 0-10556 | ||||||||||||||||||
| 54 | QMessageLogger(__FILE__, 97, __PRETTY_FUNCTION__).warning("startTransition(): invalid transitioner"); | - | ||||||||||||||||||
| 55 | return; never executed: return; | 0 | ||||||||||||||||||
| 56 | } | - | ||||||||||||||||||
| 57 | - | |||||||||||||||||||
| 58 | QQuickTransition *trans = transitioner->transitionObject(type, isTargetItem); | - | ||||||||||||||||||
| 59 | if (!trans
| 0-10556 | ||||||||||||||||||
| 60 | QMessageLogger(__FILE__, 103, __PRETTY_FUNCTION__).warning("QQuickItemView: invalid view transition!"); | - | ||||||||||||||||||
| 61 | return; never executed: return; | 0 | ||||||||||||||||||
| 62 | } | - | ||||||||||||||||||
| 63 | - | |||||||||||||||||||
| 64 | m_item = item; | - | ||||||||||||||||||
| 65 | m_transitioner = transitioner; | - | ||||||||||||||||||
| 66 | m_toPos = to; | - | ||||||||||||||||||
| 67 | m_type = type; | - | ||||||||||||||||||
| 68 | m_isTarget = isTargetItem; | - | ||||||||||||||||||
| 69 | - | |||||||||||||||||||
| 70 | QQuickViewTransitionAttached *attached = | - | ||||||||||||||||||
| 71 | static_cast<QQuickViewTransitionAttached*>(qmlAttachedPropertiesObject<QQuickViewTransitionAttached>(trans)); | - | ||||||||||||||||||
| 72 | if (attached
| 0-10556 | ||||||||||||||||||
| 73 | attached->m_index = index; | - | ||||||||||||||||||
| 74 | attached->m_item = item->item; | - | ||||||||||||||||||
| 75 | attached->m_destination = to; | - | ||||||||||||||||||
| 76 | attached->m_targetIndexes = m_transitioner->targetIndexes(type); | - | ||||||||||||||||||
| 77 | attached->m_targetItems = m_transitioner->targetItems(type); | - | ||||||||||||||||||
| 78 | attached->indexChanged(); | - | ||||||||||||||||||
| 79 | attached->itemChanged(); | - | ||||||||||||||||||
| 80 | attached->destinationChanged(); | - | ||||||||||||||||||
| 81 | attached->targetIndexesChanged(); | - | ||||||||||||||||||
| 82 | attached->targetItemsChanged(); | - | ||||||||||||||||||
| 83 | } executed 10556 times by 4 tests: end of blockExecuted by:
| 10556 | ||||||||||||||||||
| 84 | - | |||||||||||||||||||
| 85 | QQuickStateOperation::ActionList actions; | - | ||||||||||||||||||
| 86 | actions << QQuickStateAction(item->item, QLatin1String("x"), QVariant(to.x())); | - | ||||||||||||||||||
| 87 | actions << QQuickStateAction(item->item, QLatin1String("y"), QVariant(to.y())); | - | ||||||||||||||||||
| 88 | - | |||||||||||||||||||
| 89 | m_transitioner->runningJobs << this; | - | ||||||||||||||||||
| 90 | QQuickTransitionManager::transition(actions, trans, item->item); | - | ||||||||||||||||||
| 91 | } executed 10556 times by 4 tests: end of blockExecuted by:
| 10556 | ||||||||||||||||||
| 92 | - | |||||||||||||||||||
| 93 | void QQuickItemViewTransitionJob::finished() | - | ||||||||||||||||||
| 94 | { | - | ||||||||||||||||||
| 95 | QQuickTransitionManager::finished(); | - | ||||||||||||||||||
| 96 | - | |||||||||||||||||||
| 97 | if (m_transitioner
| 0-8832 | ||||||||||||||||||
| 98 | bool deleted = false; | - | ||||||||||||||||||
| 99 | m_wasDeleted = &deleted; | - | ||||||||||||||||||
| 100 | m_transitioner->finishedTransition(this, m_item); | - | ||||||||||||||||||
| 101 | if (deleted
| 86-8746 | ||||||||||||||||||
| 102 | return; executed 86 times by 2 tests: return;Executed by:
| 86 | ||||||||||||||||||
| 103 | m_wasDeleted = nullptr; | - | ||||||||||||||||||
| 104 | - | |||||||||||||||||||
| 105 | m_transitioner = nullptr; | - | ||||||||||||||||||
| 106 | } executed 8746 times by 4 tests: end of blockExecuted by:
| 8746 | ||||||||||||||||||
| 107 | - | |||||||||||||||||||
| 108 | m_item = nullptr; | - | ||||||||||||||||||
| 109 | m_toPos.setX(0); | - | ||||||||||||||||||
| 110 | m_toPos.setY(0); | - | ||||||||||||||||||
| 111 | m_type = QQuickItemViewTransitioner::NoTransition; | - | ||||||||||||||||||
| 112 | m_isTarget = false; | - | ||||||||||||||||||
| 113 | } executed 8746 times by 4 tests: end of blockExecuted by:
| 8746 | ||||||||||||||||||
| 114 | - | |||||||||||||||||||
| 115 | - | |||||||||||||||||||
| 116 | QQuickItemViewTransitioner::QQuickItemViewTransitioner() | - | ||||||||||||||||||
| 117 | : populateTransition(nullptr) | - | ||||||||||||||||||
| 118 | , addTransition(nullptr), addDisplacedTransition(nullptr) | - | ||||||||||||||||||
| 119 | , moveTransition(nullptr), moveDisplacedTransition(nullptr) | - | ||||||||||||||||||
| 120 | , removeTransition(nullptr), removeDisplacedTransition(nullptr) | - | ||||||||||||||||||
| 121 | , displacedTransition(nullptr) | - | ||||||||||||||||||
| 122 | , changeListener(nullptr) | - | ||||||||||||||||||
| 123 | , usePopulateTransition(false) | - | ||||||||||||||||||
| 124 | { | - | ||||||||||||||||||
| 125 | } executed 1474 times by 5 tests: end of blockExecuted by:
| 1474 | ||||||||||||||||||
| 126 | - | |||||||||||||||||||
| 127 | QQuickItemViewTransitioner::~QQuickItemViewTransitioner() | - | ||||||||||||||||||
| 128 | { | - | ||||||||||||||||||
| 129 | typedef QSet<QQuickItemViewTransitionJob *>::iterator JobIt; | - | ||||||||||||||||||
| 130 | - | |||||||||||||||||||
| 131 | for (JobIt it = runningJobs.begin(), end = runningJobs.end(); it != end
| 1200-1474 | ||||||||||||||||||
| 132 | (* executed 1200 times by 1 test: it)->m_transitioner = nullptr;(*it)->m_transitioner = nullptr;Executed by:
executed 1200 times by 1 test: (*it)->m_transitioner = nullptr;Executed by:
| 1200 | ||||||||||||||||||
| 133 | } executed 1474 times by 5 tests: end of blockExecuted by:
| 1474 | ||||||||||||||||||
| 134 | - | |||||||||||||||||||
| 135 | bool QQuickItemViewTransitioner::canTransition(QQuickItemViewTransitioner::TransitionType type, bool asTarget) const | - | ||||||||||||||||||
| 136 | { | - | ||||||||||||||||||
| 137 | if (!asTarget
| 8610-19396 | ||||||||||||||||||
| 138 | && type != NoTransition
| 0-8610 | ||||||||||||||||||
| 139 | && displacedTransition && displacedTransition->enabled()
| 96-3700 | ||||||||||||||||||
| 140 | return executed 3700 times by 4 tests: true;return true;Executed by:
executed 3700 times by 4 tests: return true;Executed by:
| 3700 | ||||||||||||||||||
| 141 | } | - | ||||||||||||||||||
| 142 | - | |||||||||||||||||||
| 143 | switch (type) { | - | ||||||||||||||||||
| 144 | case never executed: NoTransition:case NoTransition:never executed: case NoTransition: | 0 | ||||||||||||||||||
| 145 | break; never executed: break; | 0 | ||||||||||||||||||
| 146 | case executed 14454 times by 5 tests: PopulateTransition:case PopulateTransition:Executed by:
executed 14454 times by 5 tests: case PopulateTransition:Executed by:
| 14454 | ||||||||||||||||||
| 147 | return executed 14454 times by 5 tests: usePopulateTransitionreturn usePopulateTransition && populateTransition && populateTransition->enabled();Executed by:
executed 14454 times by 5 tests: return usePopulateTransition && populateTransition && populateTransition->enabled();Executed by:
| 14454 | ||||||||||||||||||
| 148 | && populateTransition && populateTransition->enabled(); executed 14454 times by 5 tests: return usePopulateTransition && populateTransition && populateTransition->enabled();Executed by:
| 14454 | ||||||||||||||||||
| 149 | case executed 4942 times by 4 tests: AddTransition:case AddTransition:Executed by:
executed 4942 times by 4 tests: case AddTransition:Executed by:
| 4942 | ||||||||||||||||||
| 150 | if (asTarget
| 1398-3544 | ||||||||||||||||||
| 151 | return executed 3544 times by 4 tests: addTransition && addTransition->enabled();return addTransition && addTransition->enabled();Executed by:
executed 3544 times by 4 tests: return addTransition && addTransition->enabled();Executed by:
| 3544 | ||||||||||||||||||
| 152 | else | - | ||||||||||||||||||
| 153 | return executed 1398 times by 3 tests: addDisplacedTransition && addDisplacedTransition->enabled();return addDisplacedTransition && addDisplacedTransition->enabled();Executed by:
executed 1398 times by 3 tests: return addDisplacedTransition && addDisplacedTransition->enabled();Executed by:
| 1398 | ||||||||||||||||||
| 154 | case executed 3014 times by 5 tests: MoveTransition:case MoveTransition:Executed by:
executed 3014 times by 5 tests: case MoveTransition:Executed by:
| 3014 | ||||||||||||||||||
| 155 | if (asTarget
| 842-2172 | ||||||||||||||||||
| 156 | return executed 842 times by 3 tests: moveTransition && moveTransition->enabled();return moveTransition && moveTransition->enabled();Executed by:
executed 842 times by 3 tests: return moveTransition && moveTransition->enabled();Executed by:
| 842 | ||||||||||||||||||
| 157 | else | - | ||||||||||||||||||
| 158 | return executed 2172 times by 4 tests: moveDisplacedTransition && moveDisplacedTransition->enabled();return moveDisplacedTransition && moveDisplacedTransition->enabled();Executed by:
executed 2172 times by 4 tests: return moveDisplacedTransition && moveDisplacedTransition->enabled();Executed by:
| 2172 | ||||||||||||||||||
| 159 | case executed 1896 times by 4 tests: RemoveTransition:case RemoveTransition:Executed by:
executed 1896 times by 4 tests: case RemoveTransition:Executed by:
| 1896 | ||||||||||||||||||
| 160 | if (asTarget
| 556-1340 | ||||||||||||||||||
| 161 | return executed 556 times by 3 tests: removeTransition && removeTransition->enabled();return removeTransition && removeTransition->enabled();Executed by:
executed 556 times by 3 tests: return removeTransition && removeTransition->enabled();Executed by:
| 556 | ||||||||||||||||||
| 162 | else | - | ||||||||||||||||||
| 163 | return executed 1340 times by 3 tests: removeDisplacedTransition && removeDisplacedTransition->enabled();return removeDisplacedTransition && removeDisplacedTransition->enabled();Executed by:
executed 1340 times by 3 tests: return removeDisplacedTransition && removeDisplacedTransition->enabled();Executed by:
| 1340 | ||||||||||||||||||
| 164 | } | - | ||||||||||||||||||
| 165 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||
| 166 | } | - | ||||||||||||||||||
| 167 | - | |||||||||||||||||||
| 168 | void QQuickItemViewTransitioner::transitionNextReposition(QQuickItemViewTransitionableItem *item, QQuickItemViewTransitioner::TransitionType type, bool isTarget) | - | ||||||||||||||||||
| 169 | { | - | ||||||||||||||||||
| 170 | item->setNextTransition(type, isTarget); | - | ||||||||||||||||||
| 171 | } executed 15080 times by 5 tests: end of blockExecuted by:
| 15080 | ||||||||||||||||||
| 172 | - | |||||||||||||||||||
| 173 | void QQuickItemViewTransitioner::addToTargetLists(QQuickItemViewTransitioner::TransitionType type, QQuickItemViewTransitionableItem *item, int index) | - | ||||||||||||||||||
| 174 | { | - | ||||||||||||||||||
| 175 | switch (type) { | - | ||||||||||||||||||
| 176 | case never executed: NoTransition:case NoTransition:never executed: case NoTransition: | 0 | ||||||||||||||||||
| 177 | break; never executed: break; | 0 | ||||||||||||||||||
| 178 | case executed 1016 times by 4 tests: PopulateTransition:case PopulateTransition:Executed by:
executed 1016 times by 4 tests: case PopulateTransition:Executed by:
| 1016 | ||||||||||||||||||
| 179 | case executed 3544 times by 4 tests: AddTransition:case AddTransition:Executed by:
executed 3544 times by 4 tests: case AddTransition:Executed by:
| 3544 | ||||||||||||||||||
| 180 | addTransitionIndexes << index; | - | ||||||||||||||||||
| 181 | addTransitionTargets << item->item; | - | ||||||||||||||||||
| 182 | break; executed 4560 times by 5 tests: break;Executed by:
| 4560 | ||||||||||||||||||
| 183 | case executed 340 times by 2 tests: MoveTransition:case MoveTransition:Executed by:
executed 340 times by 2 tests: case MoveTransition:Executed by:
| 340 | ||||||||||||||||||
| 184 | moveTransitionIndexes << index; | - | ||||||||||||||||||
| 185 | moveTransitionTargets << item->item; | - | ||||||||||||||||||
| 186 | break; executed 340 times by 2 tests: break;Executed by:
| 340 | ||||||||||||||||||
| 187 | case executed 120 times by 2 tests: RemoveTransition:case RemoveTransition:Executed by:
executed 120 times by 2 tests: case RemoveTransition:Executed by:
| 120 | ||||||||||||||||||
| 188 | removeTransitionIndexes << index; | - | ||||||||||||||||||
| 189 | removeTransitionTargets << item->item; | - | ||||||||||||||||||
| 190 | break; executed 120 times by 2 tests: break;Executed by:
| 120 | ||||||||||||||||||
| 191 | } | - | ||||||||||||||||||
| 192 | } executed 5020 times by 5 tests: end of blockExecuted by:
| 5020 | ||||||||||||||||||
| 193 | - | |||||||||||||||||||
| 194 | void QQuickItemViewTransitioner::resetTargetLists() | - | ||||||||||||||||||
| 195 | { | - | ||||||||||||||||||
| 196 | addTransitionIndexes.clear(); | - | ||||||||||||||||||
| 197 | addTransitionTargets.clear(); | - | ||||||||||||||||||
| 198 | - | |||||||||||||||||||
| 199 | removeTransitionIndexes.clear(); | - | ||||||||||||||||||
| 200 | removeTransitionTargets.clear(); | - | ||||||||||||||||||
| 201 | - | |||||||||||||||||||
| 202 | moveTransitionIndexes.clear(); | - | ||||||||||||||||||
| 203 | moveTransitionTargets.clear(); | - | ||||||||||||||||||
| 204 | } executed 2304 times by 5 tests: end of blockExecuted by:
| 2304 | ||||||||||||||||||
| 205 | - | |||||||||||||||||||
| 206 | QQuickTransition *QQuickItemViewTransitioner::transitionObject(QQuickItemViewTransitioner::TransitionType type, bool asTarget) const | - | ||||||||||||||||||
| 207 | { | - | ||||||||||||||||||
| 208 | if (type == QQuickItemViewTransitioner::NoTransition
| 0-10556 | ||||||||||||||||||
| 209 | return never executed: nullptr;return nullptr;never executed: return nullptr; | 0 | ||||||||||||||||||
| 210 | - | |||||||||||||||||||
| 211 | if (type == PopulateTransition
| 1016-9540 | ||||||||||||||||||
| 212 | asTarget = true; executed 1016 times by 4 tests: asTarget = true;Executed by:
| 1016 | ||||||||||||||||||
| 213 | - | |||||||||||||||||||
| 214 | QQuickTransition *trans = nullptr; | - | ||||||||||||||||||
| 215 | switch (type) { | - | ||||||||||||||||||
| 216 | case never executed: NoTransition:case NoTransition:never executed: case NoTransition: | 0 | ||||||||||||||||||
| 217 | break; never executed: break; | 0 | ||||||||||||||||||
| 218 | case executed 1016 times by 4 tests: PopulateTransition:case PopulateTransition:Executed by:
executed 1016 times by 4 tests: case PopulateTransition:Executed by:
| 1016 | ||||||||||||||||||
| 219 | trans = populateTransition; | - | ||||||||||||||||||
| 220 | break; executed 1016 times by 4 tests: break;Executed by:
| 1016 | ||||||||||||||||||
| 221 | case executed 6182 times by 3 tests: AddTransition:case AddTransition:Executed by:
executed 6182 times by 3 tests: case AddTransition:Executed by:
| 6182 | ||||||||||||||||||
| 222 | trans = asTarget
| 2502-3680 | ||||||||||||||||||
| 223 | break; executed 6182 times by 3 tests: break;Executed by:
| 6182 | ||||||||||||||||||
| 224 | case executed 2438 times by 3 tests: MoveTransition:case MoveTransition:Executed by:
executed 2438 times by 3 tests: case MoveTransition:Executed by:
| 2438 | ||||||||||||||||||
| 225 | trans = asTarget
| 328-2110 | ||||||||||||||||||
| 226 | break; executed 2438 times by 3 tests: break;Executed by:
| 2438 | ||||||||||||||||||
| 227 | case executed 920 times by 2 tests: RemoveTransition:case RemoveTransition:Executed by:
executed 920 times by 2 tests: case RemoveTransition:Executed by:
| 920 | ||||||||||||||||||
| 228 | trans = asTarget
| 90-830 | ||||||||||||||||||
| 229 | break; executed 920 times by 2 tests: break;Executed by:
| 920 | ||||||||||||||||||
| 230 | } | - | ||||||||||||||||||
| 231 | - | |||||||||||||||||||
| 232 | if (!asTarget
| 244-6620 | ||||||||||||||||||
| 233 | trans = displacedTransition; executed 3340 times by 3 tests: trans = displacedTransition;Executed by:
| 3340 | ||||||||||||||||||
| 234 | if (trans
| 0-10556 | ||||||||||||||||||
| 235 | return executed 10556 times by 4 tests: trans;return trans;Executed by:
executed 10556 times by 4 tests: return trans;Executed by:
| 10556 | ||||||||||||||||||
| 236 | return never executed: nullptr;return nullptr;never executed: return nullptr; | 0 | ||||||||||||||||||
| 237 | } | - | ||||||||||||||||||
| 238 | - | |||||||||||||||||||
| 239 | const QList<int> &QQuickItemViewTransitioner::targetIndexes(QQuickItemViewTransitioner::TransitionType type) const | - | ||||||||||||||||||
| 240 | { | - | ||||||||||||||||||
| 241 | switch (type) { | - | ||||||||||||||||||
| 242 | case never executed: NoTransition:case NoTransition:never executed: case NoTransition: | 0 | ||||||||||||||||||
| 243 | break; never executed: break; | 0 | ||||||||||||||||||
| 244 | case executed 1016 times by 4 tests: PopulateTransition:case PopulateTransition:Executed by:
executed 1016 times by 4 tests: case PopulateTransition:Executed by:
| 1016 | ||||||||||||||||||
| 245 | case executed 6182 times by 3 tests: AddTransition:case AddTransition:Executed by:
executed 6182 times by 3 tests: case AddTransition:Executed by:
| 6182 | ||||||||||||||||||
| 246 | return executed 7198 times by 4 tests: addTransitionIndexes;return addTransitionIndexes;Executed by:
executed 7198 times by 4 tests: return addTransitionIndexes;Executed by:
| 7198 | ||||||||||||||||||
| 247 | case executed 2438 times by 3 tests: MoveTransition:case MoveTransition:Executed by:
executed 2438 times by 3 tests: case MoveTransition:Executed by:
| 2438 | ||||||||||||||||||
| 248 | return executed 2438 times by 3 tests: moveTransitionIndexes;return moveTransitionIndexes;Executed by:
executed 2438 times by 3 tests: return moveTransitionIndexes;Executed by:
| 2438 | ||||||||||||||||||
| 249 | case executed 920 times by 2 tests: RemoveTransition:case RemoveTransition:Executed by:
executed 920 times by 2 tests: case RemoveTransition:Executed by:
| 920 | ||||||||||||||||||
| 250 | return executed 920 times by 2 tests: removeTransitionIndexes;return removeTransitionIndexes;Executed by:
executed 920 times by 2 tests: return removeTransitionIndexes;Executed by:
| 920 | ||||||||||||||||||
| 251 | } | - | ||||||||||||||||||
| 252 | - | |||||||||||||||||||
| 253 | return never executed: qquickitemviewtransition_emptyIndexes;return qquickitemviewtransition_emptyIndexes;never executed: return qquickitemviewtransition_emptyIndexes; | 0 | ||||||||||||||||||
| 254 | } | - | ||||||||||||||||||
| 255 | - | |||||||||||||||||||
| 256 | const QList<QObject *> &QQuickItemViewTransitioner::targetItems(QQuickItemViewTransitioner::TransitionType type) const | - | ||||||||||||||||||
| 257 | { | - | ||||||||||||||||||
| 258 | switch (type) { | - | ||||||||||||||||||
| 259 | case never executed: NoTransition:case NoTransition:never executed: case NoTransition: | 0 | ||||||||||||||||||
| 260 | break; never executed: break; | 0 | ||||||||||||||||||
| 261 | case executed 1016 times by 4 tests: PopulateTransition:case PopulateTransition:Executed by:
executed 1016 times by 4 tests: case PopulateTransition:Executed by:
| 1016 | ||||||||||||||||||
| 262 | case executed 6182 times by 3 tests: AddTransition:case AddTransition:Executed by:
executed 6182 times by 3 tests: case AddTransition:Executed by:
| 6182 | ||||||||||||||||||
| 263 | return executed 7198 times by 4 tests: addTransitionTargets;return addTransitionTargets;Executed by:
executed 7198 times by 4 tests: return addTransitionTargets;Executed by:
| 7198 | ||||||||||||||||||
| 264 | case executed 2438 times by 3 tests: MoveTransition:case MoveTransition:Executed by:
executed 2438 times by 3 tests: case MoveTransition:Executed by:
| 2438 | ||||||||||||||||||
| 265 | return executed 2438 times by 3 tests: moveTransitionTargets;return moveTransitionTargets;Executed by:
executed 2438 times by 3 tests: return moveTransitionTargets;Executed by:
| 2438 | ||||||||||||||||||
| 266 | case executed 920 times by 2 tests: RemoveTransition:case RemoveTransition:Executed by:
executed 920 times by 2 tests: case RemoveTransition:Executed by:
| 920 | ||||||||||||||||||
| 267 | return executed 920 times by 2 tests: removeTransitionTargets;return removeTransitionTargets;Executed by:
executed 920 times by 2 tests: return removeTransitionTargets;Executed by:
| 920 | ||||||||||||||||||
| 268 | } | - | ||||||||||||||||||
| 269 | - | |||||||||||||||||||
| 270 | return never executed: qquickitemviewtransition_emptyTargets;return qquickitemviewtransition_emptyTargets;never executed: return qquickitemviewtransition_emptyTargets; | 0 | ||||||||||||||||||
| 271 | } | - | ||||||||||||||||||
| 272 | - | |||||||||||||||||||
| 273 | void QQuickItemViewTransitioner::finishedTransition(QQuickItemViewTransitionJob *job, QQuickItemViewTransitionableItem *item) | - | ||||||||||||||||||
| 274 | { | - | ||||||||||||||||||
| 275 | if (!runningJobs.contains(job)
| 0-8832 | ||||||||||||||||||
| 276 | return; never executed: return; | 0 | ||||||||||||||||||
| 277 | runningJobs.remove(job); | - | ||||||||||||||||||
| 278 | if (item
| 0-8832 | ||||||||||||||||||
| 279 | item->finishedTransition(); | - | ||||||||||||||||||
| 280 | if (changeListener
| 4372-4460 | ||||||||||||||||||
| 281 | changeListener->viewItemTransitionFinished(item); executed 4372 times by 3 tests: changeListener->viewItemTransitionFinished(item);Executed by:
| 4372 | ||||||||||||||||||
| 282 | } executed 8832 times by 4 tests: end of blockExecuted by:
| 8832 | ||||||||||||||||||
| 283 | } executed 8832 times by 4 tests: end of blockExecuted by:
| 8832 | ||||||||||||||||||
| 284 | - | |||||||||||||||||||
| 285 | - | |||||||||||||||||||
| 286 | QQuickItemViewTransitionableItem::QQuickItemViewTransitionableItem(QQuickItem *i) | - | ||||||||||||||||||
| 287 | : item(i) | - | ||||||||||||||||||
| 288 | , transition(nullptr) | - | ||||||||||||||||||
| 289 | , nextTransitionType(QQuickItemViewTransitioner::NoTransition) | - | ||||||||||||||||||
| 290 | , isTransitionTarget(false) | - | ||||||||||||||||||
| 291 | , nextTransitionToSet(false) | - | ||||||||||||||||||
| 292 | , nextTransitionFromSet(false) | - | ||||||||||||||||||
| 293 | , lastMovedToSet(false) | - | ||||||||||||||||||
| 294 | , prepared(false) | - | ||||||||||||||||||
| 295 | { | - | ||||||||||||||||||
| 296 | } executed 10162 times by 5 tests: end of blockExecuted by:
| 10162 | ||||||||||||||||||
| 297 | - | |||||||||||||||||||
| 298 | QQuickItemViewTransitionableItem::~QQuickItemViewTransitionableItem() | - | ||||||||||||||||||
| 299 | { | - | ||||||||||||||||||
| 300 | delete transition; | - | ||||||||||||||||||
| 301 | } executed 10162 times by 5 tests: end of blockExecuted by:
| 10162 | ||||||||||||||||||
| 302 | - | |||||||||||||||||||
| 303 | qreal QQuickItemViewTransitionableItem::itemX() const | - | ||||||||||||||||||
| 304 | { | - | ||||||||||||||||||
| 305 | if (nextTransitionType != QQuickItemViewTransitioner::NoTransition
| 128-15900 | ||||||||||||||||||
| 306 | return executed 15900 times by 5 tests: nextTransitionToSet ? nextTransitionTo.x() : item->x();return nextTransitionToSet ? nextTransitionTo.x() : item->x();Executed by:
executed 15900 times by 5 tests: return nextTransitionToSet ? nextTransitionTo.x() : item->x();Executed by:
| 15900 | ||||||||||||||||||
| 307 | else if (transition
| 10-90 | ||||||||||||||||||
| 308 | return executed 80 times by 2 tests: transition->m_toPos.x();return transition->m_toPos.x();Executed by:
executed 80 times by 2 tests: return transition->m_toPos.x();Executed by:
| 80 | ||||||||||||||||||
| 309 | else | - | ||||||||||||||||||
| 310 | return executed 48 times by 1 test: item->x();return item->x();Executed by:
executed 48 times by 1 test: return item->x();Executed by:
| 48 | ||||||||||||||||||
| 311 | } | - | ||||||||||||||||||
| 312 | - | |||||||||||||||||||
| 313 | qreal QQuickItemViewTransitionableItem::itemY() const | - | ||||||||||||||||||
| 314 | { | - | ||||||||||||||||||
| 315 | - | |||||||||||||||||||
| 316 | - | |||||||||||||||||||
| 317 | - | |||||||||||||||||||
| 318 | if (nextTransitionType != QQuickItemViewTransitioner::NoTransition
| 2197-28756 | ||||||||||||||||||
| 319 | return executed 28756 times by 5 tests: nextTransitionToSet ? nextTransitionTo.y() : item->y();return nextTransitionToSet ? nextTransitionTo.y() : item->y();Executed by:
executed 28756 times by 5 tests: return nextTransitionToSet ? nextTransitionTo.y() : item->y();Executed by:
| 28756 | ||||||||||||||||||
| 320 | else if (transition
| 92-1542 | ||||||||||||||||||
| 321 | return executed 1450 times by 2 tests: transition->m_toPos.y();return transition->m_toPos.y();Executed by:
executed 1450 times by 2 tests: return transition->m_toPos.y();Executed by:
| 1450 | ||||||||||||||||||
| 322 | else | - | ||||||||||||||||||
| 323 | return executed 747 times by 2 tests: item->y();return item->y();Executed by:
executed 747 times by 2 tests: return item->y();Executed by:
| 747 | ||||||||||||||||||
| 324 | } | - | ||||||||||||||||||
| 325 | - | |||||||||||||||||||
| 326 | void QQuickItemViewTransitionableItem::moveTo(const QPointF &pos, bool immediate) | - | ||||||||||||||||||
| 327 | { | - | ||||||||||||||||||
| 328 | if (!nextTransitionFromSet
| 26-10166 | ||||||||||||||||||
| 329 | nextTransitionFrom = item->position(); | - | ||||||||||||||||||
| 330 | nextTransitionFromSet = true; | - | ||||||||||||||||||
| 331 | } executed 10140 times by 5 tests: end of blockExecuted by:
| 10140 | ||||||||||||||||||
| 332 | - | |||||||||||||||||||
| 333 | lastMovedTo = pos; | - | ||||||||||||||||||
| 334 | lastMovedToSet = true; | - | ||||||||||||||||||
| 335 | - | |||||||||||||||||||
| 336 | if (immediate
| 0-14978 | ||||||||||||||||||
| 337 | if (immediate
| 0-12 | ||||||||||||||||||
| 338 | stopTransition(); executed 12 times by 1 test: stopTransition();Executed by:
| 12 | ||||||||||||||||||
| 339 | item->setPosition(pos); | - | ||||||||||||||||||
| 340 | } executed 12 times by 1 test: else {end of blockExecuted by:
| 12 | ||||||||||||||||||
| 341 | nextTransitionTo = pos; | - | ||||||||||||||||||
| 342 | nextTransitionToSet = true; | - | ||||||||||||||||||
| 343 | } executed 14978 times by 5 tests: end of blockExecuted by:
| 14978 | ||||||||||||||||||
| 344 | } | - | ||||||||||||||||||
| 345 | - | |||||||||||||||||||
| 346 | bool QQuickItemViewTransitionableItem::transitionScheduledOrRunning() const | - | ||||||||||||||||||
| 347 | { | - | ||||||||||||||||||
| 348 | return executed 15988 times by 5 tests: (transition && transition->isRunning())return (transition && transition->isRunning()) || nextTransitionType != QQuickItemViewTransitioner::NoTransition;Executed by:
executed 15988 times by 5 tests: return (transition && transition->isRunning()) || nextTransitionType != QQuickItemViewTransitioner::NoTransition;Executed by:
| 15988 | ||||||||||||||||||
| 349 | || nextTransitionType != QQuickItemViewTransitioner::NoTransition; executed 15988 times by 5 tests: return (transition && transition->isRunning()) || nextTransitionType != QQuickItemViewTransitioner::NoTransition;Executed by:
| 15988 | ||||||||||||||||||
| 350 | } | - | ||||||||||||||||||
| 351 | - | |||||||||||||||||||
| 352 | bool QQuickItemViewTransitionableItem::transitionRunning() const | - | ||||||||||||||||||
| 353 | { | - | ||||||||||||||||||
| 354 | return executed 9908 times by 4 tests: (transition && transition->isRunning());return (transition && transition->isRunning());Executed by:
executed 9908 times by 4 tests: return (transition && transition->isRunning());Executed by:
| 9908 | ||||||||||||||||||
| 355 | } | - | ||||||||||||||||||
| 356 | - | |||||||||||||||||||
| 357 | bool QQuickItemViewTransitionableItem::isPendingRemoval() const | - | ||||||||||||||||||
| 358 | { | - | ||||||||||||||||||
| 359 | if (nextTransitionType == QQuickItemViewTransitioner::RemoveTransition
| 12-50 | ||||||||||||||||||
| 360 | return executed 50 times by 2 tests: isTransitionTarget;return isTransitionTarget;Executed by:
executed 50 times by 2 tests: return isTransitionTarget;Executed by:
| 50 | ||||||||||||||||||
| 361 | if (transition
| 0-10 | ||||||||||||||||||
| 362 | return never executed: transition->m_isTarget;return transition->m_isTarget;never executed: return transition->m_isTarget; | 0 | ||||||||||||||||||
| 363 | return executed 12 times by 1 test: false;return false;Executed by:
executed 12 times by 1 test: return false;Executed by:
| 12 | ||||||||||||||||||
| 364 | } | - | ||||||||||||||||||
| 365 | - | |||||||||||||||||||
| 366 | bool QQuickItemViewTransitionableItem::prepareTransition(QQuickItemViewTransitioner *transitioner, int index, const QRectF &viewBounds) | - | ||||||||||||||||||
| 367 | { | - | ||||||||||||||||||
| 368 | if (nextTransitionType == QQuickItemViewTransitioner::NoTransition
| 18-14110 | ||||||||||||||||||
| 369 | return executed 18 times by 2 tests: false;return false;Executed by:
executed 18 times by 2 tests: return false;Executed by:
| 18 | ||||||||||||||||||
| 370 | - | |||||||||||||||||||
| 371 | if (isTransitionTarget
| 5122-8988 | ||||||||||||||||||
| 372 | - | |||||||||||||||||||
| 373 | - | |||||||||||||||||||
| 374 | - | |||||||||||||||||||
| 375 | if (!nextTransitionToSet
| 344-4778 | ||||||||||||||||||
| 376 | moveTo(item->position()); executed 344 times by 4 tests: moveTo(item->position());Executed by:
| 344 | ||||||||||||||||||
| 377 | } executed 5122 times by 5 tests: else {end of blockExecuted by:
| 5122 | ||||||||||||||||||
| 378 | - | |||||||||||||||||||
| 379 | if (!nextTransitionToSet
| 0-8260 | ||||||||||||||||||
| 380 | clearCurrentScheduledTransition(); | - | ||||||||||||||||||
| 381 | return executed 1538 times by 4 tests: false;return false;Executed by:
executed 1538 times by 4 tests: return false;Executed by:
| 1538 | ||||||||||||||||||
| 382 | } | - | ||||||||||||||||||
| 383 | } executed 7450 times by 3 tests: end of blockExecuted by:
| 7450 | ||||||||||||||||||
| 384 | - | |||||||||||||||||||
| 385 | bool doTransition = false; | - | ||||||||||||||||||
| 386 | - | |||||||||||||||||||
| 387 | - | |||||||||||||||||||
| 388 | - | |||||||||||||||||||
| 389 | switch (nextTransitionType) { | - | ||||||||||||||||||
| 390 | case never executed: QQuickItemViewTransitioner::NoTransition:case QQuickItemViewTransitioner::NoTransition:never executed: case QQuickItemViewTransitioner::NoTransition: | 0 | ||||||||||||||||||
| 391 | { | - | ||||||||||||||||||
| 392 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||
| 393 | } | - | ||||||||||||||||||
| 394 | case executed 1044 times by 4 tests: QQuickItemViewTransitioner::PopulateTransition:case QQuickItemViewTransitioner::PopulateTransition:Executed by:
executed 1044 times by 4 tests: case QQuickItemViewTransitioner::PopulateTransition:Executed by:
| 1044 | ||||||||||||||||||
| 395 | { | - | ||||||||||||||||||
| 396 | doTransition = viewBounds.intersects(QRectF(nextTransitionTo.x(), nextTransitionTo.y(), item->width(), item->height())); | - | ||||||||||||||||||
| 397 | break; executed 1044 times by 4 tests: break;Executed by:
| 1044 | ||||||||||||||||||
| 398 | } | - | ||||||||||||||||||
| 399 | case executed 7822 times by 4 tests: QQuickItemViewTransitioner::AddTransition:case QQuickItemViewTransitioner::AddTransition:Executed by:
executed 7822 times by 4 tests: case QQuickItemViewTransitioner::AddTransition:Executed by:
| 7822 | ||||||||||||||||||
| 400 | case executed 1134 times by 2 tests: QQuickItemViewTransitioner::RemoveTransition:case QQuickItemViewTransitioner::RemoveTransition:Executed by:
executed 1134 times by 2 tests: case QQuickItemViewTransitioner::RemoveTransition:Executed by:
| 1134 | ||||||||||||||||||
| 401 | if (viewBounds.isNull()
| 0-8956 | ||||||||||||||||||
| 402 | if (isTransitionTarget
| 0 | ||||||||||||||||||
| 403 | doTransition = true; never executed: doTransition = true; | 0 | ||||||||||||||||||
| 404 | else | - | ||||||||||||||||||
| 405 | doTransition = transitionWillChangePosition(); never executed: doTransition = transitionWillChangePosition(); | 0 | ||||||||||||||||||
| 406 | } else if (isTransitionTarget
| 3726-5230 | ||||||||||||||||||
| 407 | - | |||||||||||||||||||
| 408 | - | |||||||||||||||||||
| 409 | doTransition = (
| 150-3576 | ||||||||||||||||||
| 410 | ? viewBounds.intersects(QRectF(nextTransitionTo.x(), nextTransitionTo.y(), item->width(), item->height())) | - | ||||||||||||||||||
| 411 | : viewBounds.intersects(QRectF(item->x(), item->y(), item->width(), item->height())); | - | ||||||||||||||||||
| 412 | } executed 3726 times by 4 tests: else {end of blockExecuted by:
| 3726 | ||||||||||||||||||
| 413 | - | |||||||||||||||||||
| 414 | if (viewBounds.intersects(QRectF(item->x(), item->y(), item->width(), item->height()))
| 301-4929 | ||||||||||||||||||
| 415 | || viewBounds.intersects(QRectF(nextTransitionTo.x(), nextTransitionTo.y(), item->width(), item->height()))
| 115-186 | ||||||||||||||||||
| 416 | doTransition = transitionWillChangePosition(); | - | ||||||||||||||||||
| 417 | } executed 5044 times by 3 tests: end of blockExecuted by:
| 5044 | ||||||||||||||||||
| 418 | } executed 5230 times by 3 tests: end of blockExecuted by:
| 5230 | ||||||||||||||||||
| 419 | break; executed 8956 times by 4 tests: break;Executed by:
| 8956 | ||||||||||||||||||
| 420 | case executed 2572 times by 3 tests: QQuickItemViewTransitioner::MoveTransition:case QQuickItemViewTransitioner::MoveTransition:Executed by:
executed 2572 times by 3 tests: case QQuickItemViewTransitioner::MoveTransition:Executed by:
| 2572 | ||||||||||||||||||
| 421 | - | |||||||||||||||||||
| 422 | if (transitionWillChangePosition()
| 0-2572 | ||||||||||||||||||
| 423 | doTransition = viewBounds.isNull()
| 0-2572 | ||||||||||||||||||
| 424 | || viewBounds.intersects(QRectF(item->x(), item->y(), item->width(), item->height()))
| 354-2218 | ||||||||||||||||||
| 425 | || viewBounds.intersects(QRectF(nextTransitionTo.x(), nextTransitionTo.y(), item->width(), item->height()))
| 78-276 | ||||||||||||||||||
| 426 | } executed 2572 times by 3 tests: end of blockExecuted by:
| 2572 | ||||||||||||||||||
| 427 | break; executed 2572 times by 3 tests: break;Executed by:
| 2572 | ||||||||||||||||||
| 428 | } | - | ||||||||||||||||||
| 429 | - | |||||||||||||||||||
| 430 | if (doTransition
| 354-12218 | ||||||||||||||||||
| 431 | - | |||||||||||||||||||
| 432 | - | |||||||||||||||||||
| 433 | if (isTransitionTarget
| 5020-7198 | ||||||||||||||||||
| 434 | transitioner->addToTargetLists(nextTransitionType, this, index); executed 5020 times by 5 tests: transitioner->addToTargetLists(nextTransitionType, this, index);Executed by:
| 5020 | ||||||||||||||||||
| 435 | doTransition = transitioner->canTransition(nextTransitionType, isTransitionTarget); | - | ||||||||||||||||||
| 436 | } executed 12218 times by 5 tests: end of blockExecuted by:
| 12218 | ||||||||||||||||||
| 437 | - | |||||||||||||||||||
| 438 | if (!doTransition
| 2016-10556 | ||||||||||||||||||
| 439 | - | |||||||||||||||||||
| 440 | - | |||||||||||||||||||
| 441 | item->setPosition(nextTransitionTo); | - | ||||||||||||||||||
| 442 | stopTransition(); | - | ||||||||||||||||||
| 443 | } executed 2016 times by 4 tests: end of blockExecuted by:
| 2016 | ||||||||||||||||||
| 444 | - | |||||||||||||||||||
| 445 | prepared = true; | - | ||||||||||||||||||
| 446 | return executed 12572 times by 5 tests: doTransition;return doTransition;Executed by:
executed 12572 times by 5 tests: return doTransition;Executed by:
| 12572 | ||||||||||||||||||
| 447 | } | - | ||||||||||||||||||
| 448 | - | |||||||||||||||||||
| 449 | void QQuickItemViewTransitionableItem::startTransition(QQuickItemViewTransitioner *transitioner, int index) | - | ||||||||||||||||||
| 450 | { | - | ||||||||||||||||||
| 451 | if (nextTransitionType == QQuickItemViewTransitioner::NoTransition
| 3414-10556 | ||||||||||||||||||
| 452 | return; executed 3414 times by 4 tests: return;Executed by:
| 3414 | ||||||||||||||||||
| 453 | - | |||||||||||||||||||
| 454 | if (!prepared
| 0-10556 | ||||||||||||||||||
| 455 | QMessageLogger(__FILE__, 498, __PRETTY_FUNCTION__).warning("QQuickViewItem::prepareTransition() not called!"); | - | ||||||||||||||||||
| 456 | return; never executed: return; | 0 | ||||||||||||||||||
| 457 | } | - | ||||||||||||||||||
| 458 | - | |||||||||||||||||||
| 459 | if (!transition
| 8-8226 | ||||||||||||||||||
| 460 | delete transition; | - | ||||||||||||||||||
| 461 | transition = new QQuickItemViewTransitionJob; | - | ||||||||||||||||||
| 462 | } executed 10412 times by 4 tests: end of blockExecuted by:
| 10412 | ||||||||||||||||||
| 463 | - | |||||||||||||||||||
| 464 | transition->startTransition(this, index, transitioner, nextTransitionType, nextTransitionTo, isTransitionTarget); | - | ||||||||||||||||||
| 465 | clearCurrentScheduledTransition(); | - | ||||||||||||||||||
| 466 | } executed 10556 times by 4 tests: end of blockExecuted by:
| 10556 | ||||||||||||||||||
| 467 | - | |||||||||||||||||||
| 468 | void QQuickItemViewTransitionableItem::setNextTransition(QQuickItemViewTransitioner::TransitionType type, bool isTargetItem) | - | ||||||||||||||||||
| 469 | { | - | ||||||||||||||||||
| 470 | - | |||||||||||||||||||
| 471 | - | |||||||||||||||||||
| 472 | - | |||||||||||||||||||
| 473 | nextTransitionType = type; | - | ||||||||||||||||||
| 474 | isTransitionTarget = isTargetItem; | - | ||||||||||||||||||
| 475 | - | |||||||||||||||||||
| 476 | if (!nextTransitionFromSet
| 792-14288 | ||||||||||||||||||
| 477 | nextTransitionFrom = lastMovedTo; | - | ||||||||||||||||||
| 478 | nextTransitionFromSet = true; | - | ||||||||||||||||||
| 479 | } executed 3898 times by 3 tests: end of blockExecuted by:
| 3898 | ||||||||||||||||||
| 480 | } executed 15080 times by 5 tests: end of blockExecuted by:
| 15080 | ||||||||||||||||||
| 481 | - | |||||||||||||||||||
| 482 | bool QQuickItemViewTransitionableItem::transitionWillChangePosition() const | - | ||||||||||||||||||
| 483 | { | - | ||||||||||||||||||
| 484 | if (transitionRunning()
| 0-7218 | ||||||||||||||||||
| 485 | return executed 398 times by 3 tests: true;return true;Executed by:
executed 398 times by 3 tests: return true;Executed by:
| 398 | ||||||||||||||||||
| 486 | if (!nextTransitionFromSet
| 0-7218 | ||||||||||||||||||
| 487 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||
| 488 | return executed 7218 times by 3 tests: nextTransitionTo != nextTransitionFrom;return nextTransitionTo != nextTransitionFrom;Executed by:
executed 7218 times by 3 tests: return nextTransitionTo != nextTransitionFrom;Executed by:
| 7218 | ||||||||||||||||||
| 489 | } | - | ||||||||||||||||||
| 490 | - | |||||||||||||||||||
| 491 | void QQuickItemViewTransitionableItem::resetNextTransitionPos() | - | ||||||||||||||||||
| 492 | { | - | ||||||||||||||||||
| 493 | nextTransitionToSet = false; | - | ||||||||||||||||||
| 494 | nextTransitionTo = QPointF(); | - | ||||||||||||||||||
| 495 | } executed 10860 times by 5 tests: end of blockExecuted by:
| 10860 | ||||||||||||||||||
| 496 | - | |||||||||||||||||||
| 497 | void QQuickItemViewTransitionableItem::finishedTransition() | - | ||||||||||||||||||
| 498 | { | - | ||||||||||||||||||
| 499 | resetNextTransitionPos(); | - | ||||||||||||||||||
| 500 | } executed 8832 times by 4 tests: end of blockExecuted by:
| 8832 | ||||||||||||||||||
| 501 | - | |||||||||||||||||||
| 502 | void QQuickItemViewTransitionableItem::clearCurrentScheduledTransition() | - | ||||||||||||||||||
| 503 | { | - | ||||||||||||||||||
| 504 | - | |||||||||||||||||||
| 505 | - | |||||||||||||||||||
| 506 | - | |||||||||||||||||||
| 507 | nextTransitionType = QQuickItemViewTransitioner::NoTransition; | - | ||||||||||||||||||
| 508 | isTransitionTarget = false; | - | ||||||||||||||||||
| 509 | prepared = false; | - | ||||||||||||||||||
| 510 | nextTransitionFromSet = false; | - | ||||||||||||||||||
| 511 | } executed 14122 times by 5 tests: end of blockExecuted by:
| 14122 | ||||||||||||||||||
| 512 | - | |||||||||||||||||||
| 513 | void QQuickItemViewTransitionableItem::stopTransition() | - | ||||||||||||||||||
| 514 | { | - | ||||||||||||||||||
| 515 | if (transition
| 336-1692 | ||||||||||||||||||
| 516 | transition->cancel(); executed 336 times by 2 tests: transition->cancel();Executed by:
| 336 | ||||||||||||||||||
| 517 | clearCurrentScheduledTransition(); | - | ||||||||||||||||||
| 518 | resetNextTransitionPos(); | - | ||||||||||||||||||
| 519 | } executed 2028 times by 4 tests: end of blockExecuted by:
| 2028 | ||||||||||||||||||
| 520 | - | |||||||||||||||||||
| 521 | - | |||||||||||||||||||
| 522 | QQuickViewTransitionAttached::QQuickViewTransitionAttached(QObject *parent) | - | ||||||||||||||||||
| 523 | : QObject(parent), m_item(nullptr), m_index(-1) | - | ||||||||||||||||||
| 524 | { | - | ||||||||||||||||||
| 525 | } executed 1090 times by 4 tests: end of blockExecuted by:
| 1090 | ||||||||||||||||||
| 526 | QQmlListProperty<QObject> QQuickViewTransitionAttached::targetItems() | - | ||||||||||||||||||
| 527 | { | - | ||||||||||||||||||
| 528 | return executed 9018 times by 3 tests: QQmlListProperty<QObject>(this, m_targetItems);return QQmlListProperty<QObject>(this, m_targetItems);Executed by:
executed 9018 times by 3 tests: return QQmlListProperty<QObject>(this, m_targetItems);Executed by:
| 9018 | ||||||||||||||||||
| 529 | } | - | ||||||||||||||||||
| 530 | - | |||||||||||||||||||
| 531 | QQuickViewTransitionAttached *QQuickViewTransitionAttached::qmlAttachedProperties(QObject *obj) | - | ||||||||||||||||||
| 532 | { | - | ||||||||||||||||||
| 533 | return executed 1090 times by 4 tests: new QQuickViewTransitionAttached(obj);return new QQuickViewTransitionAttached(obj);Executed by:
executed 1090 times by 4 tests: return new QQuickViewTransitionAttached(obj);Executed by:
| 1090 | ||||||||||||||||||
| 534 | } | - | ||||||||||||||||||
| 535 | - | |||||||||||||||||||
| 536 | - | |||||||||||||||||||
| 537 | - | |||||||||||||||||||
| Switch to Source code | Preprocessed file |