OpenCoverage

qquickpropertychanges.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickpropertychanges.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7class QQuickReplaceSignalHandler : public QQuickStateActionEvent-
8{-
9public:-
10 QQuickReplaceSignalHandler() {}-
11 ~QQuickReplaceSignalHandler() {}-
12-
13 EventType type() const override { return
executed 40 times by 1 test: return SignalHandler;
Executed by:
  • tst_qquickstates
SignalHandler;
executed 40 times by 1 test: return SignalHandler;
Executed by:
  • tst_qquickstates
}
40
14-
15 QQmlProperty property;-
16 QQmlBoundSignalExpressionPointer expression;-
17 QQmlBoundSignalExpressionPointer reverseExpression;-
18 QQmlBoundSignalExpressionPointer rewindExpression;-
19-
20 void execute() override {-
21 QQmlPropertyPrivate::setSignalExpression(property, expression);-
22 }
executed 26 times by 1 test: end of block
Executed by:
  • tst_qquickstates
26
23-
24 bool isReversable() override { return
executed 84 times by 1 test: return true;
Executed by:
  • tst_qquickstates
true;
executed 84 times by 1 test: return true;
Executed by:
  • tst_qquickstates
}
84
25 void reverse() override {-
26 QQmlPropertyPrivate::setSignalExpression(property, reverseExpression);-
27 }
executed 8 times by 1 test: end of block
Executed by:
  • tst_qquickstates
8
28-
29 void saveOriginals() override {-
30 saveCurrentValues();-
31 reverseExpression = rewindExpression;-
32 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquickstates
16
33-
34 bool needsCopy() override { return
executed 6 times by 1 test: return true;
Executed by:
  • tst_qquickstates
true;
executed 6 times by 1 test: return true;
Executed by:
  • tst_qquickstates
}
6
35 void copyOriginals(QQuickStateActionEvent *other) override-
36 {-
37 QQuickReplaceSignalHandler *rsh = static_cast<QQuickReplaceSignalHandler*>(other);-
38 saveCurrentValues();-
39 if (rsh == this
rsh == thisDescription
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickstates
)
0-6
40 return;
never executed: return;
0
41 reverseExpression = rsh->reverseExpression;-
42 }
executed 6 times by 1 test: end of block
Executed by:
  • tst_qquickstates
6
43-
44 void rewind() override {-
45 QQmlPropertyPrivate::setSignalExpression(property, rewindExpression);-
46 }
never executed: end of block
0
47 void saveCurrentValues() override {-
48 rewindExpression = QQmlPropertyPrivate::signalExpression(property);-
49 }
executed 34 times by 1 test: end of block
Executed by:
  • tst_qquickstates
34
50-
51 bool mayOverride(QQuickStateActionEvent *other) override {-
52 if (other == this
other == thisDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickstates
)
6-8
53 return
executed 8 times by 1 test: return true;
Executed by:
  • tst_qquickstates
true;
executed 8 times by 1 test: return true;
Executed by:
  • tst_qquickstates
8
54 if (other->type() != type()
other->type() != type()Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickstates
)
0-6
55 return
never executed: return false;
false;
never executed: return false;
0
56 if (static_cast<
static_cast<QQ...ty == propertyDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEnever evaluated
QQuickReplaceSignalHandler*>(other)->property == property
static_cast<QQ...ty == propertyDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEnever evaluated
)
0-6
57 return
executed 6 times by 1 test: return true;
Executed by:
  • tst_qquickstates
true;
executed 6 times by 1 test: return true;
Executed by:
  • tst_qquickstates
6
58 return
never executed: return false;
false;
never executed: return false;
0
59 }-
60};-
61-
62-
63class QQuickPropertyChangesPrivate : public QQuickStateOperationPrivate-
64{-
65 inline QQuickPropertyChanges* q_func() { return static_cast<QQuickPropertyChanges *>(q_ptr); } inline const QQuickPropertyChanges* q_func() const { return static_cast<const QQuickPropertyChanges *>(q_ptr); } friend class QQuickPropertyChanges;-
66public:-
67 QQuickPropertyChangesPrivate() : decoded(true), restore(true),-
68 isExplicit(false) {}
executed 456 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
456
69-
70 QPointer<QObject> object;-
71 QList<const QV4::CompiledData::Binding *> bindings;-
72 QQmlRefPointer<QV4::CompiledData::CompilationUnit> compilationUnit;-
73-
74 bool decoded : 1;-
75 bool restore : 1;-
76 bool isExplicit : 1;-
77-
78 void decode();-
79 void decodeBinding(const QString &propertyPrefix, const QV4::CompiledData::Unit *qmlUnit, const QV4::CompiledData::Binding *binding);-
80-
81 class ExpressionChange {-
82 public:-
83 ExpressionChange(const QString &_name,-
84 const QV4::CompiledData::Binding *_binding,-
85 QQmlBinding::Identifier _id,-
86 const QString& _expr,-
87 const QUrl &_url,-
88 int _line,-
89 int _column)-
90 : name(_name), binding(_binding), id(_id), expression(_expr), url(_url), line(_line), column(_column) {}
executed 72 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
72
91 QString name;-
92 const QV4::CompiledData::Binding *binding;-
93 QQmlBinding::Identifier id;-
94 QString expression;-
95 QUrl url;-
96 int line;-
97 int column;-
98 };-
99-
100 QList<QPair<QString, QVariant> > properties;-
101 QList<ExpressionChange> expressions;-
102 QList<QQuickReplaceSignalHandler*> signalReplacements;-
103-
104 QQmlProperty property(const QString &);-
105};-
106-
107void QQuickPropertyChangesParser::verifyList(const QV4::CompiledData::Unit *qmlUnit, const QV4::CompiledData::Binding *binding)-
108{-
109 if (binding->type == QV4::CompiledData::Binding::Type_Object
binding->type ...g::Type_ObjectDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 492 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
) {
2-492
110 error(qmlUnit->objectAt(binding->value.objectIndex), QQuickPropertyChanges::tr("PropertyChanges does not support creating state-specific objects."));-
111 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qquickstates
2
112 }-
113-
114 if (binding->type == QV4::CompiledData::Binding::Type_GroupProperty
binding->type ..._GroupPropertyDescription
TRUEevaluated 22 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickstates
FALSEevaluated 470 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
22-470
115 || binding->type == QV4::CompiledData::Binding::Type_AttachedProperty
binding->type ...tachedPropertyDescription
TRUEevaluated 6 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickstates
FALSEevaluated 464 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
) {
6-464
116 const QV4::CompiledData::Object *subObj = qmlUnit->objectAt(binding->value.objectIndex);-
117 const QV4::CompiledData::Binding *subBinding = subObj->bindingTable();-
118 for (quint32 i = 0; i < subObj->nBindings
i < subObj->nBindingsDescription
TRUEevaluated 32 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickstates
FALSEevaluated 28 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickstates
; ++i, ++subBinding) {
28-32
119 verifyList(qmlUnit, subBinding);-
120 }
executed 32 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickstates
32
121 }
executed 28 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickstates
28
122}
executed 492 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
492
123-
124void QQuickPropertyChangesPrivate::decode()-
125{-
126 if (decoded
decodedDescription
TRUEevaluated 102 times by 5 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickanimations
  • tst_qquickdesignersupport
  • tst_qquickmousearea
  • tst_qquickstates
FALSEevaluated 454 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
)
102-454
127 return;
executed 102 times by 5 tests: return;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickanimations
  • tst_qquickdesignersupport
  • tst_qquickmousearea
  • tst_qquickstates
102
128-
129 for (const QV4::CompiledData::Binding *binding : qAsConst(bindings))-
130 decodeBinding(QString(), compilationUnit->data, binding);
executed 480 times by 17 tests: decodeBinding(QString(), compilationUnit->data, binding);
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
480
131-
132 bindings.clear();-
133-
134 decoded = true;-
135}
executed 454 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
454
136-
137void QQuickPropertyChangesPrivate::decodeBinding(const QString &propertyPrefix, const QV4::CompiledData::Unit *qmlUnit, const QV4::CompiledData::Binding *binding)-
138{-
139 QQuickPropertyChanges * const q = q_func();-
140-
141 QString propertyName = propertyPrefix + qmlUnit->stringAt(binding->propertyNameIndex);-
142-
143 if (binding->type == QV4::CompiledData::Binding::Type_GroupProperty
binding->type ..._GroupPropertyDescription
TRUEevaluated 18 times by 5 tests
Evaluated by:
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickstates
FALSEevaluated 554 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
18-554
144 || binding->type == QV4::CompiledData::Binding::Type_AttachedProperty
binding->type ...tachedPropertyDescription
TRUEevaluated 72 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickstates
FALSEevaluated 482 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
) {
72-482
145 QString pre = propertyName + QLatin1Char('.');-
146 const QV4::CompiledData::Object *subObj = qmlUnit->objectAt(binding->value.objectIndex);-
147 const QV4::CompiledData::Binding *subBinding = subObj->bindingTable();-
148 for (quint32 i = 0; i < subObj->nBindings
i < subObj->nBindingsDescription
TRUEevaluated 92 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickstates
FALSEevaluated 90 times by 6 tests
Evaluated by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickstates
; ++i, ++subBinding) {
90-92
149 decodeBinding(pre, qmlUnit, subBinding);-
150 }
executed 92 times by 6 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickstates
92
151 return;
executed 90 times by 6 tests: return;
Executed by:
  • tst_examples
  • tst_qqmlvaluetypes
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickstates
90
152 }-
153-
154 if (propertyName.count() >= 3
propertyName.count() >= 3Description
TRUEevaluated 426 times by 16 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_qquickmousearea
  • tst_qquickpathview
  • tst_qquickstates
FALSEevaluated 56 times by 5 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickstates
&&
56-426
155 propertyName.at(0) == QLatin1Char('o')
propertyName.a...atin1Char('o')Description
TRUEevaluated 38 times by 3 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
  • tst_qquickstates
FALSEevaluated 388 times by 15 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_qquickmousearea
  • tst_qquickstates
&&
38-388
156 propertyName.at(1) == QLatin1Char('n')
propertyName.a...atin1Char('n')Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 20 times by 2 tests
Evaluated by:
  • tst_examples
  • tst_qquickpathview
&&
18-20
157 propertyName.at(2).isUpper()
propertyName.at(2).isUpper()Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEnever evaluated
) {
0-18
158 QQmlProperty prop = property(propertyName);-
159 if (prop.isSignalProperty()
prop.isSignalProperty()Description
TRUEevaluated 18 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEnever evaluated
) {
0-18
160 QQuickReplaceSignalHandler *handler = new QQuickReplaceSignalHandler;-
161 handler->property = prop;-
162 handler->expression.take(new QQmlBoundSignalExpression(object, QQmlPropertyPrivate::get(prop)->signalIndex(),-
163 QQmlContextData::get(qmlContext(q)), object, compilationUnit->runtimeFunctions.at(binding->value.compiledScriptIndex)));-
164 signalReplacements << handler;-
165 return;
executed 18 times by 1 test: return;
Executed by:
  • tst_qquickstates
18
166 }-
167 }
never executed: end of block
0
168-
169 if (binding->type == QV4::CompiledData::Binding::Type_Script
binding->type ...g::Type_ScriptDescription
TRUEevaluated 64 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
FALSEevaluated 400 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qqmltranslation
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickfontloader
  • tst_qquickitem2
  • tst_qquickmousearea
  • tst_qquickstates
|| binding->isTranslationBinding()
binding->isTra...ationBinding()Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qqmltranslation
  • tst_qquickstates
FALSEevaluated 396 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
) {
4-400
170 QUrl url = QUrl();-
171 int line = -1;-
172 int column = -1;-
173-
174 QQmlData *ddata = QQmlData::get(q);-
175 if (ddata
ddataDescription
TRUEevaluated 68 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
FALSEnever evaluated
&& ddata->outerContext
ddata->outerContextDescription
TRUEevaluated 68 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
FALSEnever evaluated
&& !ddata->outerContext->url().isEmpty()
!ddata->outerC...rl().isEmpty()Description
TRUEevaluated 68 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
FALSEnever evaluated
) {
0-68
176 url = ddata->outerContext->url();-
177 line = ddata->lineNumber;-
178 column = ddata->columnNumber;-
179 }
executed 68 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
68
180-
181 QString expression;-
182 QQmlBinding::Identifier id = QQmlBinding::Invalid;-
183-
184 if (!binding->isTranslationBinding()
!binding->isTr...ationBinding()Description
TRUEevaluated 64 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qqmltranslation
  • tst_qquickstates
) {
4-64
185 expression = binding->valueAsString(qmlUnit);-
186 id = binding->value.compiledScriptIndex;-
187 }
executed 64 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
64
188 expressions << ExpressionChange(propertyName, binding, id, expression, url, line, column);-
189 return;
executed 68 times by 11 tests: return;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
68
190 }-
191-
192 QVariant var;-
193 switch (binding->type) {-
194 case
never executed: case QV4::CompiledData::Binding::Type_Script:
QV4::CompiledData::Binding::Type_Script:
never executed: case QV4::CompiledData::Binding::Type_Script:
0
195 case
never executed: case QV4::CompiledData::Binding::Type_Translation:
QV4::CompiledData::Binding::Type_Translation:
never executed: case QV4::CompiledData::Binding::Type_Translation:
0
196 case
never executed: case QV4::CompiledData::Binding::Type_TranslationById:
QV4::CompiledData::Binding::Type_TranslationById:
never executed: case QV4::CompiledData::Binding::Type_TranslationById:
0
197 do { ((false) ? static_cast<void>(0) : qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached", __FILE__, 329)); __builtin_unreachable(); } while (false);-
198 case
executed 218 times by 6 tests: case QV4::CompiledData::Binding::Type_String:
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickfontloader
  • tst_qquickmousearea
  • tst_qquickstates
code before this statement never executed: case QV4::CompiledData::Binding::Type_String:
executed 218 times by 6 tests: case QV4::CompiledData::Binding::Type_String:
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickfontloader
  • tst_qquickmousearea
  • tst_qquickstates
QV4::CompiledData::Binding::Type_String:
code before this statement never executed: case QV4::CompiledData::Binding::Type_String:
executed 218 times by 6 tests: case QV4::CompiledData::Binding::Type_String:
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickfontloader
  • tst_qquickmousearea
  • tst_qquickstates
0-218
199 var = binding->valueAsString(qmlUnit);-
200 break;
executed 218 times by 6 tests: break;
Executed by:
  • tst_examples
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickfontloader
  • tst_qquickmousearea
  • tst_qquickstates
218
201 case
executed 100 times by 8 tests: case QV4::CompiledData::Binding::Type_Number:
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickitem2
  • tst_qquickstates
QV4::CompiledData::Binding::Type_Number:
executed 100 times by 8 tests: case QV4::CompiledData::Binding::Type_Number:
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickitem2
  • tst_qquickstates
100
202 var = binding->valueAsNumber();-
203 break;
executed 100 times by 8 tests: break;
Executed by:
  • tst_examples
  • tst_qqmlenginedebugservice
  • tst_qquickanimations
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickflipable
  • tst_qquickitem2
  • tst_qquickstates
100
204 case
executed 78 times by 3 tests: case QV4::CompiledData::Binding::Type_Boolean:
Executed by:
  • tst_examples
  • tst_qquickbehaviors
  • tst_qquickstates
QV4::CompiledData::Binding::Type_Boolean:
executed 78 times by 3 tests: case QV4::CompiledData::Binding::Type_Boolean:
Executed by:
  • tst_examples
  • tst_qquickbehaviors
  • tst_qquickstates
78
205 var = binding->valueAsBoolean();-
206 break;
executed 78 times by 3 tests: break;
Executed by:
  • tst_examples
  • tst_qquickbehaviors
  • tst_qquickstates
78
207 default
never executed: default:
:
never executed: default:
0
208 break;
never executed: break;
0
209 }-
210-
211 properties << qMakePair(propertyName, var);-
212}
executed 396 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
396
213-
214void QQuickPropertyChangesParser::verifyBindings(const QV4::CompiledData::Unit *qmlUnit, const QList<const QV4::CompiledData::Binding *> &props)-
215{-
216 for (int ii = 0; ii < props.count()
ii < props.count()Description
TRUEevaluated 462 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 398 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
; ++ii)
398-462
217 verifyList(qmlUnit, props.at(ii));
executed 462 times by 17 tests: verifyList(qmlUnit, props.at(ii));
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
462
218}
executed 398 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
398
219-
220void QQuickPropertyChangesParser::applyBindings(QObject *obj, QV4::CompiledData::CompilationUnit *compilationUnit, const QList<const QV4::CompiledData::Binding *> &bindings)-
221{-
222 QQuickPropertyChangesPrivate *p =-
223 static_cast<QQuickPropertyChangesPrivate *>(QObjectPrivate::get(obj));-
224 p->bindings = bindings;-
225 p->compilationUnit = compilationUnit;-
226 p->decoded = false;-
227}
executed 454 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
454
228-
229QQuickPropertyChanges::QQuickPropertyChanges()-
230: QQuickStateOperation(*(new QQuickPropertyChangesPrivate))-
231{-
232}
executed 456 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
456
233-
234QQuickPropertyChanges::~QQuickPropertyChanges()-
235{-
236 QQuickPropertyChangesPrivate * const d = d_func();-
237 for(int ii = 0; ii < d->signalReplacements.count()
ii < d->signal...ements.count()Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 352 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
; ++ii)
14-352
238 delete d->signalReplacements.at(ii);
executed 14 times by 1 test: delete d->signalReplacements.at(ii);
Executed by:
  • tst_qquickstates
14
239}
executed 352 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
352
240-
241QObject *QQuickPropertyChanges::object() const-
242{-
243 const QQuickPropertyChangesPrivate * const d = d_func();-
244 return
executed 198 times by 13 tests: return d->object;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
d->object;
executed 198 times by 13 tests: return d->object;
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlenginedebugservice
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickdesignersupport
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
198
245}-
246-
247void QQuickPropertyChanges::setObject(QObject *o)-
248{-
249 QQuickPropertyChangesPrivate * const d = d_func();-
250 d->object = o;-
251}
executed 458 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
458
252bool QQuickPropertyChanges::restoreEntryValues() const-
253{-
254 const QQuickPropertyChangesPrivate * const d = d_func();-
255 return
executed 580 times by 17 tests: return d->restore;
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
d->restore;
executed 580 times by 17 tests: return d->restore;
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
580
256}-
257-
258void QQuickPropertyChanges::setRestoreEntryValues(bool v)-
259{-
260 QQuickPropertyChangesPrivate * const d = d_func();-
261 d->restore = v;-
262}
executed 4 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickstates
4
263-
264QQmlProperty-
265QQuickPropertyChangesPrivate::property(const QString &property)-
266{-
267 QQuickPropertyChanges * const q = q_func();-
268 QQmlContextData *context = nullptr;-
269 if (QQmlData *ddata = QQmlData::get(q)
QQmlData *ddat...mlData::get(q)Description
TRUEevaluated 612 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
FALSEnever evaluated
)
0-612
270 context = ddata->outerContext;
executed 612 times by 17 tests: context = ddata->outerContext;
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
612
271 QQmlProperty prop = QQmlPropertyPrivate::create(object, property, context);-
272 if (!prop.isValid()
!prop.isValid()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 608 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-608
273 qmlWarning(q) << QQuickPropertyChanges::tr("Cannot assign to non-existent property \"%1\"").arg(property);-
274 return
executed 4 times by 1 test: return QQmlProperty();
Executed by:
  • tst_qquickstates
QQmlProperty();
executed 4 times by 1 test: return QQmlProperty();
Executed by:
  • tst_qquickstates
4
275 } else if (!(prop.type() & QQmlProperty::SignalProperty)
!(prop.type() ...ignalProperty)Description
TRUEevaluated 590 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 18 times by 1 test
Evaluated by:
  • tst_qquickstates
&& !prop.isWritable()
!prop.isWritable()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 588 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
) {
2-590
276 qmlWarning(q) << QQuickPropertyChanges::tr("Cannot assign to read-only property \"%1\"").arg(property);-
277 return
executed 2 times by 1 test: return QQmlProperty();
Executed by:
  • tst_qquickstates
QQmlProperty();
executed 2 times by 1 test: return QQmlProperty();
Executed by:
  • tst_qquickstates
2
278 }-
279 return
executed 606 times by 17 tests: return prop;
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
prop;
executed 606 times by 17 tests: return prop;
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
606
280}-
281-
282QQuickPropertyChanges::ActionList QQuickPropertyChanges::actions()-
283{-
284 QQuickPropertyChangesPrivate * const d = d_func();-
285-
286 d->decode();-
287-
288 ActionList list;-
289-
290 for (int ii = 0; ii < d->properties.count()
ii < d->properties.count()Description
TRUEevaluated 486 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 556 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
; ++ii) {
486-556
291 QQmlProperty prop = d->property(d->properties.at(ii).first);-
292-
293 QQuickStateAction a(d->object, prop, d->properties.at(ii).first,-
294 d->properties.at(ii).second);-
295-
296 if (a.property.isValid()
a.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
297 a.restore = restoreEntryValues();-
298 list << a;-
299 }
executed 480 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
480
300 }
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
301-
302 for (int ii = 0; ii < d->signalReplacements.count()
ii < d->signal...ements.count()Description
TRUEevaluated 26 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 556 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
; ++ii) {
26-556
303 QQuickReplaceSignalHandler *handler = d->signalReplacements.at(ii);-
304-
305 if (handler->property.isValid()
handler->property.isValid()Description
TRUEevaluated 26 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEnever evaluated
) {
0-26
306 QQuickStateAction a;-
307 a.event = handler;-
308 list << a;-
309 }
executed 26 times by 1 test: end of block
Executed by:
  • tst_qquickstates
26
310 }
executed 26 times by 1 test: end of block
Executed by:
  • tst_qquickstates
26
311-
312 for (int ii = 0; ii < d->expressions.count()
ii < d->expressions.count()Description
TRUEevaluated 92 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
FALSEevaluated 556 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
; ++ii) {
92-556
313-
314 QQuickPropertyChangesPrivate::ExpressionChange e = d->expressions.at(ii);-
315 const QString &property = e.name;-
316 QQmlProperty prop = d->property(property);-
317-
318 if (prop.isValid()
prop.isValid()Description
TRUEevaluated 92 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
FALSEnever evaluated
) {
0-92
319 QQuickStateAction a;-
320 a.restore = restoreEntryValues();-
321 a.property = prop;-
322 a.fromValue = a.property.read();-
323 a.specifiedObject = d->object;-
324 a.specifiedProperty = property;-
325-
326 QQmlContextData *context = QQmlContextData::get(qmlContext(this));-
327-
328 QQmlBinding *newBinding = nullptr;-
329 if (e.binding
e.bindingDescription
TRUEevaluated 88 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
&& e.binding->isTranslationBinding()
e.binding->isT...ationBinding()Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qqmltranslation
  • tst_qquickstates
FALSEevaluated 84 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
) {
4-88
330 newBinding = QQmlBinding::createTranslationBinding(d->compilationUnit, e.binding, object(), context);-
331 }
executed 4 times by 2 tests: end of block
Executed by:
  • tst_qqmltranslation
  • tst_qquickstates
else if (e.id != QQmlBinding::Invalid
e.id != QQmlBinding::InvalidDescription
TRUEevaluated 84 times by 10 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
) {
4-84
332 QV4::Scope scope(qmlEngine(this)->handle());-
333 QV4::Scoped<QV4::QmlContext> qmlContext(scope, QV4::QmlContext::create(scope.engine->rootContext(), context, object()));-
334 newBinding = QQmlBinding::create(&QQmlPropertyPrivate::get(prop)->core,-
335 d->compilationUnit->runtimeFunctions.at(e.id), object(), context, qmlContext);-
336 }
executed 84 times by 10 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
84
337 if (!newBinding
!newBindingDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 88 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
)
4-88
338 newBinding = QQmlBinding::create(&QQmlPropertyPrivate::get(prop)->core,
executed 4 times by 1 test: newBinding = QQmlBinding::create(&QQmlPropertyPrivate::get(prop)->core, e.expression, object(), context, e.url.toString(), e.line);
Executed by:
  • tst_qquickstates
4
339 e.expression, object(), context, e.url.toString(), e.line);
executed 4 times by 1 test: newBinding = QQmlBinding::create(&QQmlPropertyPrivate::get(prop)->core, e.expression, object(), context, e.url.toString(), e.line);
Executed by:
  • tst_qquickstates
4
340-
341 if (d->isExplicit
d->isExplicitDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 88 times by 11 tests
Evaluated by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
) {
4-88
342-
343-
344-
345-
346 a.toValue = newBinding->evaluate();-
347 delete newBinding;-
348 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickstates
else {
4
349 newBinding->setTarget(prop);-
350 a.toBinding = newBinding;-
351 a.deletableToBinding = true;-
352 }
executed 88 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
88
353-
354 list << a;-
355 }
executed 92 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
92
356 }
executed 92 times by 11 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlbinding
  • tst_qqmlecmascript
  • tst_qqmlnotifier
  • tst_qqmlproperty
  • tst_qqmltranslation
  • tst_qqmlvaluetypes
  • tst_qquickbehaviors
  • tst_qquickitem2
  • tst_qquickpathview
  • tst_qquickstates
92
357-
358 return
executed 556 times by 17 tests: return list;
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
list;
executed 556 times by 17 tests: return list;
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
556
359}-
360bool QQuickPropertyChanges::isExplicit() const-
361{-
362 const QQuickPropertyChangesPrivate * const d = d_func();-
363 return
executed 6 times by 2 tests: return d->isExplicit;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickstates
d->isExplicit;
executed 6 times by 2 tests: return d->isExplicit;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickstates
6
364}-
365-
366void QQuickPropertyChanges::setIsExplicit(bool e)-
367{-
368 QQuickPropertyChangesPrivate * const d = d_func();-
369 d->isExplicit = e;-
370}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickstates
2
371-
372bool QQuickPropertyChanges::containsValue(const QString &name) const-
373{-
374 const QQuickPropertyChangesPrivate * const d = d_func();-
375 typedef QPair<QString, QVariant> PropertyEntry;-
376-
377 QListIterator<PropertyEntry> propertyIterator(d->properties);-
378 while (propertyIterator.hasNext()
propertyIterator.hasNext()Description
TRUEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickstates
) {
6-16
379 const PropertyEntry &entry = propertyIterator.next();-
380 if (entry.first == name
entry.first == nameDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_qquickstates
) {
4-12
381 return
executed 4 times by 1 test: return true;
Executed by:
  • tst_qquickstates
true;
executed 4 times by 1 test: return true;
Executed by:
  • tst_qquickstates
4
382 }-
383 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_qquickstates
12
384-
385 return
executed 6 times by 1 test: return false;
Executed by:
  • tst_qquickstates
false;
executed 6 times by 1 test: return false;
Executed by:
  • tst_qquickstates
6
386}-
387-
388bool QQuickPropertyChanges::containsExpression(const QString &name) const-
389{-
390 const QQuickPropertyChangesPrivate * const d = d_func();-
391 typedef QQuickPropertyChangesPrivate::ExpressionChange ExpressionEntry;-
392-
393 QListIterator<ExpressionEntry> expressionIterator(d->expressions);-
394 while (expressionIterator.hasNext()
expressionIterator.hasNext()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
) {
4
395 const ExpressionEntry &entry = expressionIterator.next();-
396 if (entry.name == name
entry.name == nameDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEnever evaluated
) {
0-4
397 return
executed 4 times by 1 test: return true;
Executed by:
  • tst_qquickstates
true;
executed 4 times by 1 test: return true;
Executed by:
  • tst_qquickstates
4
398 }-
399 }
never executed: end of block
0
400-
401 return
executed 4 times by 1 test: return false;
Executed by:
  • tst_qquickstates
false;
executed 4 times by 1 test: return false;
Executed by:
  • tst_qquickstates
4
402}-
403-
404bool QQuickPropertyChanges::containsProperty(const QString &name) const-
405{-
406 return
executed 2 times by 1 test: return containsValue(name) || containsExpression(name);
Executed by:
  • tst_qquickstates
containsValue(name) || containsExpression(name);
executed 2 times by 1 test: return containsValue(name) || containsExpression(name);
Executed by:
  • tst_qquickstates
2
407}-
408-
409void QQuickPropertyChanges::changeValue(const QString &name, const QVariant &value)-
410{-
411 QQuickPropertyChangesPrivate * const d = d_func();-
412 typedef QPair<QString, QVariant> PropertyEntry;-
413 typedef QQuickPropertyChangesPrivate::ExpressionChange ExpressionEntry;-
414-
415 QMutableListIterator<ExpressionEntry> expressionIterator(d->expressions);-
416 while (expressionIterator.hasNext()
expressionIterator.hasNext()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 12 times by 3 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickdesignersupport
  • tst_qquickstates
) {
4-12
417 const ExpressionEntry &entry = expressionIterator.next();-
418 if (entry.name == name
entry.name == nameDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEnever evaluated
) {
0-4
419 expressionIterator.remove();-
420 if (state()
state()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEnever evaluated
&& state()->isStateActive()
state()->isStateActive()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickstates
) {
0-4
421 QQmlPropertyPrivate::removeBinding(d->property(name));-
422 d->property(name).write(value);-
423 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickstates
2
424-
425 d->properties.append(PropertyEntry(name, value));-
426 return;
executed 4 times by 1 test: return;
Executed by:
  • tst_qquickstates
4
427 }-
428 }
never executed: end of block
0
429-
430 QMutableListIterator<PropertyEntry> propertyIterator(d->properties);-
431 while (propertyIterator.hasNext()
propertyIterator.hasNext()Description
TRUEevaluated 12 times by 3 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickdesignersupport
  • tst_qquickstates
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickdesignersupport
) {
4-12
432 PropertyEntry &entry = propertyIterator.next();-
433 if (entry.first == name
entry.first == nameDescription
TRUEevaluated 8 times by 3 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickdesignersupport
  • tst_qquickstates
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
) {
4-8
434 entry.second = value;-
435 if (state()
state()Description
TRUEevaluated 8 times by 3 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickdesignersupport
  • tst_qquickstates
FALSEnever evaluated
&& state()->isStateActive()
state()->isStateActive()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 6 times by 3 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickdesignersupport
  • tst_qquickstates
)
0-8
436 d->property(name).write(value);
executed 2 times by 1 test: d->property(name).write(value);
Executed by:
  • tst_qquickstates
2
437 return;
executed 8 times by 3 tests: return;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickdesignersupport
  • tst_qquickstates
8
438 }-
439 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickstates
4
440-
441 QQuickStateAction action;-
442 action.restore = restoreEntryValues();-
443 action.property = d->property(name);-
444 action.fromValue = action.property.read();-
445 action.specifiedObject = object();-
446 action.specifiedProperty = name;-
447 action.toValue = value;-
448-
449 propertyIterator.insert(PropertyEntry(name, value));-
450 if (state()
state()Description
TRUEevaluated 4 times by 2 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickdesignersupport
FALSEnever evaluated
&& state()->isStateActive()
state()->isStateActive()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickdesignersupport
) {
0-4
451 state()->addEntryToRevertList(action);-
452 QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::binding(action.property);-
453 if (oldBinding
oldBindingDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qqmlenginedebugservice
FALSEnever evaluated
)
0-2
454 oldBinding->setEnabled(false, QQmlPropertyData::DontRemoveBinding | QQmlPropertyData::BypassInterceptor);
executed 2 times by 1 test: oldBinding->setEnabled(false, QQmlPropertyData::DontRemoveBinding | QQmlPropertyData::BypassInterceptor);
Executed by:
  • tst_qqmlenginedebugservice
2
455 d->property(name).write(value);-
456 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qqmlenginedebugservice
2
457}
executed 4 times by 2 tests: end of block
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickdesignersupport
4
458-
459void QQuickPropertyChanges::changeExpression(const QString &name, const QString &expression)-
460{-
461 QQuickPropertyChangesPrivate * const d = d_func();-
462 typedef QPair<QString, QVariant> PropertyEntry;-
463 typedef QQuickPropertyChangesPrivate::ExpressionChange ExpressionEntry;-
464-
465 bool hadValue = false;-
466-
467 QMutableListIterator<PropertyEntry> propertyIterator(d->properties);-
468 while (propertyIterator.hasNext()
propertyIterator.hasNext()Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEnever evaluated
) {
0-8
469 PropertyEntry &entry = propertyIterator.next();-
470 if (entry.first == name
entry.first == nameDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
) {
4
471 propertyIterator.remove();-
472 hadValue = true;-
473 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_qquickstates
4
474 }-
475 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickstates
4
476-
477 QMutableListIterator<ExpressionEntry> expressionIterator(d->expressions);-
478 while (expressionIterator.hasNext()
expressionIterator.hasNext()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
) {
0-4
479 ExpressionEntry &entry = expressionIterator.next();-
480 if (entry.name == name
entry.name == nameDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
481 entry.expression = expression;-
482 if (state()
state()Description
TRUEnever evaluated
FALSEnever evaluated
&& state()->isStateActive()
state()->isStateActive()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
483 auto prop = d->property(name);-
484 QQmlBinding *newBinding = QQmlBinding::create(-
485 &QQmlPropertyPrivate::get(prop)->core, expression, object(),-
486 QQmlContextData::get(qmlContext(this)));-
487 newBinding->setTarget(prop);-
488 QQmlPropertyPrivate::setBinding(newBinding, QQmlPropertyPrivate::None, QQmlPropertyData::DontRemoveBinding | QQmlPropertyData::BypassInterceptor);-
489 }
never executed: end of block
0
490 return;
never executed: return;
0
491 }-
492 }
never executed: end of block
0
493-
494-
495 expressionIterator.insert(ExpressionEntry(name, nullptr, QQmlBinding::Invalid, expression, QUrl(), -1, -1));-
496-
497 if (state()
state()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEnever evaluated
&& state()->isStateActive()
state()->isStateActive()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickstates
) {
0-4
498 if (hadValue
hadValueDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEnever evaluated
) {
0-2
499 QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::binding(d->property(name));-
500 if (oldBinding
oldBindingDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickstates
) {
0-2
501 oldBinding->setEnabled(false, QQmlPropertyData::DontRemoveBinding | QQmlPropertyData::BypassInterceptor);-
502 state()->changeBindingInRevertList(object(), name, oldBinding);-
503 }
never executed: end of block
0
504-
505 auto prop = d->property(name);-
506 QQmlBinding *newBinding = QQmlBinding::create(-
507 &QQmlPropertyPrivate::get(prop)->core, expression, object(),-
508 QQmlContextData::get(qmlContext(this)));-
509 newBinding->setTarget(prop);-
510 QQmlPropertyPrivate::setBinding(newBinding, QQmlPropertyPrivate::None, QQmlPropertyData::DontRemoveBinding | QQmlPropertyData::BypassInterceptor);-
511 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickstates
else {
2
512 QQuickStateAction action;-
513 action.restore = restoreEntryValues();-
514 action.property = d->property(name);-
515 action.fromValue = action.property.read();-
516 action.specifiedObject = object();-
517 action.specifiedProperty = name;-
518-
519 QQmlBinding *newBinding = QQmlBinding::create(-
520 &QQmlPropertyPrivate::get(action.property)->core, expression,-
521 object(), QQmlContextData::get(qmlContext(this)));-
522 if (d->isExplicit
d->isExplicitDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
523-
524-
525-
526 action.toValue = newBinding->evaluate();-
527 delete newBinding;-
528 }
never executed: end of block
else {
0
529 newBinding->setTarget(action.property);-
530 action.toBinding = newBinding;-
531 action.deletableToBinding = true;-
532-
533 state()->addEntryToRevertList(action);-
534 QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::binding(action.property);-
535 if (oldBinding
oldBindingDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
536 oldBinding->setEnabled(false, QQmlPropertyData::DontRemoveBinding | QQmlPropertyData::BypassInterceptor);
never executed: oldBinding->setEnabled(false, QQmlPropertyData::DontRemoveBinding | QQmlPropertyData::BypassInterceptor);
0
537-
538 QQmlPropertyPrivate::setBinding(newBinding, QQmlPropertyPrivate::None, QQmlPropertyData::DontRemoveBinding | QQmlPropertyData::BypassInterceptor);-
539 }
never executed: end of block
0
540 }-
541 }-
542-
543}
executed 4 times by 1 test: end of block
Executed by:
  • tst_qquickstates
4
544-
545QVariant QQuickPropertyChanges::property(const QString &name) const-
546{-
547 const QQuickPropertyChangesPrivate * const d = d_func();-
548 typedef QPair<QString, QVariant> PropertyEntry;-
549 typedef QQuickPropertyChangesPrivate::ExpressionChange ExpressionEntry;-
550-
551 QListIterator<PropertyEntry> propertyIterator(d->properties);-
552 while (propertyIterator.hasNext()
propertyIterator.hasNext()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
553 const PropertyEntry &entry = propertyIterator.next();-
554 if (entry.first == name
entry.first == nameDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
555 return
never executed: return entry.second;
entry.second;
never executed: return entry.second;
0
556 }-
557 }
never executed: end of block
0
558-
559 QListIterator<ExpressionEntry> expressionIterator(d->expressions);-
560 while (expressionIterator.hasNext()
expressionIterator.hasNext()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
561 const ExpressionEntry &entry = expressionIterator.next();-
562 if (entry.name == name
entry.name == nameDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
563 return
never executed: return QVariant(entry.expression);
QVariant(entry.expression);
never executed: return QVariant(entry.expression);
0
564 }-
565 }
never executed: end of block
0
566-
567 return
never executed: return QVariant();
QVariant();
never executed: return QVariant();
0
568}-
569-
570void QQuickPropertyChanges::removeProperty(const QString &name)-
571{-
572 QQuickPropertyChangesPrivate * const d = d_func();-
573 typedef QPair<QString, QVariant> PropertyEntry;-
574 typedef QQuickPropertyChangesPrivate::ExpressionChange ExpressionEntry;-
575-
576 QMutableListIterator<ExpressionEntry> expressionIterator(d->expressions);-
577 while (expressionIterator.hasNext()
expressionIterator.hasNext()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 6 times by 3 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickdesignersupport
  • tst_qquickstates
) {
4-6
578 const ExpressionEntry &entry = expressionIterator.next();-
579 if (entry.name == name
entry.name == nameDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEnever evaluated
) {
0-4
580 expressionIterator.remove();-
581 state()->removeEntryFromRevertList(object(), name);-
582 return;
executed 4 times by 1 test: return;
Executed by:
  • tst_qquickstates
4
583 }-
584 }
never executed: end of block
0
585-
586 QMutableListIterator<PropertyEntry> propertyIterator(d->properties);-
587 while (propertyIterator.hasNext()
propertyIterator.hasNext()Description
TRUEevaluated 8 times by 3 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickdesignersupport
  • tst_qquickstates
FALSEnever evaluated
) {
0-8
588 const PropertyEntry &entry = propertyIterator.next();-
589 if (entry.first == name
entry.first == nameDescription
TRUEevaluated 6 times by 3 tests
Evaluated by:
  • tst_qqmlenginedebugservice
  • tst_qquickdesignersupport
  • tst_qquickstates
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickstates
) {
2-6
590 propertyIterator.remove();-
591 state()->removeEntryFromRevertList(object(), name);-
592 return;
executed 6 times by 3 tests: return;
Executed by:
  • tst_qqmlenginedebugservice
  • tst_qquickdesignersupport
  • tst_qquickstates
6
593 }-
594 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickstates
2
595}
never executed: end of block
0
596-
597QVariant QQuickPropertyChanges::value(const QString &name) const-
598{-
599 const QQuickPropertyChangesPrivate * const d = d_func();-
600 typedef QPair<QString, QVariant> PropertyEntry;-
601-
602 QListIterator<PropertyEntry> propertyIterator(d->properties);-
603 while (propertyIterator.hasNext()
propertyIterator.hasNext()Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_qquickstates
) {
6-24
604 const PropertyEntry &entry = propertyIterator.next();-
605 if (entry.first == name
entry.first == nameDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tst_qquickstates
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tst_qquickstates
) {
8-16
606 return
executed 8 times by 1 test: return entry.second;
Executed by:
  • tst_qquickstates
entry.second;
executed 8 times by 1 test: return entry.second;
Executed by:
  • tst_qquickstates
8
607 }-
608 }
executed 16 times by 1 test: end of block
Executed by:
  • tst_qquickstates
16
609-
610 return
executed 6 times by 1 test: return QVariant();
Executed by:
  • tst_qquickstates
QVariant();
executed 6 times by 1 test: return QVariant();
Executed by:
  • tst_qquickstates
6
611}-
612-
613QString QQuickPropertyChanges::expression(const QString &name) const-
614{-
615 const QQuickPropertyChangesPrivate * const d = d_func();-
616 typedef QQuickPropertyChangesPrivate::ExpressionChange ExpressionEntry;-
617-
618 QListIterator<ExpressionEntry> expressionIterator(d->expressions);-
619 while (expressionIterator.hasNext()
expressionIterator.hasNext()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
620 const ExpressionEntry &entry = expressionIterator.next();-
621 if (entry.name == name
entry.name == nameDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
622 return
never executed: return entry.expression;
entry.expression;
never executed: return entry.expression;
0
623 }-
624 }
never executed: end of block
0
625-
626 return
never executed: return QString();
QString();
never executed: return QString();
0
627}-
628-
629void QQuickPropertyChanges::detachFromState()-
630{-
631 if (state()
state()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
632 state()->removeAllEntriesFromRevertList(object());
never executed: state()->removeAllEntriesFromRevertList(object());
0
633}
never executed: end of block
0
634-
635void QQuickPropertyChanges::attachToState()-
636{-
637 if (state()
state()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qquickdesignersupport
FALSEnever evaluated
)
0-2
638 state()->addEntriesToRevertList(actions());
executed 2 times by 1 test: state()->addEntriesToRevertList(actions());
Executed by:
  • tst_qquickdesignersupport
2
639}
executed 2 times by 1 test: end of block
Executed by:
  • tst_qquickdesignersupport
2
640-
641-
642-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0