OpenCoverage

qquickstategroup.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickstategroup.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 "qquickstategroup_p.h"-
41-
42#include "qquicktransition_p.h"-
43-
44#include <private/qqmlbinding_p.h>-
45#include <private/qqmlglobal_p.h>-
46-
47#include <QtCore/qstringlist.h>-
48#include <QtCore/qdebug.h>-
49#include <QtCore/qvector.h>-
50-
51#include <private/qobject_p.h>-
52#include <qqmlinfo.h>-
53-
54QT_BEGIN_NAMESPACE-
55-
56DEFINE_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 634 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 594 times by 18 tests
Evaluated by:
  • tst_examples
  • 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_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-634
57-
58class QQuickStateGroupPrivate : public QObjectPrivate-
59{-
60 Q_DECLARE_PUBLIC(QQuickStateGroup)-
61public:-
62 QQuickStateGroupPrivate()-
63 : nullState(nullptr), componentComplete(true),-
64 ignoreTrans(false), applyingState(false), unnamedCount(0) {}
executed 1070 times by 25 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_quicktestmainwithsetup
  • tst_testfiltering
1070
65-
66 QString currentState;-
67 QQuickState *nullState;-
68-
69 static void append_state(QQmlListProperty<QQuickState> *list, QQuickState *state);-
70 static int count_state(QQmlListProperty<QQuickState> *list);-
71 static QQuickState *at_state(QQmlListProperty<QQuickState> *list, int index);-
72 static void clear_states(QQmlListProperty<QQuickState> *list);-
73-
74 static void append_transition(QQmlListProperty<QQuickTransition> *list, QQuickTransition *state);-
75 static int count_transitions(QQmlListProperty<QQuickTransition> *list);-
76 static QQuickTransition *at_transition(QQmlListProperty<QQuickTransition> *list, int index);-
77 static void clear_transitions(QQmlListProperty<QQuickTransition> *list);-
78-
79 QList<QQuickState *> states;-
80 QList<QQuickTransition *> transitions;-
81-
82 bool componentComplete;-
83 bool ignoreTrans;-
84 bool applyingState;-
85 int unnamedCount;-
86-
87 QQuickTransition *findTransition(const QString &from, const QString &to);-
88 void setCurrentStateInternal(const QString &state, bool = false);-
89 bool updateAutoState();-
90};-
91-
92/*!-
93 \qmltype StateGroup-
94 \instantiates QQuickStateGroup-
95 \inqmlmodule QtQuick-
96 \ingroup qtquick-states-
97 \brief Provides built-in state support for non-Item types.-
98-
99 Item (and all derived types) provides built in support for states and transitions-
100 via its \l{Item::state}{state}, \l{Item::states}{states} and \l{Item::transitions}{transitions} properties. StateGroup provides an easy way to-
101 use this support in other (non-Item-derived) types.-
102-
103 \qml-
104 MyCustomObject {-
105 StateGroup {-
106 id: myStateGroup-
107 states: State {-
108 name: "state1"-
109 // ...-
110 }-
111 transitions: Transition {-
112 // ...-
113 }-
114 }-
115-
116 onSomethingHappened: myStateGroup.state = "state1";-
117 }-
118 \endqml-
119-
120 \sa {Qt Quick States}{Qt Quick States}, {Animation and Transitions in Qt Quick}{Transitions}, {Qt QML}-
121*/-
122-
123QQuickStateGroup::QQuickStateGroup(QObject *parent)-
124 : QObject(*(new QQuickStateGroupPrivate), parent)-
125{-
126}
executed 1070 times by 25 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_quicktestmainwithsetup
  • tst_testfiltering
1070
127-
128QQuickStateGroup::~QQuickStateGroup()-
129{-
130 Q_D(const QQuickStateGroup);-
131 for (int i = 0; i < d->states.count(); ++i)
i < d->states.count()Description
TRUEevaluated 1040 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
FALSEevaluated 958 times by 25 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_quicktestmainwithsetup
  • tst_testfiltering
958-1040
132 d->states.at(i)->setStateGroup(nullptr);
executed 1040 times by 19 tests: d->states.at(i)->setStateGroup(nullptr);
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
1040
133}
executed 958 times by 25 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_quicktestmainwithsetup
  • tst_testfiltering
