| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/designer/qquickdesignersupportstates.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | - | |||||||
| 3 | - | |||||||
| 4 | - | |||||||
| 5 | bool QQuickDesignerSupportStates::isStateActive(QObject *object, QQmlContext *context) | - | ||||||
| 6 | { | - | ||||||
| 7 | QQuickState *stateObject = qobject_cast<QQuickState*>(object); | - | ||||||
| 8 | - | |||||||
| 9 | if (!stateObject
| 0-14 | ||||||
| 10 | return never executed: false;return false;never executed: return false; | 0 | ||||||
| 11 | - | |||||||
| 12 | QQuickStateGroup *stateGroup = stateObject->stateGroup(); | - | ||||||
| 13 | - | |||||||
| 14 | QQmlProperty property(object, QLatin1String("name"), context); | - | ||||||
| 15 | - | |||||||
| 16 | return executed 14 times by 1 test: stateObject && stateGroup && stateGroup->state() == property.read();return stateObject && stateGroup && stateGroup->state() == property.read();Executed by:
executed 14 times by 1 test: return stateObject && stateGroup && stateGroup->state() == property.read();Executed by:
| 14 | ||||||
| 17 | } | - | ||||||
| 18 | - | |||||||
| 19 | void QQuickDesignerSupportStates::activateState(QObject *object, QQmlContext *context) | - | ||||||
| 20 | { | - | ||||||
| 21 | QQuickState *stateObject = qobject_cast<QQuickState*>(object); | - | ||||||
| 22 | - | |||||||
| 23 | if (!stateObject
| 0-14 | ||||||
| 24 | return; never executed: return; | 0 | ||||||
| 25 | - | |||||||
| 26 | QQuickStateGroup *stateGroup = stateObject->stateGroup(); | - | ||||||
| 27 | - | |||||||
| 28 | QQmlProperty property(object, QLatin1String("name"), context); | - | ||||||
| 29 | - | |||||||
| 30 | stateGroup->setState(property.read().toString()); | - | ||||||
| 31 | } executed 14 times by 1 test: end of blockExecuted by:
| 14 | ||||||
| 32 | - | |||||||
| 33 | void QQuickDesignerSupportStates::deactivateState(QObject *object) | - | ||||||
| 34 | { | - | ||||||
| 35 | QQuickState *stateObject = qobject_cast<QQuickState*>(object); | - | ||||||
| 36 | - | |||||||
| 37 | if (!stateObject
| 0-10 | ||||||
| 38 | return; never executed: return; | 0 | ||||||
| 39 | - | |||||||
| 40 | QQuickStateGroup *stateGroup = stateObject->stateGroup(); | - | ||||||
| 41 | - | |||||||
| 42 | if (stateGroup
| 0-10 | ||||||
| 43 | stateGroup->setState(QString()); executed 10 times by 1 test: stateGroup->setState(QString());Executed by:
| 10 | ||||||
| 44 | } executed 10 times by 1 test: end of blockExecuted by:
| 10 | ||||||
| 45 | - | |||||||
| 46 | bool QQuickDesignerSupportStates::changeValueInRevertList(QObject *state, QObject *target, | - | ||||||
| 47 | const QQuickDesignerSupport::PropertyName &propertyName, | - | ||||||
| 48 | const QVariant &value) | - | ||||||
| 49 | { | - | ||||||
| 50 | QQuickState *stateObject = qobject_cast<QQuickState*>(state); | - | ||||||
| 51 | - | |||||||
| 52 | if (!stateObject
| 0-2 | ||||||
| 53 | return never executed: false;return false;never executed: return false; | 0 | ||||||
| 54 | - | |||||||
| 55 | return executed 2 times by 1 test: stateObject->changeValueInRevertList(target, QString::fromUtf8(propertyName), value);return stateObject->changeValueInRevertList(target, QString::fromUtf8(propertyName), value);Executed by:
executed 2 times by 1 test: return stateObject->changeValueInRevertList(target, QString::fromUtf8(propertyName), value);Executed by:
| 2 | ||||||
| 56 | } | - | ||||||
| 57 | - | |||||||
| 58 | bool QQuickDesignerSupportStates::updateStateBinding(QObject *state, QObject *target, | - | ||||||
| 59 | const QQuickDesignerSupport::PropertyName &propertyName, | - | ||||||
| 60 | const QString &expression) | - | ||||||
| 61 | { | - | ||||||
| 62 | QQuickState *stateObject = qobject_cast<QQuickState*>(state); | - | ||||||
| 63 | - | |||||||
| 64 | if (!stateObject
| 0 | ||||||
| 65 | return never executed: false;return false;never executed: return false; | 0 | ||||||
| 66 | - | |||||||
| 67 | return never executed: stateObject->changeValueInRevertList(target, QString::fromUtf8(propertyName), expression);return stateObject->changeValueInRevertList(target, QString::fromUtf8(propertyName), expression);never executed: return stateObject->changeValueInRevertList(target, QString::fromUtf8(propertyName), expression); | 0 | ||||||
| 68 | } | - | ||||||
| 69 | - | |||||||
| 70 | bool QQuickDesignerSupportStates::resetStateProperty(QObject *state, QObject *target, | - | ||||||
| 71 | const QQuickDesignerSupport::PropertyName &propertyName, | - | ||||||
| 72 | const QVariant & ) | - | ||||||
| 73 | { | - | ||||||
| 74 | QQuickState *stateObject = qobject_cast<QQuickState*>(state); | - | ||||||
| 75 | - | |||||||
| 76 | if (!stateObject
| 0 | ||||||
| 77 | return never executed: false;return false;never executed: return false; | 0 | ||||||
| 78 | - | |||||||
| 79 | return never executed: stateObject->removeEntryFromRevertList(target, QString::fromUtf8(propertyName));return stateObject->removeEntryFromRevertList(target, QString::fromUtf8(propertyName));never executed: return stateObject->removeEntryFromRevertList(target, QString::fromUtf8(propertyName)); | 0 | ||||||
| 80 | } | - | ||||||
| 81 | - | |||||||
| 82 | - | |||||||
| Switch to Source code | Preprocessed file |