OpenCoverage

qquickstate.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickstate.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtQuick module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40#include "qquickstate_p_p.h"-
41#include "qquickstate_p.h"-
42-
43#include "qquickstategroup_p.h"-
44#include "qquickstatechangescript_p.h"-
45-
46#include <private/qqmlglobal_p.h>-
47-
48#include <QtCore/qdebug.h>-
49-
50QT_BEGIN_NAMESPACE-
51-
52DEFINE_BOOL_CONFIG_OPTION(stateChangeDebug, STATECHANGE_DEBUG);
never executed: status = Yes;
never executed: end of block
executed 40 times by 20 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
executed 588 times by 20 tests: return status == Yes;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
status == UnknownDescription
TRUEevaluated 40 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
FALSEevaluated 548 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
__builtin_expe...BUG")), false)Description
TRUEnever evaluated
FALSEevaluated 40 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
v != "0"Description
TRUEnever evaluated
FALSEnever evaluated
v != "false"Description
TRUEnever evaluated
FALSEnever evaluated
0-588
53-
54QQuickStateAction::QQuickStateAction()-
55: restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false), fromBinding(nullptr), event(nullptr),-
56 specifiedObject(nullptr)-
57{-
58}
executed 22093 times by 28 tests: end of block
Executed by:
  • tst_examples
  • tst_flickableinterop
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimatedimage
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickgridview
  • tst_qquickimage
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquicksmoothedanimation
  • tst_qquickspringanimation
  • ...
22093
59-
60QQuickStateAction::QQuickStateAction(QObject *target, const QString &propertyName,-
61 const QVariant &value)-
62: restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false),-
63 property(target, propertyName, qmlEngine(target)), toValue(value),-
64 fromBinding(nullptr), event(nullptr),-
65 specifiedObject(target), specifiedProperty(propertyName)-
66{-
67 if (property.isValid())
property.isValid()Description
TRUEevaluated 21298 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickspringanimation
  • tst_qquickstates
FALSEnever evaluated
0-21298
68 fromValue = property.read();
executed 21298 times by 8 tests: fromValue = property.read();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickspringanimation
  • tst_qquickstates
21298
69}
executed 21298 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickgridview
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickpositioners
  • tst_qquickspringanimation
  • tst_qquickstates
21298
70-
71QQuickStateAction::QQuickStateAction(QObject *target, const QQmlProperty &property, const QString &propertyName, const QVariant &value)-
72: restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false),-
73 property(property), toValue(value),-
74 fromBinding(nullptr), event(nullptr),-
75 specifiedObject(target), specifiedProperty(propertyName)-
76{-
77 if (property.isValid())
property.isValid()Description
TRUEevaluated 480 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquickmousearea
  • tst_qquickstates
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickstates
6-480
78 fromValue = property.read();
executed 480 times by 10 tests: fromValue = property.read();
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquickmousearea
  • tst_qquickstates
480
79}
executed 486 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquickmousearea
  • tst_qquickstates