958
134-
135QList<QQuickState *> QQuickStateGroup::states() const-
136{-
137 Q_D(const QQuickStateGroup);-
138 return d->states;
executed 26 times by 2 tests: return d->states;
Executed by:
  • tst_qquickdesignersupport
  • tst_qquickstates
26
139}-
140-
141/*!-
142 \qmlproperty list<State> QtQuick::StateGroup::states-
143 This property holds a list of states defined by the state group.-
144-
145 \qml-
146 StateGroup {-
147 states: [-
148 State {-
149 // State definition...-
150 },-
151 State {-
152 // ...-
153 }-
154 // Other states...-
155 ]-
156 }-
157 \endqml-
158-
159 \sa {Qt Quick States}{Qt Quick States}-
160*/-
161QQmlListProperty<QQuickState> QQuickStateGroup::statesProperty()-
162{-
163 Q_D(QQuickStateGroup);-
164 return QQmlListProperty<QQuickState>(this, &d->states, &QQuickStateGroupPrivate::append_state,
executed 1208 times by 24 tests: return QQmlListProperty<QQuickState>(this, &d->states, &QQuickStateGroupPrivate::append_state, &QQuickStateGroupPrivate::count_state, &QQuickStateGroupPrivate::at_state, &QQuickStateGroupPrivate::clear_states);
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_quicktestmainwithsetup
  • tst_testfiltering
1208
165 &QQuickStateGroupPrivate::count_state,
executed 1208 times by 24 tests: return QQmlListProperty<QQuickState>(this, &d->states, &QQuickStateGroupPrivate::append_state, &QQuickStateGroupPrivate::count_state, &QQuickStateGroupPrivate::at_state, &QQuickStateGroupPrivate::clear_states);
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_quicktestmainwithsetup
  • tst_testfiltering
1208
166 &QQuickStateGroupPrivate::at_state,
executed 1208 times by 24 tests: return QQmlListProperty<QQuickState>(this, &d->states, &QQuickStateGroupPrivate::append_state, &QQuickStateGroupPrivate::count_state, &QQuickStateGroupPrivate::at_state, &QQuickStateGroupPrivate::clear_states);
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_quicktestmainwithsetup
  • tst_testfiltering
1208
167 &QQuickStateGroupPrivate::clear_states);
executed 1208 times by 24 tests: return QQmlListProperty<QQuickState>(this, &d->states, &QQuickStateGroupPrivate::append_state, &QQuickStateGroupPrivate::count_state, &QQuickStateGroupPrivate::at_state, &QQuickStateGroupPrivate::clear_states);
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklayouts
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
  • tst_quicktestmainwithsetup
  • tst_testfiltering
1208
168}-
169-
170void QQuickStateGroupPrivate::append_state(QQmlListProperty<QQuickState> *list, QQuickState *state)-
171{-
172 QQuickStateGroup *_this = static_cast<QQuickStateGroup *>(list->object);-
173 if (state) {
stateDescription
TRUEevaluated 1170 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
FALSEnever evaluated
0-1170
174 _this->d_func()->states.append(state);-
175 state->setStateGroup(_this);-
176 }
executed 1170 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
1170
177-
178}
executed 1170 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
1170
179-
180int QQuickStateGroupPrivate::count_state(QQmlListProperty<QQuickState> *list)-
181{-
182 QQuickStateGroup *_this = static_cast<QQuickStateGroup *>(list->object);-
183 return _this->d_func()->states.count();
executed 10 times by 3 tests: return _this->d_func()->states.count();
Executed by:
  • tst_examples
  • tst_qqmllistreference
  • tst_qquickdesignersupport
10
184}-
185-
186QQuickState *QQuickStateGroupPrivate::at_state(QQmlListProperty<QQuickState> *list, int index)-
187{-
188 QQuickStateGroup *_this = static_cast<QQuickStateGroup *>(list->object);-
189 return _this->d_func()->states.at(index);
executed 22 times by 3 tests: return _this->d_func()->states.at(index);
Executed by:
  • tst_examples
  • tst_qqmllistreference
  • tst_qquickstates
22
190}-
191-
192void QQuickStateGroupPrivate::clear_states(QQmlListProperty<QQuickState> *list)-
193{-
194 QQuickStateGroup *_this = static_cast<QQuickStateGroup *>(list->object);-
195 _this->d_func()->setCurrentStateInternal(QString(), true);-
196 for (int i = 0; i < _this->d_func()->states.count(); ++i) {
i < _this->d_f...states.count()Description
TRUEnever evaluated
FALSEnever evaluated
0
197 _this->d_func()->states.at(i)->setStateGroup(nullptr);-
198 }
never executed: end of block
0
199 _this->d_func()->states.clear();-
200}
never executed: end of block
0
201-
202/*!-
203 \qmlproperty list<Transition> QtQuick::StateGroup::transitions-
204 This property holds a list of transitions defined by the state group.-
205-
206 \qml-
207 StateGroup {-
208 transitions: [-
209 Transition {-
210 // ...-
211 },-
212 Transition {-
213 // ...-
214 }-
215 // ...-
216 ]-
217 }-
218 \endqml-
219-
220 \sa {Animation and Transitions in Qt Quick}{Transitions}-
221*/-
222QQmlListProperty<QQuickTransition> QQuickStateGroup::transitionsProperty()-
223{-
224 Q_D(QQuickStateGroup);-
225 return QQmlListProperty<QQuickTransition>(this, &d->transitions, &QQuickStateGroupPrivate::append_transition,
executed 598 times by 10 tests: return QQmlListProperty<QQuickTransition>(this, &d->transitions, &QQuickStateGroupPrivate::append_transition, &QQuickStateGroupPrivate::count_transitions, &QQuickStateGroupPrivate::at_transition, &QQuickStateGroupPrivate::clear_transitions);
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
598
226 &QQuickStateGroupPrivate::count_transitions,
executed 598 times by 10 tests: return QQmlListProperty<QQuickTransition>(this, &d->transitions, &QQuickStateGroupPrivate::append_transition, &QQuickStateGroupPrivate::count_transitions, &QQuickStateGroupPrivate::at_transition, &QQuickStateGroupPrivate::clear_transitions);
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
598
227 &QQuickStateGroupPrivate::at_transition,
executed 598 times by 10 tests: return QQmlListProperty<QQuickTransition>(this, &d->transitions, &QQuickStateGroupPrivate::append_transition, &QQuickStateGroupPrivate::count_transitions, &QQuickStateGroupPrivate::at_transition, &QQuickStateGroupPrivate::clear_transitions);
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
598
228 &QQuickStateGroupPrivate::clear_transitions);
executed 598 times by 10 tests: return QQmlListProperty<QQuickTransition>(this, &d->transitions, &QQuickStateGroupPrivate::append_transition, &QQuickStateGroupPrivate::count_transitions, &QQuickStateGroupPrivate::at_transition, &QQuickStateGroupPrivate::clear_transitions);
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquicklayouts
  • tst_quicktestmainwithsetup
  • tst_testfiltering
598
229}-
230-
231void QQuickStateGroupPrivate::append_transition(QQmlListProperty<QQuickTransition> *list, QQuickTransition *trans)-
232{-
233 QQuickStateGroup *_this = static_cast<QQuickStateGroup *>(list->object);-
234 if (trans)
transDescription
TRUEevaluated 426 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickanimations
  • tst_qquickflipable
FALSEnever evaluated
0-426
235 _this->d_func()->transitions.append(trans);
executed 426 times by 4 tests: _this->d_func()->transitions.append(trans);
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickanimations
  • tst_qquickflipable
426
236}
executed 426 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickanimations
  • tst_qquickflipable
