Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/designer/qquickdesignersupportpropertychanges.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | void QQuickDesignerSupportPropertyChanges::attachToState(QObject *propertyChanges) | - | ||||||
6 | { | - | ||||||
7 | QQuickPropertyChanges *propertyChange = qobject_cast<QQuickPropertyChanges*>(propertyChanges); | - | ||||||
8 | - | |||||||
9 | if (!propertyChange
| 0-2 | ||||||
10 | return; never executed: return; | 0 | ||||||
11 | - | |||||||
12 | propertyChange->attachToState(); | - | ||||||
13 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||
14 | - | |||||||
15 | QObject *QQuickDesignerSupportPropertyChanges::targetObject(QObject *propertyChanges) | - | ||||||
16 | { | - | ||||||
17 | QQuickPropertyChanges *propertyChange = qobject_cast<QQuickPropertyChanges*>(propertyChanges); | - | ||||||
18 | - | |||||||
19 | if (!propertyChange
| 0-2 | ||||||
20 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||
21 | - | |||||||
22 | return executed 2 times by 1 test: propertyChange->object();return propertyChange->object(); Executed by:
executed 2 times by 1 test: return propertyChange->object(); Executed by:
| 2 | ||||||
23 | } | - | ||||||
24 | - | |||||||
25 | void QQuickDesignerSupportPropertyChanges::removeProperty(QObject *propertyChanges, const QQuickDesignerSupport::PropertyName &propertyName) | - | ||||||
26 | { | - | ||||||
27 | QQuickPropertyChanges *propertyChange = qobject_cast<QQuickPropertyChanges*>(propertyChanges); | - | ||||||
28 | - | |||||||
29 | if (!propertyChange
| 0-2 | ||||||
30 | return; never executed: return; | 0 | ||||||
31 | - | |||||||
32 | propertyChange->removeProperty(QString::fromUtf8(propertyName)); | - | ||||||
33 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||
34 | - | |||||||
35 | QVariant QQuickDesignerSupportPropertyChanges::getProperty(QObject *propertyChanges, | - | ||||||
36 | const QQuickDesignerSupport::PropertyName &propertyName) | - | ||||||
37 | { | - | ||||||
38 | QQuickPropertyChanges *propertyChange = qobject_cast<QQuickPropertyChanges*>(propertyChanges); | - | ||||||
39 | - | |||||||
40 | if (!propertyChange
| 0 | ||||||
41 | return never executed: QVariant();return QVariant(); never executed: return QVariant(); | 0 | ||||||
42 | - | |||||||
43 | return never executed: propertyChange->property(QString::fromUtf8(propertyName));return propertyChange->property(QString::fromUtf8(propertyName)); never executed: return propertyChange->property(QString::fromUtf8(propertyName)); | 0 | ||||||
44 | } | - | ||||||
45 | - | |||||||
46 | void QQuickDesignerSupportPropertyChanges::changeValue(QObject *propertyChanges, | - | ||||||
47 | const QQuickDesignerSupport::PropertyName &propertyName, | - | ||||||
48 | const QVariant &value) | - | ||||||
49 | { | - | ||||||
50 | QQuickPropertyChanges *propertyChange = qobject_cast<QQuickPropertyChanges*>(propertyChanges); | - | ||||||
51 | - | |||||||
52 | if (!propertyChange
| 0-4 | ||||||
53 | return; never executed: return; | 0 | ||||||
54 | - | |||||||
55 | propertyChange->changeValue(QString::fromUtf8(propertyName), value); | - | ||||||
56 | } executed 4 times by 1 test: end of block Executed by:
| 4 | ||||||
57 | - | |||||||
58 | void QQuickDesignerSupportPropertyChanges::changeExpression(QObject *propertyChanges, | - | ||||||
59 | const QQuickDesignerSupport::PropertyName &propertyName, | - | ||||||
60 | const QString &expression) | - | ||||||
61 | { | - | ||||||
62 | QQuickPropertyChanges *propertyChange = qobject_cast<QQuickPropertyChanges*>(propertyChanges); | - | ||||||
63 | - | |||||||
64 | if (!propertyChange
| 0 | ||||||
65 | return; never executed: return; | 0 | ||||||
66 | - | |||||||
67 | propertyChange->changeExpression(QString::fromUtf8(propertyName), expression); | - | ||||||
68 | } never executed: end of block | 0 | ||||||
69 | - | |||||||
70 | QObject *QQuickDesignerSupportPropertyChanges::stateObject(QObject *propertyChanges) | - | ||||||
71 | { | - | ||||||
72 | QQuickPropertyChanges *propertyChange = qobject_cast<QQuickPropertyChanges*>(propertyChanges); | - | ||||||
73 | - | |||||||
74 | if (!propertyChange
| 0-4 | ||||||
75 | return never executed: nullptr;return nullptr; never executed: return nullptr; | 0 | ||||||
76 | - | |||||||
77 | return executed 4 times by 1 test: propertyChange->state();return propertyChange->state(); Executed by:
executed 4 times by 1 test: return propertyChange->state(); Executed by:
| 4 | ||||||
78 | } | - | ||||||
79 | - | |||||||
80 | bool QQuickDesignerSupportPropertyChanges::isNormalProperty(const QQuickDesignerSupport::PropertyName &propertyName) | - | ||||||
81 | { | - | ||||||
82 | QMetaObject metaObject = QQuickPropertyChanges::staticMetaObject; | - | ||||||
83 | - | |||||||
84 | return never executed: (metaObject.indexOfProperty(propertyName) > 0);return (metaObject.indexOfProperty(propertyName) > 0); never executed: return (metaObject.indexOfProperty(propertyName) > 0); | 0 | ||||||
85 | } | - | ||||||
86 | - | |||||||
87 | void QQuickDesignerSupportPropertyChanges::detachFromState(QObject *propertyChanges) | - | ||||||
88 | { | - | ||||||
89 | QQuickPropertyChanges *propertyChange = qobject_cast<QQuickPropertyChanges*>(propertyChanges); | - | ||||||
90 | - | |||||||
91 | if (!propertyChange
| 0 | ||||||
92 | return; never executed: return; | 0 | ||||||
93 | - | |||||||
94 | propertyChange->detachFromState(); | - | ||||||
95 | } never executed: end of block | 0 | ||||||
96 | - | |||||||
97 | - | |||||||
Switch to Source code | Preprocessed file |