OpenCoverage

qquickstatechangescript.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickstatechangescript.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7class QQuickStateChangeScriptPrivate : public QQuickStateOperationPrivate-
8{-
9public:-
10 QQuickStateChangeScriptPrivate() {}-
11-
12 QQmlScriptString script;-
13 QString name;-
14};-
15QQuickStateChangeScript::QQuickStateChangeScript(QObject *parent)-
16: QQuickStateOperation(*(new QQuickStateChangeScriptPrivate), parent)-
17{-
18}
executed 8 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickstates
8
19-
20QQuickStateChangeScript::~QQuickStateChangeScript()-
21{-
22}-
23-
24-
25-
26-
27-
28QQmlScriptString QQuickStateChangeScript::script() const-
29{-
30 const QQuickStateChangeScriptPrivate * const d = d_func();-
31 return
never executed: return d->script;
d->script;
never executed: return d->script;
0
32}-
33-
34void QQuickStateChangeScript::setScript(const QQmlScriptString &s)-
35{-
36 QQuickStateChangeScriptPrivate * const d = d_func();-
37 d->script = s;-
38}
executed 8 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickstates
8
39QString QQuickStateChangeScript::name() const-
40{-
41 const QQuickStateChangeScriptPrivate * const d = d_func();-
42 return
never executed: return d->name;
d->name;
never executed: return d->name;
0
43}-
44-
45void QQuickStateChangeScript::setName(const QString &n)-
46{-
47 QQuickStateChangeScriptPrivate * const d = d_func();-
48 d->name = n;-
49}
never executed: end of block
0
50-
51void QQuickStateChangeScript::execute()-
52{-
53 QQuickStateChangeScriptPrivate * const d = d_func();-
54 if (!d->script.isEmpty()
!d->script.isEmpty()Description
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickstates
FALSEnever evaluated
) {
0-8
55 QQmlExpression expr(d->script);-
56 expr.evaluate();-
57 if (expr.hasError()
expr.hasError()Description
TRUEnever evaluated
FALSEevaluated 8 times by 2 tests
Evaluated by:
  • tst_qquickanimations
  • tst_qquickstates
)
0-8
58 qmlWarning(this, expr.error());
never executed: qmlWarning(this, expr.error());
0
59 }
executed 8 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickstates
8
60}
executed 8 times by 2 tests: end of block
Executed by:
  • tst_qquickanimations
  • tst_qquickstates
8
61-
62QQuickStateChangeScript::ActionList QQuickStateChangeScript::actions()-
63{-
64 ActionList rv;-
65 QQuickStateAction a;-
66 a.event = this;-
67 rv << a;-
68 return
executed 8 times by 2 tests: return rv;
Executed by:
  • tst_qquickanimations
  • tst_qquickstates
rv;
executed 8 times by 2 tests: return rv;
Executed by:
  • tst_qquickanimations
  • tst_qquickstates
8
69}-
70-
71QQuickStateActionEvent::EventType QQuickStateChangeScript::type() const-
72{-
73 return
never executed: return Script;
Script;
never executed: return Script;
0
74}-
75-
76-
77-
78-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0