426
237-
238int QQuickStateGroupPrivate::count_transitions(QQmlListProperty<QQuickTransition> *list)-
239{-
240 QQuickStateGroup *_this = static_cast<QQuickStateGroup *>(list->object);-
241 return _this->d_func()->transitions.count();
executed 10 times by 2 tests: return _this->d_func()->transitions.count();
Executed by:
  • tst_qquickanimations
  • tst_qquickdesignersupport
10
242}-
243-
244QQuickTransition *QQuickStateGroupPrivate::at_transition(QQmlListProperty<QQuickTransition> *list, int index)-
245{-
246 QQuickStateGroup *_this = static_cast<QQuickStateGroup *>(list->object);-
247 return _this->d_func()->transitions.at(index);
executed 2 times by 1 test: return _this->d_func()->transitions.at(index);
Executed by:
  • tst_qquickanimations
2
248}-
249-
250void QQuickStateGroupPrivate::clear_transitions(QQmlListProperty<QQuickTransition> *list)-
251{-
252 QQuickStateGroup *_this = static_cast<QQuickStateGroup *>(list->object);-
253 _this->d_func()->transitions.clear();-
254}
executed 4 times by 2 tests: end of block
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickanimations
4
255-
256/*!-
257 \qmlproperty string QtQuick::StateGroup::state-
258-
259 This property holds the name of the current state of the state group.-
260-
261 This property is often used in scripts to change between states. For-
262 example:-
263-
264 \js-
265 function toggle() {-
266 if (button.state == 'On')-
267 button.state = 'Off';-
268 else-
269 button.state = 'On';-
270 }-
271 \endjs-
272-
273 If the state group is in its base state (i.e. no explicit state has been-
274 set), \c state will be a blank string. Likewise, you can return a-
275 state group to its base state by setting its current state to \c ''.-
276-
277 \sa {Qt Quick States}{Qt Quick States}-
278*/-
279QString QQuickStateGroup::state() const-
280{-
281 Q_D(const QQuickStateGroup);-
282 return d->currentState;
executed 360 times by 14 tests: return d->currentState;
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qqmllistmodel
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlvaluetypes
  • tst_qquickanimationcontroller
  • tst_qquickanimations
  • tst_qquickdesignersupport
  • tst_qquicklayouts
  • tst_qquickloader
  • tst_qquickstates
  • tst_quicktestmainwithsetup
  • tst_testfiltering
360
283}-
284-
285void QQuickStateGroup::setState(const QString &state)-
286{-
287 Q_D(QQuickStateGroup);-
288 if (d->currentState == state)
d->currentState == stateDescription
TRUEnever evaluated
FALSEevaluated 590 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-590
289 return;
never executed: return;
0
290-
291 d->setCurrentStateInternal(state);-
292}
executed 590 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
590
293-
294void QQuickStateGroup::classBegin()-
295{-
296 Q_D(QQuickStateGroup);-
297 d->componentComplete = false;-
298}
executed 1016 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
1016
299-
300void QQuickStateGroup::componentComplete()-
301{-
302 Q_D(QQuickStateGroup);-
303 d->componentComplete = true;-
304-
305 for (int ii = 0; ii < d->states.count(); ++ii) {
ii < d->states.count()Description
TRUEevaluated 1166 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 1014 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
1014-1166
306 QQuickState *state = d->states.at(ii);-
307 if (!state->isNamed())
!state->isNamed()Description
TRUEevaluated 352 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickstates
FALSEevaluated 814 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
352-814
308 state->setName(QLatin1String("anonymousState") + QString::number(++d->unnamedCount));
executed 352 times by 3 tests: state->setName(QLatin1String("anonymousState") + QString::number(++d->unnamedCount));
Executed by:
  • tst_examples
  • tst_qquicklistview
  • tst_qquickstates
352
309 }
executed 1166 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
1166
310-
311 if (d->updateAutoState()) {
d->updateAutoState()Description
TRUEevaluated 8 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmltranslation
  • tst_qquickfontloader
  • tst_qquickstates
FALSEevaluated 1006 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
8-1006
312 return;
executed 8 times by 4 tests: return;
Executed by:
  • tst_examples
  • tst_qqmltranslation
  • tst_qquickfontloader
  • tst_qquickstates
8
313 } else if (!d->currentState.isEmpty()) {
!d->currentState.isEmpty()Description
TRUEevaluated 118 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickstates
FALSEevaluated 888 times by 15 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
118-888
314 QString cs = d->currentState;-
315 d->currentState.clear();-
316 d->setCurrentStateInternal(cs, true);-
317 }
executed 118 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickstates
118
318}
executed 1006 times by 16 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
1006
319-
320/*!-
321 Returns true if the state was changed, otherwise false.-
322*/-
323bool QQuickStateGroup::updateAutoState()-
324{-
325 Q_D(QQuickStateGroup);-
326 return d->updateAutoState();
executed 624 times by 8 tests: return d->updateAutoState();
Executed by:
  • tst_examples
  • tst_qqmltranslation
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
624
327}-
328-
329bool QQuickStateGroupPrivate::updateAutoState()-
330{-
331 Q_Q(QQuickStateGroup);-
332 if (!componentComplete)
!componentCompleteDescription
TRUEevaluated 574 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmltranslation
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
FALSEevaluated 1064 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
574-1064
333 return false;
executed 574 times by 8 tests: return false;
Executed by:
  • tst_examples
  • tst_qqmltranslation
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
574
334-
335 bool revert = false;-
336 for (int ii = 0; ii < states.count(); ++ii) {
ii < states.count()Description
TRUEevaluated 1224 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 1018 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
1018-1224
337 QQuickState *state = states.at(ii);-
338 if (state->isWhenKnown()) {
state->isWhenKnown()Description
TRUEevaluated 630 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmltranslation
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
FALSEevaluated 594 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickitem2
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
594-630
339 if (state->isNamed()) {
state->isNamed()Description
TRUEevaluated 630 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-630
340 if (state->when() && state->when()->evaluate().toBool()) {
state->when()Description
TRUEevaluated 630 times by 8 tests
Evaluated by:
  • tst_examples
  • tst_qqmltranslation
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
FALSEnever evaluated
state->when()-...ate().toBool()Description
TRUEevaluated 46 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltranslation
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
FALSEevaluated 584 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
0-630
341 if (stateChangeDebug())
stateChangeDebug()Description
TRUEnever evaluated
FALSEevaluated 46 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltranslation
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
0-46
342 qWarning() << "Setting auto state due to:"
never executed: QMessageLogger(__FILE__, 342, __PRETTY_FUNCTION__).warning() << "Setting auto state due to:" << state->when()->expression();
0
343 << state->when()->expression();
never executed: QMessageLogger(__FILE__, 342, __PRETTY_FUNCTION__).warning() << "Setting auto state due to:" << state->when()->expression();
0
344 if (currentState != state->name()) {
currentState != state->name()Description
TRUEevaluated 36 times by 7 tests
Evaluated by:
  • tst_examples
  • tst_qqmltranslation
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
FALSEevaluated 10 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qqmltranslation
  • tst_qquickstates
10-36
345 q->setState(state->name());-
346 return true;
executed 36 times by 7 tests: return true;
Executed by:
  • tst_examples
  • tst_qqmltranslation
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
36
347 } else {-
348 return false;
executed 10 times by 3 tests: return false;
Executed by:
  • tst_examples
  • tst_qqmltranslation
  • tst_qquickstates
10
349 }-
350 } else if (state->name() == currentState) {
state->name() == currentStateDescription
TRUEevaluated 18 times by 4 tests
Evaluated by:
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
FALSEevaluated 566 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
18-566
351 revert = true;-
352 }
executed 18 times by 4 tests: end of block
Executed by:
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
18
353 }
executed 584 times by 7 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
584
354 }
executed 584 times by 7 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickbehaviors
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
584
355 }
executed 1178 times by 17 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
1178
356 if (revert) {
revertDescription
TRUEevaluated 14 times by 3 tests
Evaluated by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
FALSEevaluated 1004 times by 16 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
14-1004
357 bool rv = !currentState.isEmpty();-
358 q->setState(QString());-
359 return rv;
executed 14 times by 3 tests: return rv;
Executed by:
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
14
360 } else {-
361 return false;
executed 1004 times by 16 tests: return false;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickitem2
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
1004
362 }-
363}-
364-
365QQuickTransition *QQuickStateGroupPrivate::findTransition(const QString &from, const QString &to)-
366{-
367 QQuickTransition *highest = nullptr;-
368 int score = 0;-
369 bool reversed = false;-
370 bool done = false;-
371-
372 for (int ii = 0; !done && ii < transitions.count(); ++ii) {
!doneDescription
TRUEevaluated 552 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_qquickloader
  • tst_qquickmousearea
  • tst_qquickstates
FALSEnever evaluated
ii < transitions.count()Description
TRUEevaluated 82 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
FALSEevaluated 470 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_qquickloader
  • tst_qquickmousearea
  • tst_qquickstates
0-552
373 QQuickTransition *t = transitions.at(ii);-
374 if (!t->enabled())
!t->enabled()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 80 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
2-80
375 continue;
executed 2 times by 1 test: continue;
Executed by:
  • tst_qquickanimations
2
376 for (int ii = 0; ii < 2; ++ii)
ii < 2Description
TRUEevaluated 160 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickanimations
6-160
377 {-
378 if (ii && (!t->reversible() ||
iiDescription
TRUEevaluated 80 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
FALSEevaluated 80 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
!t->reversible()Description
TRUEevaluated 74 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickanimations
6-80
379 (t->fromState() == QLatin1String("*") &&
t->fromState()...in1String("*")Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEnever evaluated
0-6
380 t->toState() == QLatin1String("*"))))
t->toState() =...in1String("*")Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickanimations
0-6
381 break;
executed 74 times by 3 tests: break;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
74
382 const QString fromStateStr = t->fromState();-
383 const QString toStateStr = t->toState();-
384-
385 QVector<QStringRef> fromState = fromStateStr.splitRef(QLatin1Char(','));-
386 for (int jj = 0; jj < fromState.count(); ++jj)
jj < fromState.count()Description
TRUEevaluated 86 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
FALSEevaluated 86 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
86
387 fromState[jj] = fromState.at(jj).trimmed();
executed 86 times by 3 tests: fromState[jj] = fromState.at(jj).trimmed();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
86
388 QVector<QStringRef> toState = toStateStr.splitRef(QLatin1Char(','));-
389 for (int jj = 0; jj < toState.count(); ++jj)
jj < toState.count()Description
TRUEevaluated 86 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
FALSEevaluated 86 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
86
390 toState[jj] = toState.at(jj).trimmed();
executed 86 times by 3 tests: toState[jj] = toState.at(jj).trimmed();
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
86
391 if (ii == 1)
ii == 1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 80 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
6-80
392 qSwap(fromState, toState);
executed 6 times by 1 test: qSwap(fromState, toState);
Executed by:
  • tst_qquickanimations
6
393 int tScore = 0;-
394 const QString asterisk = QStringLiteral("*");-
395 if (fromState.contains(QStringRef(&from)))
fromState.cont...ingRef(&from))Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 84 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
2-84
396 tScore += 2;
executed 2 times by 1 test: tScore += 2;
Executed by:
  • tst_qquickanimations
2
397 else if (fromState.contains(QStringRef(&asterisk)))
fromState.cont...ef(&asterisk))Description
TRUEevaluated 80 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickanimations
4-80
398 tScore += 1;
executed 80 times by 3 tests: tScore += 1;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
80
399 else-
400 continue;
executed 4 times by 1 test: continue;
Executed by:
  • tst_qquickanimations
4
401-
402 if (toState.contains(QStringRef(&to)))
toState.contai...tringRef(&to))Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 66 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
16-66
403 tScore += 2;
executed 16 times by 1 test: tScore += 2;
Executed by:
  • tst_qquickanimations