486
80-
81-
82QQuickStateActionEvent::~QQuickStateActionEvent()-
83{-
84}-
85-
86void QQuickStateActionEvent::execute()-
87{-
88}-
89-
90bool QQuickStateActionEvent::isReversable()-
91{-
92 return false;
executed 16 times by 2 tests: return false;
Executed by:
  • tst_qquickanimations
  • tst_qquickstates
16
93}-
94-
95void QQuickStateActionEvent::reverse()-
96{-
97}-
98-
99bool QQuickStateActionEvent::changesBindings()-
100{-
101 return false;
executed 350 times by 5 tests: return false;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickstates
350
102}-
103-
104void QQuickStateActionEvent::clearBindings()-
105{-
106}-
107-
108bool QQuickStateActionEvent::mayOverride(QQuickStateActionEvent *other)-
109{-
110 Q_UNUSED(other);-
111 return false;
never executed: return false;
0
112}-
113-
114QQuickStateOperation::QQuickStateOperation(QObjectPrivate &dd, QObject *parent)-
115 : QObject(dd, parent)-
116{-
117}
executed 624 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
624
118-
119/*!-
120 \qmltype State-
121 \instantiates QQuickState-
122 \inqmlmodule QtQuick-
123 \ingroup qtquick-states-
124 \brief Defines configurations of objects and properties.-
125-
126 A \e state is a set of batched changes from the default configuration.-
127-
128 All items have a default state that defines the default configuration of objects-
129 and property values. New states can be defined by adding State items to the \l {Item::states}{states} property to-
130 allow items to switch between different configurations. These configurations-
131 can, for example, be used to apply different sets of property values or execute-
132 different scripts.-
133-
134 The following example displays a single \l Rectangle. In the default state, the rectangle-
135 is colored black. In the "clicked" state, a PropertyChanges object changes the-
136 rectangle's color to red. Clicking within the MouseArea toggles the rectangle's state-
137 between the default state and the "clicked" state, thus toggling the color of the-
138 rectangle between black and red.-
139-
140 \snippet qml/state.qml 0-
141-
142 Notice the default state is referred to using an empty string ("").-
143-
144 States are commonly used together with \l{Animation and Transitions in Qt Quick}{Transitions} to provide-
145 animations when state changes occur.-
146-
147 \note Setting the state of an object from within another state of the same object is-
148 not allowed.-
149-
150 \sa {Qt Quick Examples - Animation#States}{States example}, {Qt Quick States},-
151 {Animation and Transitions in Qt Quick}{Transitions}, {Qt QML}-
152*/-
153QQuickState::QQuickState(QObject *parent)-
154: QObject(*(new QQuickStatePrivate), parent)-
155{-
156 Q_D(QQuickState);-
157 d->transitionManager.setState(this);-
158}
executed 1522 times by 20 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
1522
159-
160QQuickState::~QQuickState()-
161{-
162 Q_D(QQuickState);-
163 if (d->group)
d->groupDescription
TRUEevaluated 244 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
FALSEevaluated 1046 times by 19 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
244-1046
164 d->group->removeState(this);
executed 244 times by 20 tests: d->group->removeState(this);
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
244
165}
executed 1290 times by 20 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
1290
166-
167/*!-
168 \qmlproperty string QtQuick::State::name-
169 This property holds the name of the state.-
170-
171 Each state should have a unique name within its item.-
172*/-
173QString QQuickState::name() const-
174{-
175 Q_D(const QQuickState);-
176 return d->name;
executed 1784 times by 19 tests: return d->name;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
1784
177}-
178-
179void QQuickState::setName(const QString &n)-
180{-
181 Q_D(QQuickState);-
182 d->name = n;-
183 d->named = true;-
184}
executed 1172 times by 19 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
1172
185-
186bool QQuickState::isNamed() const-
187{-
188 Q_D(const QQuickState);-
189 return d->named;
executed 1796 times by 18 tests: return d->named;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
1796
190}-
191-
192bool QQuickState::isWhenKnown() const-
193{-
194 Q_D(const QQuickState);-
195 return d->when != nullptr;
executed 1224 times by 18 tests: return d->when != nullptr;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
1224
196}-
197-
198/*!-
199 \qmlproperty bool QtQuick::State::when-
200 This property holds when the state should be applied.-
201-
202 This should be set to an expression that evaluates to \c true when you want the state to-
203 be applied. For example, the following \l Rectangle changes in and out of the "hidden"-
204 state when the \l MouseArea is pressed:-
205-
206 \snippet qml/state-when.qml 0-
207-
208 If multiple states in a group have \c when clauses that evaluate to \c true-
209 at the same time, the first matching state will be applied. For example, in-
210 the following snippet \c state1 will always be selected rather than-
211 \c state2 when sharedCondition becomes \c true.-
212 \qml-
213 Item {-
214 states: [-
215 State { name: "state1"; when: sharedCondition },-
216 State { name: "state2"; when: sharedCondition }-
217 ]-
218 // ...-
219 }-
220 \endqml-
221*/-
222QQmlBinding *QQuickState::when() const-
223{-
224 Q_D(const QQuickState);-
225 return d->when.data();
executed 1260 times by 8 tests: return d->when.data();
Executed by:
  • tst_examples
  • tst_qqmltranslation
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
1260
226}-
227-
228void QQuickState::setWhen(QQmlBinding *when)-
229{-
230 Q_D(QQuickState);-
231 d->when = when;-
232 if (d->group)
d->groupDescription
TRUEevaluated 624 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmltranslation
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
FALSEnever evaluated
0-624
233 d->group->updateAutoState();
executed 624 times by 8 tests: d->group->updateAutoState();
Executed by:
  • tst_examples
  • tst_qqmltranslation
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
624
234}
executed 624 times by 8 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmltranslation
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
624
235-
236/*!-
237 \qmlproperty string QtQuick::State::extend-
238 This property holds the state that this state extends.-
239-
240 When a state extends another state, it inherits all the changes of that state.-
241-
242 The state being extended is treated as the base state in regards to-
243 the changes specified by the extending state.-
244*/-
245QString QQuickState::extends() const-
246{-
247 Q_D(const QQuickState);-
248 return d->extends;
executed 4 times by 1 test: return d->extends;
Executed by:
  • tst_qqmlenginedebugservice
4
249}-
250-
251void QQuickState::setExtends(const QString &extends)-
252{-
253 Q_D(QQuickState);-
254 d->extends = extends;-
255}
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquickstates
8
256-
257/*!-
258 \qmlproperty list<Change> QtQuick::State::changes-
259 This property holds the changes to apply for this state-
260 \default-
261-
262 By default these changes are applied against the default state. If the state-
263 extends another state, then the changes are applied against the state being-
264 extended.-
265*/-
266QQmlListProperty<QQuickStateOperation> QQuickState::changes()-
267{-
268 Q_D(QQuickState);-
269 return QQmlListProperty<QQuickStateOperation>(this, &d->operations, QQuickStatePrivate::operations_append,
executed 370 times by 18 tests: return QQmlListProperty<QQuickStateOperation>(this, &d->operations, QQuickStatePrivate::operations_append, QQuickStatePrivate::operations_count, QQuickStatePrivate::operations_at, QQuickStatePrivate::operations_clear);
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
370
270 QQuickStatePrivate::operations_count, QQuickStatePrivate::operations_at,
executed 370 times by 18 tests: return QQmlListProperty<QQuickStateOperation>(this, &d->operations, QQuickStatePrivate::operations_append, QQuickStatePrivate::operations_count, QQuickStatePrivate::operations_at, QQuickStatePrivate::operations_clear);
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
370
271 QQuickStatePrivate::operations_clear);
executed 370 times by 18 tests: return QQmlListProperty<QQuickStateOperation>(this, &d->operations, QQuickStatePrivate::operations_append, QQuickStatePrivate::operations_count, QQuickStatePrivate::operations_at, QQuickStatePrivate::operations_clear);
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
370
272}-
273-
274int QQuickState::operationCount() const-
275{-
276 Q_D(const QQuickState);-
277 return d->operations.count();
executed 6 times by 2 tests: return d->operations.count();
Executed by:
  • tst_qquickdesignersupport
  • tst_qquickstates
6
278}-
279-
280QQuickStateOperation *QQuickState::operationAt(int index) const-
281{-
282 Q_D(const QQuickState);-
283 return d->operations.at(index);
executed 18 times by 1 test: return d->operations.at(index);
Executed by:
  • tst_qquickstates
18
284}-
285-
286QQuickState &QQuickState::operator<<(QQuickStateOperation *op)-
287{-
288 Q_D(QQuickState);-
289 d->operations.append(QQuickStatePrivate::OperationGuard(op, &d->operations));-
290 return *this;
never executed: return *this;
0
291}-
292-
293void QQuickStatePrivate::complete()-
294{-
295 Q_Q(QQuickState);-
296-
297 for (int ii = 0; ii < reverting.count(); ++ii) {
ii < reverting.count()Description
TRUEevaluated 162 times by 12 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
FALSEevaluated 574 times by 19 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
162-574
298 for (int jj = 0; jj < revertList.count(); ++jj) {
jj < revertList.count()Description
TRUEevaluated 164 times by 12 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
FALSEnever evaluated
0-164
299 const QQuickRevertAction &revert = reverting.at(ii);-
300 const QQuickSimpleAction &simple = revertList.at(jj);-
301 if ((revert.event && simple.event() == revert.event) ||
revert.eventDescription
TRUEevaluated 40 times by 3 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickstates
FALSEevaluated 124 times by 11 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickmousearea
  • tst_qquickstates
simple.event() == revert.eventDescription
TRUEevaluated 40 times by 3 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickstates
FALSEnever evaluated
0-124
302 simple.property() == revert.property) {
simple.propert...evert.propertyDescription
TRUEevaluated 122 times by 11 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickmousearea
  • tst_qquickstates
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickstates
2-122
303 revertList.removeAt(jj);-
304 break;
executed 162 times by 12 tests: break;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
162
305 }-
306 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickstates
2
307 }
executed 162 times by 12 tests: end of block
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
162
308 reverting.clear();-
309-
310 if (group)
groupDescription
TRUEevaluated 574 times by 19 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
FALSEnever evaluated
0-574
311 group->stateAboutToComplete();
executed 574 times by 19 tests: group->stateAboutToComplete();
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
574
312 emit q->completed();-
313}
executed 574 times by 19 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
574
314-
315// Generate a list of actions for this state. This includes coelescing state-
316// actions that this state "extends"-
317QQuickStateOperation::ActionList-
318QQuickStatePrivate::generateActionList() const-
319{-
320 QQuickStateOperation::ActionList applyList;-
321 if (inState)
inStateDescription
TRUEnever evaluated
FALSEevaluated 602 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
0-602
322 return applyList;
never executed: return applyList;
0
323-
324 // Prevent "extends" recursion-
325 inState = true;-
326-
327 if (!extends.isEmpty()) {
!extends.isEmpty()Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 588 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
14-588
328 QList<QQuickState *> states = group ? group->states() : QList<QQuickState *>();
groupDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEnever evaluated
0-14
329 for (int ii = 0; ii < states.count(); ++ii)
ii < states.count()Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickstates
14-28
330 if (states.at(ii)->name() == extends) {
states.at(ii)-...e() == extendsDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickstates
14
331 qmlExecuteDeferred(states.at(ii));-
332 applyList = static_cast<QQuickStatePrivate*>(states.at(ii)->d_func())->generateActionList();-
333 }
executed 14 times by 1 test: end of block
Executed by:
  • tst_qquickstates
14
334 }
executed 14 times by 1 test: end of block
Executed by:
  • tst_qquickstates
14
335-
336 for (QQuickStateOperation *op : operations)-
337 applyList << op->actions();
executed 710 times by 18 tests: applyList << op->actions();
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
710
338-
339 inState = false;-
340 return applyList;
executed 602 times by 20 tests: return applyList;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
602
341}-
342-
343QQuickStateGroup *QQuickState::stateGroup() const-
344{-
345 Q_D(const QQuickState);-
346 return d->group;
executed 174 times by 3 tests: return d->group;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickdesignersupport
  • tst_qquickstates
174
347}-
348-
349void QQuickState::setStateGroup(QQuickStateGroup *group)-
350{-
351 Q_D(QQuickState);-
352 d->group = group;-
353}
executed 2556 times by 20 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
2556
354-
355void QQuickState::cancel()-
356{-
357 Q_D(QQuickState);-
358 d->transitionManager.cancel();-
359}
executed 1176 times by 20 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
1176
360-
361void QQuickStateAction::deleteFromBinding()-
362{-
363 if (fromBinding) {
fromBindingDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickstates
4-6
364 QQmlPropertyPrivate::removeBinding(property);-
365 fromBinding = nullptr;-
366 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickstates
4
367}
executed 10 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickstates
10
368-
369bool QQuickState::containsPropertyInRevertList(QObject *target, const QString &name) const-
370{-
371 Q_D(const QQuickState);-
372-
373 if (isStateActive()) {
isStateActive()Description
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickstates
FALSEnever evaluated
0-8
374 QListIterator<QQuickSimpleAction> revertListIterator(d->revertList);-
375-
376 while (revertListIterator.hasNext()) {
revertListIterator.hasNext()Description
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickstates
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickstates
4-6
377 const QQuickSimpleAction &simpleAction = revertListIterator.next();-
378 if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name)
simpleAction.s...ct() == targetDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickstates
FALSEnever evaluated
simpleAction.s...erty() == nameDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickstates
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
0-6
379 return true;
executed 4 times by 2 tests: return true;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickstates
4
380 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qqmlenginedebugservice
2
381 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickstates
4
382-
383 return false;
executed 4 times by 2 tests: return false;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickstates
4
384}-
385-
386bool QQuickState::changeValueInRevertList(QObject *target, const QString &name, const QVariant &revertValue)-
387{-
388 Q_D(QQuickState);-
389-
390 if (isStateActive()) {
isStateActive()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickdesignersupport
FALSEnever evaluated
0-2
391 QMutableListIterator<QQuickSimpleAction> revertListIterator(d->revertList);-
392-
393 while (revertListIterator.hasNext()) {
revertListIterator.hasNext()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickdesignersupport
FALSEnever evaluated
0-2
394 QQuickSimpleAction &simpleAction = revertListIterator.next();-
395 if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name) {
simpleAction.s...ct() == targetDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickdesignersupport
FALSEnever evaluated
simpleAction.s...erty() == nameDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickdesignersupport
FALSEnever evaluated
0-2
396 simpleAction.setValue(revertValue);-
397 return true;
executed 2 times by 1 test: return true;
Executed by:
  • tst_qquickdesignersupport
2
398 }-
399 }
never executed: end of block
0
400 }
never executed: end of block
0
401-
402 return false;
never executed: return false;
0
403}-
404-
405bool QQuickState::changeBindingInRevertList(QObject *target, const QString &name, QQmlAbstractBinding *binding)-
406{-
407 Q_D(QQuickState);-
408-
409 if (isStateActive()) {
isStateActive()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
FALSEnever evaluated
0-2
410 QMutableListIterator<QQuickSimpleAction> revertListIterator(d->revertList);-
411-
412 while (revertListIterator.hasNext()) {
revertListIterator.hasNext()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
FALSEnever evaluated
0-2
413 QQuickSimpleAction &simpleAction = revertListIterator.next();-
414 if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name) {
simpleAction.s...ct() == targetDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
FALSEnever evaluated
simpleAction.s...erty() == nameDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
FALSEnever evaluated
0-2
415 simpleAction.setBinding(binding);-
416 return true;
executed 2 times by 1 test: return true;
Executed by:
  • tst_qqmlenginedebugservice
2
417 }-
418 }
never executed: end of block
0
419 }
never executed: end of block
0
420-
421 return false;
never executed: return false;
0
422}-
423-
424bool QQuickState::removeEntryFromRevertList(QObject *target, const QString &name)-
425{-
426 Q_D(QQuickState);-
427-
428 if (isStateActive()) {
isStateActive()Description
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickstates
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickdesignersupport
  • tst_qquickstates
4-6
429 QMutableListIterator<QQuickSimpleAction> revertListIterator(d->revertList);-
430-
431 while (revertListIterator.hasNext()) {
revertListIterator.hasNext()Description
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickstates
FALSEnever evaluated
0-6
432 QQuickSimpleAction &simpleAction = revertListIterator.next();-
433 if (simpleAction.property().object() == target && simpleAction.property().name() == name) {
simpleAction.p...ct() == targetDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickstates
FALSEnever evaluated
simpleAction.p...name() == nameDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickstates
FALSEnever evaluated
0-6
434 QQmlPropertyPrivate::removeBinding(simpleAction.property());-
435-
436 simpleAction.property().write(simpleAction.value());-
437 if (simpleAction.binding())
simpleAction.binding()Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickstates
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickstates
2-4
438 QQmlPropertyPrivate::setBinding(simpleAction.binding());
executed 4 times by 2 tests: QQmlPropertyPrivate::setBinding(simpleAction.binding());
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickstates
4
439-
440 revertListIterator.remove();-
441 return true;
executed 6 times by 2 tests: return true;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickstates
6
442 }-
443 }
never executed: end of block
0
444 }
never executed: end of block
0
445-
446 return false;
executed 4 times by 2 tests: return false;
Executed by:
  • tst_qquickdesignersupport
  • tst_qquickstates
4
447}-
448-
449void QQuickState::addEntryToRevertList(const QQuickStateAction &action)-
450{-
451 Q_D(QQuickState);-
452-
453 QQuickSimpleAction simpleAction(action);-
454-
455 d->revertList.append(simpleAction);-
456}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qqmlenginedebugservice
2
457-
458void QQuickState::removeAllEntriesFromRevertList(QObject *target)-
459{-
460 Q_D(QQuickState);-
461-
462 if (isStateActive()) {
isStateActive()Description
TRUEnever evaluated
FALSEnever evaluated
0
463 QMutableListIterator<QQuickSimpleAction> revertListIterator(d->revertList);-
464-
465 while (revertListIterator.hasNext()) {
revertListIterator.hasNext()Description
TRUEnever evaluated
FALSEnever evaluated
0
466 QQuickSimpleAction &simpleAction = revertListIterator.next();-
467 if (simpleAction.property().object() == target) {
simpleAction.p...ct() == targetDescription
TRUEnever evaluated
FALSEnever evaluated
0
468 QQmlPropertyPrivate::removeBinding(simpleAction.property());-
469-
470 simpleAction.property().write(simpleAction.value());-
471 if (simpleAction.binding())
simpleAction.binding()Description
TRUEnever evaluated
FALSEnever evaluated
0
472 QQmlPropertyPrivate::setBinding(simpleAction.binding());
never executed: QQmlPropertyPrivate::setBinding(simpleAction.binding());
0
473-
474 revertListIterator.remove();-
475 }
never executed: end of block
0
476 }
never executed: end of block
0
477 }
never executed: end of block
0
478}
never executed: end of block
0
479-
480void QQuickState::addEntriesToRevertList(const QList<QQuickStateAction> &actionList)-
481{-
482 Q_D(QQuickState);-
483 if (isStateActive()) {
isStateActive()Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickdesignersupport
0-2
484 QList<QQuickSimpleAction> simpleActionList;-
485 simpleActionList.reserve(actionList.count());-
486-
487 QListIterator<QQuickStateAction> actionListIterator(actionList);-
488 while(actionListIterator.hasNext()) {
actionListIterator.hasNext()Description
TRUEnever evaluated
FALSEnever evaluated
0
489 const QQuickStateAction &action = actionListIterator.next();-
490 QQuickSimpleAction simpleAction(action);-
491 action.property.write(action.toValue);-
492 if (action.toBinding)
action.toBindingDescription
TRUEnever evaluated
FALSEnever evaluated
0
493 QQmlPropertyPrivate::setBinding(action.toBinding.data());
never executed: QQmlPropertyPrivate::setBinding(action.toBinding.data());
0
494-
495 simpleActionList.append(simpleAction);-
496 }
never executed: end of block
0
497-
498 d->revertList.append(simpleActionList);-
499 }
never executed: end of block
0
500}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickdesignersupport
2
501-
502QVariant QQuickState::valueInRevertList(QObject *target, const QString &name) const-
503{-
504 Q_D(const QQuickState);-
505-
506 if (isStateActive()) {
isStateActive()Description
TRUEnever evaluated
FALSEnever evaluated
0
507 QListIterator<QQuickSimpleAction> revertListIterator(d->revertList);-
508-
509 while (revertListIterator.hasNext()) {
revertListIterator.hasNext()Description
TRUEnever evaluated
FALSEnever evaluated
0
510 const QQuickSimpleAction &simpleAction = revertListIterator.next();-
511 if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name)
simpleAction.s...ct() == targetDescription
TRUEnever evaluated
FALSEnever evaluated
simpleAction.s...erty() == nameDescription
TRUEnever evaluated
FALSEnever evaluated
0
512 return simpleAction.value();
never executed: return simpleAction.value();
0
513 }
never executed: end of block
0
514 }
never executed: end of block
0
515-
516 return QVariant();
never executed: return QVariant();
0
517}-
518-
519QQmlAbstractBinding *QQuickState::bindingInRevertList(QObject *target, const QString &name) const-
520{-
521 Q_D(const QQuickState);-
522-
523 if (isStateActive()) {
isStateActive()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEnever evaluated
0-12
524 QListIterator<QQuickSimpleAction> revertListIterator(d->revertList);-
525-
526 while (revertListIterator.hasNext()) {
revertListIterator.hasNext()Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickstates
2-16
527 const QQuickSimpleAction &simpleAction = revertListIterator.next();-
528 if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name)
simpleAction.s...ct() == targetDescription
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEnever evaluated
simpleAction.s...erty() == nameDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickstates
0-16
529 return simpleAction.binding();
executed 10 times by 1 test: return simpleAction.binding();
Executed by:
  • tst_qquickstates
10
530 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquickstates
6
531 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickstates
2
532-
533 return nullptr;
executed 2 times by 1 test: return nullptr;
Executed by:
  • tst_qquickstates
2
534}-
535-
536bool QQuickState::isStateActive() const-
537{-
538 return stateGroup() && stateGroup()->state() == name();
executed 68 times by 3 tests: return stateGroup() && stateGroup()->state() == name();
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickdesignersupport
  • tst_qquickstates
68
539}-
540-
541void QQuickState::apply(QQuickTransition *trans, QQuickState *revert)-
542{-
543 Q_D(QQuickState);-
544-
545 qmlExecuteDeferred(this);-
546-
547 cancel();-
548 if (revert)
revertDescription
TRUEevaluated 588 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
FALSEnever evaluated
0-588
549 revert->cancel();
executed 588 times by 20 tests: revert->cancel();
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
588
550 d->revertList.clear();-
551 d->reverting.clear();-
552-
553 if (revert) {
revertDescription
TRUEevaluated 588 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
FALSEnever evaluated
0-588
554 QQuickStatePrivate *revertPrivate =-
555 static_cast<QQuickStatePrivate*>(revert->d_func());-
556 d->revertList = revertPrivate->revertList;-
557 revertPrivate->revertList.clear();-
558 }
executed 588 times by 20 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
588
559-
560 // List of actions caused by this state-
561 QQuickStateOperation::ActionList applyList = d->generateActionList();-
562-
563 // List of actions that need to be reverted to roll back (just) this state-
564 QQuickStatePrivate::SimpleActionList additionalReverts;-
565 // First add the reverse of all the applyList actions-
566 for (int ii = 0; ii < applyList.count(); ++ii) {
ii < applyList.count()Description
TRUEevaluated 924 times by 18 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
FALSEevaluated 588 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
588-924
567 QQuickStateAction &action = applyList[ii];-
568-
569 if (action.event) {
action.eventDescription
TRUEevaluated 198 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickstates
FALSEevaluated 726 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
198-726
570 if (!action.event->isReversable())
!action.event->isReversable()Description
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickstates
FALSEevaluated 190 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickstates
8-190
571 continue;
executed 8 times by 2 tests: continue;
Executed by:
  • tst_qquickanimations
  • tst_qquickstates
8
572 bool found = false;-
573 for (int jj = 0; jj < d->revertList.count(); ++jj) {
jj < d->revertList.count()Description
TRUEevaluated 18 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickstates
FALSEevaluated 176 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickstates
18-176
574 QQuickStateActionEvent *event = d->revertList.at(jj).event();-
575 if (event && event->type() == action.event->type()) {
eventDescription
TRUEevaluated 14 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickstates
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
event->type() ....event->type()Description
TRUEevaluated 14 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickstates
FALSEnever evaluated
0-14
576 if (action.event->mayOverride(event)) {
action.event->...verride(event)Description
TRUEevaluated 14 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickstates
FALSEnever evaluated
0-14
577 found = true;-
578-
579 if (action.event != d->revertList.at(jj).event() && action.event->needsCopy()) {
action.event !...at(jj).event()Description
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickstates
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
action.event->needsCopy()Description
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickstates
FALSEnever evaluated
0-10
580 action.event->copyOriginals(d->revertList.at(jj).event());-
581-
582 QQuickSimpleAction r(action);-
583 additionalReverts << r;-
584 d->revertList.removeAt(jj);-
585 --jj;-
586 } else if (action.event->isRewindable()) //###why needed?
executed 10 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickstates
action.event->isRewindable()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEnever evaluated
0-10
587 action.event->saveCurrentValues();
executed 4 times by 1 test: action.event->saveCurrentValues();
Executed by:
  • tst_qquickstates
4
588-
589 break;
executed 14 times by 2 tests: break;
Executed by:
  • tst_qquickanimations
  • tst_qquickstates
14
590 }-
591 }
never executed: end of block
0
592 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickstates
4
593 if (!found) {
!foundDescription
TRUEevaluated 176 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickstates
FALSEevaluated 14 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickstates
14-176
594 action.event->saveOriginals();-
595 // Only need to revert the applyList action if the previous-
596 // state doesn't have a higher priority revert already-
597 QQuickSimpleAction r(action);-
598 additionalReverts << r;-
599 }
executed 176 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickstates
176
600 } else {
executed 190 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickpathview
  • tst_qquickstates
190
601 bool found = false;-
602 action.fromBinding = QQmlPropertyPrivate::binding(action.property);-
603-
604 for (int jj = 0; jj < d->revertList.count(); ++jj) {
jj < d->revertList.count()Description
TRUEevaluated 44 times by 2 tests
Evaluated by:
  • tst_qquickfontloader
  • tst_qquickstates
FALSEevaluated 692 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
44-692
605 if (d->revertList.at(jj).property() == action.property) {
d->revertList....ction.propertyDescription
TRUEevaluated 34 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 10 times by 2 tests
Evaluated by:
  • tst_qquickfontloader
  • tst_qquickstates
10-34
606 found = true;-
607 if (d->revertList.at(jj).binding() != action.fromBinding.data()) {
d->revertList....Binding.data()Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquickstates
6-28
608 action.deleteFromBinding();-
609 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquickstates
6
610 break;
executed 34 times by 1 test: break;
Executed by:
  • tst_qquickstates
34
611 }-
612 }
executed 10 times by 2 tests: end of block
Executed by:
  • tst_qquickfontloader
  • tst_qquickstates
10
613-
614 if (!found) {
!foundDescription
TRUEevaluated 692 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
FALSEevaluated 34 times by 1 test
Evaluated by:
  • tst_qquickstates
34-692
615 if (!action.restore) {
!action.restoreDescription
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickstates
FALSEevaluated 688 times by 17 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
4-688
616 action.deleteFromBinding();;-
617 } else {
executed 4 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickstates
4
618 // Only need to revert the applyList action if the previous-
619 // state doesn't have a higher priority revert already-
620 QQuickSimpleAction r(action);-
621 additionalReverts << r;-
622 }
executed 688 times by 17 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
688
623 }-
624 }
executed 726 times by 17 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
726
625 }-
626-
627 // Any reverts from a previous state that aren't carried forth-
628 // into this state need to be translated into apply actions-
629 for (int ii = 0; ii < d->revertList.count(); ++ii) {
ii < d->revertList.count()Description
TRUEevaluated 194 times by 12 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
FALSEevaluated 588 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
194-588
630 bool found = false;-
631 if (d->revertList.at(ii).event()) {
d->revertList.at(ii).event()Description
TRUEevaluated 44 times by 3 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickstates
FALSEevaluated 150 times by 11 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickmousearea
  • tst_qquickstates
44-150
632 QQuickStateActionEvent *event = d->revertList.at(ii).event();-
633 if (!event->isReversable())
!event->isReversable()Description
TRUEnever evaluated
FALSEevaluated 44 times by 3 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickstates
0-44
634 continue;
never executed: continue;
0
635 for (int jj = 0; !found && jj < applyList.count(); ++jj) {
!foundDescription
TRUEevaluated 56 times by 3 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickstates
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
jj < applyList.count()Description
TRUEevaluated 16 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickstates
FALSEevaluated 40 times by 3 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickstates
4-56
636 const QQuickStateAction &action = applyList.at(jj);-
637 if (action.event && action.event->type() == event->type()) {
action.eventDescription
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickstates
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickstates
action.event->... event->type()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquicklistview
4-8
638 if (action.event->mayOverride(event))
action.event->...verride(event)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEnever evaluated
0-4
639 found = true;
executed 4 times by 1 test: found = true;
Executed by:
  • tst_qquickstates
4
640 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickstates
4
641 }
executed 16 times by 2 tests: end of block
Executed by:
  • tst_qquicklistview
  • tst_qquickstates
16
642 } else {
executed 44 times by 3 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickstates
44
643 for (int jj = 0; !found && jj < applyList.count(); ++jj) {
!foundDescription
TRUEevaluated 186 times by 11 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickmousearea
  • tst_qquickstates
FALSEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquickstates
jj < applyList.count()Description
TRUEevaluated 64 times by 4 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickstates
FALSEevaluated 122 times by 11 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickmousearea
  • tst_qquickstates
28-186
644 const QQuickStateAction &action = applyList.at(jj);-
645 if (action.property == d->revertList.at(ii).property())
action.propert...ii).property()Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 36 times by 4 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickstates
28-36
646 found = true;
executed 28 times by 1 test: found = true;
Executed by:
  • tst_qquickstates
28
647 }
executed 64 times by 4 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickstates
64
648 }
executed 150 times by 11 tests: end of block
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickmousearea
  • tst_qquickstates
150
649 if (!found) {
!foundDescription
TRUEevaluated 162 times by 12 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
FALSEevaluated 32 times by 1 test
Evaluated by:
  • tst_qquickstates
32-162
650 QVariant cur = d->revertList.at(ii).property().read();-
651 QQmlPropertyPrivate::removeBinding(d->revertList.at(ii).property());-
652-
653 QQuickStateAction a;-
654 a.property = d->revertList.at(ii).property();-
655 a.fromValue = cur;-
656 a.toValue = d->revertList.at(ii).value();-
657 a.toBinding = d->revertList.at(ii).binding();-
658 a.specifiedObject = d->revertList.at(ii).specifiedObject();-
659 a.specifiedProperty = d->revertList.at(ii).specifiedProperty();-
660 a.event = d->revertList.at(ii).event();-
661 a.reverseEvent = d->revertList.at(ii).reverseEvent();-
662 if (a.event && a.event->isRewindable())
a.eventDescription
TRUEevaluated 40 times by 3 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickstates
FALSEevaluated 122 times by 11 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickmousearea
  • tst_qquickstates
a.event->isRewindable()Description
TRUEevaluated 40 times by 3 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickstates
FALSEnever evaluated
0-122
663 a.event->saveCurrentValues();
executed 40 times by 3 tests: a.event->saveCurrentValues();
Executed by:
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickstates
40
664 applyList << a;-
665 // Store these special reverts in the reverting list-
666 if (a.event)
a.eventDescription
TRUEevaluated 40 times by 3 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickstates
FALSEevaluated 122 times by 11 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickmousearea
  • tst_qquickstates
40-122
667 d->reverting << a.event;
executed 40 times by 3 tests: d->reverting << a.event;
Executed by:
  • tst_qquickanimations
  • tst_qquicklistview
  • tst_qquickstates
40
668 else-
669 d->reverting << a.property;
executed 122 times by 11 tests: d->reverting << a.property;
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickmousearea
  • tst_qquickstates
122
670 }-
671 }
executed 194 times by 12 tests: end of block
Executed by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
194
672 // All the local reverts now become part of the ongoing revertList-
673 d->revertList << additionalReverts;-
674-
675#ifndef QT_NO_DEBUG_STREAM-
676 // Output for debugging-
677 if (stateChangeDebug()) {
stateChangeDebug()Description
TRUEnever evaluated
FALSEevaluated 588 times by 20 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
0-588
678 for (const QQuickStateAction &action : qAsConst(applyList)) {-
679 if (action.event)
action.eventDescription
TRUEnever evaluated
FALSEnever evaluated
0
680 qWarning() << " QQuickStateAction event:" << action.event->type();
never executed: QMessageLogger(__FILE__, 680, __PRETTY_FUNCTION__).warning() << " QQuickStateAction event:" << action.event->type();
0
681 else-
682 qWarning() << " QQuickStateAction:" << action.property.object()
never executed: QMessageLogger(__FILE__, 682, __PRETTY_FUNCTION__).warning() << " QQuickStateAction:" << action.property.object() << action.property.name() << "From:" << action.fromValue << "To:" << action.toValue;
0
683 << action.property.name() << "From:" << action.fromValue
never executed: QMessageLogger(__FILE__, 682, __PRETTY_FUNCTION__).warning() << " QQuickStateAction:" << action.property.object() << action.property.name() << "From:" << action.fromValue << "To:" << action.toValue;
0
684 << "To:" << action.toValue;
never executed: QMessageLogger(__FILE__, 682, __PRETTY_FUNCTION__).warning() << " QQuickStateAction:" << action.property.object() << action.property.name() << "From:" << action.fromValue << "To:" << action.toValue;
0
685 }-
686 }
never executed: end of block
0
687#endif-
688-
689 d->transitionManager.transition(applyList, trans);-
690}
executed 588 times by 20 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
588
691-
692QQuickStateOperation::ActionList QQuickStateOperation::actions()-
693{-
694 return ActionList();
never executed: return ActionList();
0
695}-
696-
697QQuickState *QQuickStateOperation::state() const-
698{-
699 Q_D(const QQuickStateOperation);-
700 return d->m_state;
executed 60 times by 3 tests: return d->m_state;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickdesignersupport
  • tst_qquickstates
60
701}-
702-
703void QQuickStateOperation::setState(QQuickState *state)-
704{-
705 Q_D(QQuickStateOperation);-
706 d->m_state = state;-
707}
executed 622 times by 18 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
622
708-
709QT_END_NAMESPACE-
710-
711#include "moc_qquickstate_p.cpp"-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0