Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickstatechangescript.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | - | |||||||
7 | class QQuickStateChangeScriptPrivate : public QQuickStateOperationPrivate | - | ||||||
8 | { | - | ||||||
9 | public: | - | ||||||
10 | QQuickStateChangeScriptPrivate() {} | - | ||||||
11 | - | |||||||
12 | QQmlScriptString script; | - | ||||||
13 | QString name; | - | ||||||
14 | }; | - | ||||||
15 | QQuickStateChangeScript::QQuickStateChangeScript(QObject *parent) | - | ||||||
16 | : QQuickStateOperation(*(new QQuickStateChangeScriptPrivate), parent) | - | ||||||
17 | { | - | ||||||
18 | } executed 8 times by 2 tests: end of block Executed by:
| 8 | ||||||
19 | - | |||||||
20 | QQuickStateChangeScript::~QQuickStateChangeScript() | - | ||||||
21 | { | - | ||||||
22 | } | - | ||||||
23 | - | |||||||
24 | - | |||||||
25 | - | |||||||
26 | - | |||||||
27 | - | |||||||
28 | QQmlScriptString QQuickStateChangeScript::script() const | - | ||||||
29 | { | - | ||||||
30 | const QQuickStateChangeScriptPrivate * const d = d_func(); | - | ||||||
31 | return never executed: d->script;return d->script; never executed: return d->script; | 0 | ||||||
32 | } | - | ||||||
33 | - | |||||||
34 | void 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:
| 8 | ||||||
39 | QString QQuickStateChangeScript::name() const | - | ||||||
40 | { | - | ||||||
41 | const QQuickStateChangeScriptPrivate * const d = d_func(); | - | ||||||
42 | return never executed: d->name;return d->name; never executed: return d->name; | 0 | ||||||
43 | } | - | ||||||
44 | - | |||||||
45 | void QQuickStateChangeScript::setName(const QString &n) | - | ||||||
46 | { | - | ||||||
47 | QQuickStateChangeScriptPrivate * const d = d_func(); | - | ||||||
48 | d->name = n; | - | ||||||
49 | } never executed: end of block | 0 | ||||||
50 | - | |||||||
51 | void QQuickStateChangeScript::execute() | - | ||||||
52 | { | - | ||||||
53 | QQuickStateChangeScriptPrivate * const d = d_func(); | - | ||||||
54 | if (!d->script.isEmpty()
| 0-8 | ||||||
55 | QQmlExpression expr(d->script); | - | ||||||
56 | expr.evaluate(); | - | ||||||
57 | if (expr.hasError()
| 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:
| 8 | ||||||
60 | } executed 8 times by 2 tests: end of block Executed by:
| 8 | ||||||
61 | - | |||||||
62 | QQuickStateChangeScript::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: rv;return rv; Executed by:
executed 8 times by 2 tests: return rv; Executed by:
| 8 | ||||||
69 | } | - | ||||||
70 | - | |||||||
71 | QQuickStateActionEvent::EventType QQuickStateChangeScript::type() const | - | ||||||
72 | { | - | ||||||
73 | return never executed: Script;return Script; never executed: return Script; | 0 | ||||||
74 | } | - | ||||||
75 | - | |||||||
76 | - | |||||||
77 | - | |||||||
78 | - | |||||||
Switch to Source code | Preprocessed file |