16
404 else if (toState.contains(QStringRef(&asterisk)))
toState.contai...ef(&asterisk))Description
TRUEevaluated 56 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_qquickanimations
10-56
405 tScore += 1;
executed 56 times by 3 tests: tScore += 1;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
56
406 else-
407 continue;
executed 10 times by 1 test: continue;
Executed by:
  • tst_qquickanimations
10
408-
409 if (ii == 1)
ii == 1Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickanimations
FALSEevaluated 70 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
2-70
410 reversed = true;
executed 2 times by 1 test: reversed = true;
Executed by:
  • tst_qquickanimations
2
411 else-
412 reversed = false;
executed 70 times by 3 tests: reversed = false;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
70
413-
414 if (tScore == 4) {
tScore == 4Description
TRUEnever evaluated
FALSEevaluated 72 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
0-72
415 highest = t;-
416 done = true;-
417 break;
never executed: break;
0
418 } else if (tScore > score) {
tScore > scoreDescription
TRUEevaluated 72 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
FALSEnever evaluated
0-72
419 score = tScore;-
420 highest = t;-
421 }
executed 72 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
72
422 }
executed 72 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
72
423 }
executed 80 times by 3 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
80
424-
425 if (highest)
highestDescription
TRUEevaluated 72 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
FALSEevaluated 398 times by 17 tests
Evaluated by:
  • 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_qquickstates
72-398
426 highest->setReversed(reversed);
executed 72 times by 3 tests: highest->setReversed(reversed);
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickflipable
72
427-
428 return highest;
executed 470 times by 19 tests: return highest;
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_qquickstates
470
429}-
430-
431void QQuickStateGroupPrivate::setCurrentStateInternal(const QString &state,-
432 bool ignoreTrans)-
433{-
434 Q_Q(QQuickStateGroup);-
435 if (!componentComplete) {
!componentCompleteDescription
TRUEevaluated 118 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickstates
FALSEevaluated 590 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
118-590
436 currentState = state;-
437 return;
executed 118 times by 4 tests: return;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickstates
118
438 }-
439-
440 if (applyingState) {
applyingStateDescription
TRUEevaluated 2 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
2-588
441 qmlWarning(q) << "Can't apply a state change as part of a state definition.";-
442 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickstates
2
443 }-
444-
445 applyingState = true;-
446-
447 QQuickTransition *transition = ignoreTrans ? nullptr : findTransition(currentState, state);
ignoreTransDescription
TRUEevaluated 118 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickpathview
  • tst_qquickstates
FALSEevaluated 470 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_qquickloader
  • tst_qquickmousearea
  • tst_qquickstates
118-470
448 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
449 qWarning() << this << "Changing state. From" << currentState << ". To" << state;-
450 if (transition)
transitionDescription
TRUEnever evaluated
FALSEnever evaluated
0
451 qWarning() << " using transition" << transition->fromState()
never executed: QMessageLogger(__FILE__, 451, __PRETTY_FUNCTION__).warning() << " using transition" << transition->fromState() << transition->toState();
0
452 << transition->toState();
never executed: QMessageLogger(__FILE__, 451, __PRETTY_FUNCTION__).warning() << " using transition" << transition->fromState() << transition->toState();
0
453 }
never executed: end of block
0
454-
455 QQuickState *oldState = nullptr;-
456 if (!currentState.isEmpty()) {
!currentState.isEmpty()Description
TRUEevaluated 186 times by 13 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickstates
FALSEevaluated 402 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
186-402
457 for (int ii = 0; ii < states.count(); ++ii) {
ii < states.count()Description
TRUEevaluated 224 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 2 times by 1 test
Evaluated by:
  • tst_qquickloader
2-224
458 if (states.at(ii)->name() == currentState) {
states.at(ii)-...= currentStateDescription
TRUEevaluated 184 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 40 times by 3 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickdesignersupport
  • tst_qquickstates
40-184
459 oldState = states.at(ii);-
460 break;
executed 184 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
184
461 }-
462 }
executed 40 times by 3 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickdesignersupport
  • tst_qquickstates
40
463 }
executed 186 times by 13 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_qquickloader
  • tst_qquickmousearea
  • tst_qquickstates
186
464-
465 currentState = state;-
466 emit q->stateChanged(currentState);-
467-
468 QQuickState *newState = nullptr;-
469 for (int ii = 0; ii < states.count(); ++ii) {
ii < states.count()Description
TRUEevaluated 744 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
FALSEevaluated 138 times by 13 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickstates
138-744
470 if (states.at(ii)->name() == currentState) {
states.at(ii)-...= currentStateDescription
TRUEevaluated 450 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
FALSEevaluated 294 times by 14 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
294-450
471 newState = states.at(ii);-
472 break;
executed 450 times by 19 tests: break;
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
450
473 }-
474 }
executed 294 times by 14 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmllistreference
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
294
475-
476 if (oldState == nullptr || newState == nullptr) {
oldState == nullptrDescription
TRUEevaluated 404 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 184 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
newState == nullptrDescription
TRUEevaluated 130 times by 11 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
FALSEevaluated 54 times by 4 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickdesignersupport
  • tst_qquickfontloader
  • tst_qquickstates
54-404
477 if (!nullState) {
!nullStateDescription
TRUEevaluated 346 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 188 times by 12 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickstates
188-346
478 nullState = new QQuickState;-
479 QQml_setParent_noEvent(nullState, q);-
480 nullState->setStateGroup(q);-
481 }
executed 346 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
346
482 if (!oldState) oldState = nullState;
executed 404 times by 20 tests: oldState = nullState;
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
!oldStateDescription
TRUEevaluated 404 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 130 times by 11 tests
Evaluated by:
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquicklistview
  • tst_qquickmousearea
  • tst_qquickstates
130-404
483 if (!newState) newState = nullState;
executed 138 times by 13 tests: newState = nullState;
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickstates
!newStateDescription
TRUEevaluated 138 times by 13 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquicklistview
  • tst_qquickloader
  • tst_qquickmousearea
  • tst_qquickstates
FALSEevaluated 396 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
138-396
484 }
executed 534 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
534
485-
486 newState->apply(transition, oldState);-
487 applyingState = false; //### consider removing this (don't allow state changes in transition)-
488}
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
489-
490QQuickState *QQuickStateGroup::findState(const QString &name) const-
491{-
492 Q_D(const QQuickStateGroup);-
493 for (int i = 0; i < d->states.count(); ++i) {
i < d->states.count()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickstates
2-8
494 QQuickState *state = d->states.at(i);-
495 if (state->name() == name)
state->name() == nameDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickstates
2-6
496 return state;
executed 6 times by 1 test: return state;
Executed by:
  • tst_qquickstates
6
497 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickstates
2
498-
499 return nullptr;
executed 2 times by 1 test: return nullptr;
Executed by:
  • tst_qquickstates
2
500}-
501-
502void QQuickStateGroup::removeState(QQuickState *state)-
503{-
504 Q_D(QQuickStateGroup);-
505 d->states.removeOne(state);-
506}
executed 244 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
244
507-
508void QQuickStateGroup::stateAboutToComplete()-
509{-
510 Q_D(QQuickStateGroup);-
511 d->applyingState = false;-
512}
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
513-
514QT_END_NAMESPACE-
515-
516-
517#include "moc_qquickstategroup_p.cpp"-
Source codeSwitch to Preprocessed file

Generated by Squish Coco 4.2.0