| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/corelib/statemachine/qstate.cpp |
| Source code | Switch to Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | /**************************************************************************** | - | ||||||||||||||||||||||||
| 2 | ** | - | ||||||||||||||||||||||||
| 3 | ** Copyright (C) 2015 The Qt Company Ltd. | - | ||||||||||||||||||||||||
| 4 | ** Contact: http://www.qt.io/licensing/ | - | ||||||||||||||||||||||||
| 5 | ** | - | ||||||||||||||||||||||||
| 6 | ** This file is part of the QtCore module of the Qt Toolkit. | - | ||||||||||||||||||||||||
| 7 | ** | - | ||||||||||||||||||||||||
| 8 | ** $QT_BEGIN_LICENSE:LGPL21$ | - | ||||||||||||||||||||||||
| 9 | ** Commercial License Usage | - | ||||||||||||||||||||||||
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in | - | ||||||||||||||||||||||||
| 11 | ** accordance with the commercial license agreement provided with the | - | ||||||||||||||||||||||||
| 12 | ** Software or, alternatively, in accordance with the terms contained in | - | ||||||||||||||||||||||||
| 13 | ** a written agreement between you and The Qt Company. For licensing terms | - | ||||||||||||||||||||||||
| 14 | ** and conditions see http://www.qt.io/terms-conditions. For further | - | ||||||||||||||||||||||||
| 15 | ** information use the contact form at http://www.qt.io/contact-us. | - | ||||||||||||||||||||||||
| 16 | ** | - | ||||||||||||||||||||||||
| 17 | ** GNU Lesser General Public License Usage | - | ||||||||||||||||||||||||
| 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - | ||||||||||||||||||||||||
| 19 | ** General Public License version 2.1 or version 3 as published by the Free | - | ||||||||||||||||||||||||
| 20 | ** Software Foundation and appearing in the file LICENSE.LGPLv21 and | - | ||||||||||||||||||||||||
| 21 | ** LICENSE.LGPLv3 included in the packaging of this file. Please review the | - | ||||||||||||||||||||||||
| 22 | ** following information to ensure the GNU Lesser General Public License | - | ||||||||||||||||||||||||
| 23 | ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and | - | ||||||||||||||||||||||||
| 24 | ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | - | ||||||||||||||||||||||||
| 25 | ** | - | ||||||||||||||||||||||||
| 26 | ** As a special exception, The Qt Company gives you certain additional | - | ||||||||||||||||||||||||
| 27 | ** rights. These rights are described in The Qt Company LGPL Exception | - | ||||||||||||||||||||||||
| 28 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | - | ||||||||||||||||||||||||
| 29 | ** | - | ||||||||||||||||||||||||
| 30 | ** $QT_END_LICENSE$ | - | ||||||||||||||||||||||||
| 31 | ** | - | ||||||||||||||||||||||||
| 32 | ****************************************************************************/ | - | ||||||||||||||||||||||||
| 33 | - | |||||||||||||||||||||||||
| 34 | #include "qstate_p.h" | - | ||||||||||||||||||||||||
| 35 | - | |||||||||||||||||||||||||
| 36 | #ifndef QT_NO_STATEMACHINE | - | ||||||||||||||||||||||||
| 37 | - | |||||||||||||||||||||||||
| 38 | #include "qhistorystate.h" | - | ||||||||||||||||||||||||
| 39 | #include "qhistorystate_p.h" | - | ||||||||||||||||||||||||
| 40 | #include "qabstracttransition.h" | - | ||||||||||||||||||||||||
| 41 | #include "qabstracttransition_p.h" | - | ||||||||||||||||||||||||
| 42 | #include "qsignaltransition.h" | - | ||||||||||||||||||||||||
| 43 | #include "qstatemachine.h" | - | ||||||||||||||||||||||||
| 44 | #include "qstatemachine_p.h" | - | ||||||||||||||||||||||||
| 45 | - | |||||||||||||||||||||||||
| 46 | QT_BEGIN_NAMESPACE | - | ||||||||||||||||||||||||
| 47 | - | |||||||||||||||||||||||||
| 48 | /*! | - | ||||||||||||||||||||||||
| 49 | \class QState | - | ||||||||||||||||||||||||
| 50 | \inmodule QtCore | - | ||||||||||||||||||||||||
| 51 | - | |||||||||||||||||||||||||
| 52 | \brief The QState class provides a general-purpose state for QStateMachine. | - | ||||||||||||||||||||||||
| 53 | - | |||||||||||||||||||||||||
| 54 | \since 4.6 | - | ||||||||||||||||||||||||
| 55 | \ingroup statemachine | - | ||||||||||||||||||||||||
| 56 | - | |||||||||||||||||||||||||
| 57 | QState objects can have child states, and can have transitions to other | - | ||||||||||||||||||||||||
| 58 | states. QState is part of \l{The State Machine Framework}. | - | ||||||||||||||||||||||||
| 59 | - | |||||||||||||||||||||||||
| 60 | The addTransition() function adds a transition. The removeTransition() | - | ||||||||||||||||||||||||
| 61 | function removes a transition. The transitions() function returns the | - | ||||||||||||||||||||||||
| 62 | state's outgoing transitions. | - | ||||||||||||||||||||||||
| 63 | - | |||||||||||||||||||||||||
| 64 | The assignProperty() function is used for defining property assignments that | - | ||||||||||||||||||||||||
| 65 | should be performed when a state is entered. | - | ||||||||||||||||||||||||
| 66 | - | |||||||||||||||||||||||||
| 67 | Top-level states must be passed a QStateMachine object as their parent | - | ||||||||||||||||||||||||
| 68 | state, or added to a state machine using QStateMachine::addState(). | - | ||||||||||||||||||||||||
| 69 | - | |||||||||||||||||||||||||
| 70 | \section1 States with Child States | - | ||||||||||||||||||||||||
| 71 | - | |||||||||||||||||||||||||
| 72 | The childMode property determines how child states are treated. For | - | ||||||||||||||||||||||||
| 73 | non-parallel state groups, the setInitialState() function must be called to | - | ||||||||||||||||||||||||
| 74 | set the initial state. The child states are mutually exclusive states, and | - | ||||||||||||||||||||||||
| 75 | the state machine needs to know which child state to enter when the parent | - | ||||||||||||||||||||||||
| 76 | state is the target of a transition. | - | ||||||||||||||||||||||||
| 77 | - | |||||||||||||||||||||||||
| 78 | The state emits the QState::finished() signal when a final child state | - | ||||||||||||||||||||||||
| 79 | (QFinalState) is entered. | - | ||||||||||||||||||||||||
| 80 | - | |||||||||||||||||||||||||
| 81 | The setErrorState() sets the state's error state. The error state is the | - | ||||||||||||||||||||||||
| 82 | state that the state machine will transition to if an error is detected when | - | ||||||||||||||||||||||||
| 83 | attempting to enter the state (e.g. because no initial state has been set). | - | ||||||||||||||||||||||||
| 84 | - | |||||||||||||||||||||||||
| 85 | */ | - | ||||||||||||||||||||||||
| 86 | - | |||||||||||||||||||||||||
| 87 | /*! | - | ||||||||||||||||||||||||
| 88 | \property QState::initialState | - | ||||||||||||||||||||||||
| 89 | - | |||||||||||||||||||||||||
| 90 | \brief the initial state of this state (one of its child states) | - | ||||||||||||||||||||||||
| 91 | */ | - | ||||||||||||||||||||||||
| 92 | - | |||||||||||||||||||||||||
| 93 | /*! | - | ||||||||||||||||||||||||
| 94 | \property QState::errorState | - | ||||||||||||||||||||||||
| 95 | - | |||||||||||||||||||||||||
| 96 | \brief the error state of this state | - | ||||||||||||||||||||||||
| 97 | */ | - | ||||||||||||||||||||||||
| 98 | - | |||||||||||||||||||||||||
| 99 | /*! | - | ||||||||||||||||||||||||
| 100 | \property QState::childMode | - | ||||||||||||||||||||||||
| 101 | - | |||||||||||||||||||||||||
| 102 | \brief the child mode of this state | - | ||||||||||||||||||||||||
| 103 | - | |||||||||||||||||||||||||
| 104 | The default value of this property is QState::ExclusiveStates. | - | ||||||||||||||||||||||||
| 105 | */ | - | ||||||||||||||||||||||||
| 106 | - | |||||||||||||||||||||||||
| 107 | /*! | - | ||||||||||||||||||||||||
| 108 | \enum QState::ChildMode | - | ||||||||||||||||||||||||
| 109 | - | |||||||||||||||||||||||||
| 110 | This enum specifies how a state's child states are treated. | - | ||||||||||||||||||||||||
| 111 | - | |||||||||||||||||||||||||
| 112 | \value ExclusiveStates The child states are mutually exclusive and an | - | ||||||||||||||||||||||||
| 113 | initial state must be set by calling QState::setInitialState(). | - | ||||||||||||||||||||||||
| 114 | - | |||||||||||||||||||||||||
| 115 | \value ParallelStates The child states are parallel. When the parent state | - | ||||||||||||||||||||||||
| 116 | is entered, all its child states are entered in parallel. | - | ||||||||||||||||||||||||
| 117 | */ | - | ||||||||||||||||||||||||
| 118 | - | |||||||||||||||||||||||||
| 119 | /*! | - | ||||||||||||||||||||||||
| 120 | \enum QState::RestorePolicy | - | ||||||||||||||||||||||||
| 121 | - | |||||||||||||||||||||||||
| 122 | This enum specifies the restore policy type. The restore policy | - | ||||||||||||||||||||||||
| 123 | takes effect when the machine enters a state which sets one or more | - | ||||||||||||||||||||||||
| 124 | properties. If the restore policy is set to RestoreProperties, | - | ||||||||||||||||||||||||
| 125 | the state machine will save the original value of the property before the | - | ||||||||||||||||||||||||
| 126 | new value is set. | - | ||||||||||||||||||||||||
| 127 | - | |||||||||||||||||||||||||
| 128 | Later, when the machine either enters a state which does not set | - | ||||||||||||||||||||||||
| 129 | a value for the given property, the property will automatically be restored | - | ||||||||||||||||||||||||
| 130 | to its initial value. | - | ||||||||||||||||||||||||
| 131 | - | |||||||||||||||||||||||||
| 132 | Only one initial value will be saved for any given property. If a value for a property has | - | ||||||||||||||||||||||||
| 133 | already been saved by the state machine, it will not be overwritten until the property has been | - | ||||||||||||||||||||||||
| 134 | successfully restored. | - | ||||||||||||||||||||||||
| 135 | - | |||||||||||||||||||||||||
| 136 | \value DontRestoreProperties The state machine should not save the initial values of properties | - | ||||||||||||||||||||||||
| 137 | and restore them later. | - | ||||||||||||||||||||||||
| 138 | \value RestoreProperties The state machine should save the initial values of properties | - | ||||||||||||||||||||||||
| 139 | and restore them later. | - | ||||||||||||||||||||||||
| 140 | - | |||||||||||||||||||||||||
| 141 | \sa QStateMachine::globalRestorePolicy, QState::assignProperty() | - | ||||||||||||||||||||||||
| 142 | */ | - | ||||||||||||||||||||||||
| 143 | - | |||||||||||||||||||||||||
| 144 | QStatePrivate::QStatePrivate() | - | ||||||||||||||||||||||||
| 145 | : QAbstractStatePrivate(StandardState), | - | ||||||||||||||||||||||||
| 146 | errorState(0), initialState(0), childMode(QState::ExclusiveStates), | - | ||||||||||||||||||||||||
| 147 | childStatesListNeedsRefresh(true), transitionsListNeedsRefresh(true) | - | ||||||||||||||||||||||||
| 148 | { | - | ||||||||||||||||||||||||
| 149 | } executed 539 times by 2 tests: end of blockExecuted by:
| 539 | ||||||||||||||||||||||||
| 150 | - | |||||||||||||||||||||||||
| 151 | QStatePrivate::~QStatePrivate() | - | ||||||||||||||||||||||||
| 152 | { | - | ||||||||||||||||||||||||
| 153 | } | - | ||||||||||||||||||||||||
| 154 | - | |||||||||||||||||||||||||
| 155 | void QStatePrivate::emitFinished() | - | ||||||||||||||||||||||||
| 156 | { | - | ||||||||||||||||||||||||
| 157 | Q_Q(QState); | - | ||||||||||||||||||||||||
| 158 | emit q->finished(QState::QPrivateSignal()); | - | ||||||||||||||||||||||||
| 159 | } executed 74 times by 1 test: end of blockExecuted by:
| 74 | ||||||||||||||||||||||||
| 160 | - | |||||||||||||||||||||||||
| 161 | void QStatePrivate::emitPropertiesAssigned() | - | ||||||||||||||||||||||||
| 162 | { | - | ||||||||||||||||||||||||
| 163 | Q_Q(QState); | - | ||||||||||||||||||||||||
| 164 | emit q->propertiesAssigned(QState::QPrivateSignal()); | - | ||||||||||||||||||||||||
| 165 | } executed 1415 times by 2 tests: end of blockExecuted by:
| 1415 | ||||||||||||||||||||||||
| 166 | - | |||||||||||||||||||||||||
| 167 | /*! | - | ||||||||||||||||||||||||
| 168 | Constructs a new state with the given \a parent state. | - | ||||||||||||||||||||||||
| 169 | */ | - | ||||||||||||||||||||||||
| 170 | QState::QState(QState *parent) | - | ||||||||||||||||||||||||
| 171 | : QAbstractState(*new QStatePrivate, parent) | - | ||||||||||||||||||||||||
| 172 | { | - | ||||||||||||||||||||||||
| 173 | } executed 378 times by 2 tests: end of blockExecuted by:
| 378 | ||||||||||||||||||||||||
| 174 | - | |||||||||||||||||||||||||
| 175 | /*! | - | ||||||||||||||||||||||||
| 176 | Constructs a new state with the given \a childMode and the given \a parent | - | ||||||||||||||||||||||||
| 177 | state. | - | ||||||||||||||||||||||||
| 178 | */ | - | ||||||||||||||||||||||||
| 179 | QState::QState(ChildMode childMode, QState *parent) | - | ||||||||||||||||||||||||
| 180 | : QAbstractState(*new QStatePrivate, parent) | - | ||||||||||||||||||||||||
| 181 | { | - | ||||||||||||||||||||||||
| 182 | Q_D(QState); | - | ||||||||||||||||||||||||
| 183 | d->childMode = childMode; | - | ||||||||||||||||||||||||
| 184 | } executed 16 times by 2 tests: end of blockExecuted by:
| 16 | ||||||||||||||||||||||||
| 185 | - | |||||||||||||||||||||||||
| 186 | /*! | - | ||||||||||||||||||||||||
| 187 | \internal | - | ||||||||||||||||||||||||
| 188 | */ | - | ||||||||||||||||||||||||
| 189 | QState::QState(QStatePrivate &dd, QState *parent) | - | ||||||||||||||||||||||||
| 190 | : QAbstractState(dd, parent) | - | ||||||||||||||||||||||||
| 191 | { | - | ||||||||||||||||||||||||
| 192 | } executed 145 times by 2 tests: end of blockExecuted by:
| 145 | ||||||||||||||||||||||||
| 193 | - | |||||||||||||||||||||||||
| 194 | /*! | - | ||||||||||||||||||||||||
| 195 | Destroys this state. | - | ||||||||||||||||||||||||
| 196 | */ | - | ||||||||||||||||||||||||
| 197 | QState::~QState() | - | ||||||||||||||||||||||||
| 198 | { | - | ||||||||||||||||||||||||
| 199 | } | - | ||||||||||||||||||||||||
| 200 | - | |||||||||||||||||||||||||
| 201 | QList<QAbstractState*> QStatePrivate::childStates() const | - | ||||||||||||||||||||||||
| 202 | { | - | ||||||||||||||||||||||||
| 203 | if (childStatesListNeedsRefresh) {
| 548-7014 | ||||||||||||||||||||||||
| 204 | childStatesList.clear(); | - | ||||||||||||||||||||||||
| 205 | QList<QObject*>::const_iterator it; | - | ||||||||||||||||||||||||
| 206 | for (it = children.constBegin(); it != children.constEnd(); ++it) {
| 548-891 | ||||||||||||||||||||||||
| 207 | QAbstractState *s = qobject_cast<QAbstractState*>(*it); | - | ||||||||||||||||||||||||
| 208 | if (!s || qobject_cast<QHistoryState*>(s))
| 8-563 | ||||||||||||||||||||||||
| 209 | continue; executed 336 times by 2 tests: continue;Executed by:
| 336 | ||||||||||||||||||||||||
| 210 | childStatesList.append(s); | - | ||||||||||||||||||||||||
| 211 | } executed 555 times by 2 tests: end of blockExecuted by:
| 555 | ||||||||||||||||||||||||
| 212 | childStatesListNeedsRefresh = false; | - | ||||||||||||||||||||||||
| 213 | } executed 548 times by 2 tests: end of blockExecuted by:
| 548 | ||||||||||||||||||||||||
| 214 | return childStatesList; executed 7562 times by 2 tests: return childStatesList;Executed by:
| 7562 | ||||||||||||||||||||||||
| 215 | } | - | ||||||||||||||||||||||||
| 216 | - | |||||||||||||||||||||||||
| 217 | QList<QHistoryState*> QStatePrivate::historyStates() const | - | ||||||||||||||||||||||||
| 218 | { | - | ||||||||||||||||||||||||
| 219 | QList<QHistoryState*> result; | - | ||||||||||||||||||||||||
| 220 | QList<QObject*>::const_iterator it; | - | ||||||||||||||||||||||||
| 221 | for (it = children.constBegin(); it != children.constEnd(); ++it) {
| 1291-2438 | ||||||||||||||||||||||||
| 222 | QHistoryState *h = qobject_cast<QHistoryState*>(*it); | - | ||||||||||||||||||||||||
| 223 | if (h)
| 9-2429 | ||||||||||||||||||||||||
| 224 | result.append(h); executed 9 times by 2 tests: result.append(h);Executed by:
| 9 | ||||||||||||||||||||||||
| 225 | } executed 2438 times by 2 tests: end of blockExecuted by:
| 2438 | ||||||||||||||||||||||||
| 226 | return result; executed 1291 times by 2 tests: return result;Executed by:
| 1291 | ||||||||||||||||||||||||
| 227 | } | - | ||||||||||||||||||||||||
| 228 | - | |||||||||||||||||||||||||
| 229 | QList<QAbstractTransition*> QStatePrivate::transitions() const | - | ||||||||||||||||||||||||
| 230 | { | - | ||||||||||||||||||||||||
| 231 | if (transitionsListNeedsRefresh) {
| 505-7842 | ||||||||||||||||||||||||
| 232 | transitionsList.clear(); | - | ||||||||||||||||||||||||
| 233 | QList<QObject*>::const_iterator it; | - | ||||||||||||||||||||||||
| 234 | for (it = children.constBegin(); it != children.constEnd(); ++it) {
| 505-808 | ||||||||||||||||||||||||
| 235 | QAbstractTransition *t = qobject_cast<QAbstractTransition*>(*it); | - | ||||||||||||||||||||||||
| 236 | if (t)
| 240-568 | ||||||||||||||||||||||||
| 237 | transitionsList.append(t); executed 240 times by 2 tests: transitionsList.append(t);Executed by:
| 240 | ||||||||||||||||||||||||
| 238 | } executed 808 times by 2 tests: end of blockExecuted by:
| 808 | ||||||||||||||||||||||||
| 239 | transitionsListNeedsRefresh = false; | - | ||||||||||||||||||||||||
| 240 | } executed 505 times by 2 tests: end of blockExecuted by:
| 505 | ||||||||||||||||||||||||
| 241 | return transitionsList; executed 8347 times by 2 tests: return transitionsList;Executed by:
| 8347 | ||||||||||||||||||||||||
| 242 | } | - | ||||||||||||||||||||||||
| 243 | - | |||||||||||||||||||||||||
| 244 | #ifndef QT_NO_PROPERTIES | - | ||||||||||||||||||||||||
| 245 | - | |||||||||||||||||||||||||
| 246 | /*! | - | ||||||||||||||||||||||||
| 247 | Instructs this state to set the property with the given \a name of the given | - | ||||||||||||||||||||||||
| 248 | \a object to the given \a value when the state is entered. | - | ||||||||||||||||||||||||
| 249 | - | |||||||||||||||||||||||||
| 250 | \sa propertiesAssigned() | - | ||||||||||||||||||||||||
| 251 | */ | - | ||||||||||||||||||||||||
| 252 | void QState::assignProperty(QObject *object, const char *name, | - | ||||||||||||||||||||||||
| 253 | const QVariant &value) | - | ||||||||||||||||||||||||
| 254 | { | - | ||||||||||||||||||||||||
| 255 | Q_D(QState); | - | ||||||||||||||||||||||||
| 256 | if (!object) {
| 1-103 | ||||||||||||||||||||||||
| 257 | qWarning("QState::assignProperty: cannot assign property '%s' of null object", name); | - | ||||||||||||||||||||||||
| 258 | return; executed 1 time by 1 test: return;Executed by:
| 1 | ||||||||||||||||||||||||
| 259 | } | - | ||||||||||||||||||||||||
| 260 | for (int i = 0; i < d->propertyAssignments.size(); ++i) {
| 15-101 | ||||||||||||||||||||||||
| 261 | QPropertyAssignment &assn = d->propertyAssignments[i]; | - | ||||||||||||||||||||||||
| 262 | if (assn.hasTarget(object, name)) {
| 2-13 | ||||||||||||||||||||||||
| 263 | assn.value = value; | - | ||||||||||||||||||||||||
| 264 | return; executed 2 times by 2 tests: return;Executed by:
| 2 | ||||||||||||||||||||||||
| 265 | } | - | ||||||||||||||||||||||||
| 266 | } executed 13 times by 1 test: end of blockExecuted by:
| 13 | ||||||||||||||||||||||||
| 267 | d->propertyAssignments.append(QPropertyAssignment(object, name, value)); | - | ||||||||||||||||||||||||
| 268 | } executed 101 times by 2 tests: end of blockExecuted by:
| 101 | ||||||||||||||||||||||||
| 269 | - | |||||||||||||||||||||||||
| 270 | #endif // QT_NO_PROPERTIES | - | ||||||||||||||||||||||||
| 271 | - | |||||||||||||||||||||||||
| 272 | /*! | - | ||||||||||||||||||||||||
| 273 | Returns this state's error state. | - | ||||||||||||||||||||||||
| 274 | - | |||||||||||||||||||||||||
| 275 | \sa QStateMachine::error() | - | ||||||||||||||||||||||||
| 276 | */ | - | ||||||||||||||||||||||||
| 277 | QAbstractState *QState::errorState() const | - | ||||||||||||||||||||||||
| 278 | { | - | ||||||||||||||||||||||||
| 279 | Q_D(const QState); | - | ||||||||||||||||||||||||
| 280 | return d->errorState; executed 44 times by 1 test: return d->errorState;Executed by:
| 44 | ||||||||||||||||||||||||
| 281 | } | - | ||||||||||||||||||||||||
| 282 | - | |||||||||||||||||||||||||
| 283 | /*! | - | ||||||||||||||||||||||||
| 284 | Sets this state's error state to be the given \a state. If the error state | - | ||||||||||||||||||||||||
| 285 | is not set, or if it is set to 0, the state will inherit its parent's error | - | ||||||||||||||||||||||||
| 286 | state recursively. If no error state is set for the state itself or any of | - | ||||||||||||||||||||||||
| 287 | its ancestors, an error will cause the machine to stop executing and an error | - | ||||||||||||||||||||||||
| 288 | will be printed to the console. | - | ||||||||||||||||||||||||
| 289 | */ | - | ||||||||||||||||||||||||
| 290 | void QState::setErrorState(QAbstractState *state) | - | ||||||||||||||||||||||||
| 291 | { | - | ||||||||||||||||||||||||
| 292 | Q_D(QState); | - | ||||||||||||||||||||||||
| 293 | if (state != 0 && qobject_cast<QStateMachine*>(state)) {
| 1-14 | ||||||||||||||||||||||||
| 294 | qWarning("QStateMachine::setErrorState: root state cannot be error state"); | - | ||||||||||||||||||||||||
| 295 | return; executed 1 time by 1 test: return;Executed by:
| 1 | ||||||||||||||||||||||||
| 296 | } | - | ||||||||||||||||||||||||
| 297 | if (state != 0 && (!state->machine() || ((state->machine() != machine()) && !qobject_cast<QStateMachine*>(this)))) {
| 1-13 | ||||||||||||||||||||||||
| 298 | qWarning("QState::setErrorState: error state cannot belong " | - | ||||||||||||||||||||||||
| 299 | "to a different state machine"); | - | ||||||||||||||||||||||||
| 300 | return; executed 2 times by 1 test: return;Executed by:
| 2 | ||||||||||||||||||||||||
| 301 | } | - | ||||||||||||||||||||||||
| 302 | - | |||||||||||||||||||||||||
| 303 | if (d->errorState != state) {
| 1-11 | ||||||||||||||||||||||||
| 304 | d->errorState = state; | - | ||||||||||||||||||||||||
| 305 | emit errorStateChanged(QState::QPrivateSignal()); | - | ||||||||||||||||||||||||
| 306 | } executed 11 times by 1 test: end of blockExecuted by:
| 11 | ||||||||||||||||||||||||
| 307 | } executed 12 times by 1 test: end of blockExecuted by:
| 12 | ||||||||||||||||||||||||
| 308 | - | |||||||||||||||||||||||||
| 309 | /*! | - | ||||||||||||||||||||||||
| 310 | Adds the given \a transition. The transition has this state as the source. | - | ||||||||||||||||||||||||
| 311 | This state takes ownership of the transition. | - | ||||||||||||||||||||||||
| 312 | */ | - | ||||||||||||||||||||||||
| 313 | void QState::addTransition(QAbstractTransition *transition) | - | ||||||||||||||||||||||||
| 314 | { | - | ||||||||||||||||||||||||
| 315 | Q_D(QState); | - | ||||||||||||||||||||||||
| 316 | if (!transition) {
| 1-233 | ||||||||||||||||||||||||
| 317 | qWarning("QState::addTransition: cannot add null transition"); | - | ||||||||||||||||||||||||
| 318 | return ; executed 1 time by 1 test: return ;Executed by:
| 1 | ||||||||||||||||||||||||
| 319 | } | - | ||||||||||||||||||||||||
| 320 | - | |||||||||||||||||||||||||
| 321 | transition->setParent(this); | - | ||||||||||||||||||||||||
| 322 | const QVector<QPointer<QAbstractState> > &targets = QAbstractTransitionPrivate::get(transition)->targetStates; | - | ||||||||||||||||||||||||
| 323 | for (int i = 0; i < targets.size(); ++i) {
| 224-233 | ||||||||||||||||||||||||
| 324 | QAbstractState *t = targets.at(i).data(); | - | ||||||||||||||||||||||||
| 325 | if (!t) {
| 0-224 | ||||||||||||||||||||||||
| 326 | qWarning("QState::addTransition: cannot add transition to null state"); | - | ||||||||||||||||||||||||
| 327 | return ; never executed: return ; | 0 | ||||||||||||||||||||||||
| 328 | } | - | ||||||||||||||||||||||||
| 329 | if ((QAbstractStatePrivate::get(t)->machine() != d->machine())
| 4-220 | ||||||||||||||||||||||||
| 330 | && QAbstractStatePrivate::get(t)->machine() && d->machine()) {
| 0-3 | ||||||||||||||||||||||||
| 331 | qWarning("QState::addTransition: cannot add transition " | - | ||||||||||||||||||||||||
| 332 | "to a state in a different state machine"); | - | ||||||||||||||||||||||||
| 333 | return ; never executed: return ; | 0 | ||||||||||||||||||||||||
| 334 | } | - | ||||||||||||||||||||||||
| 335 | } executed 224 times by 2 tests: end of blockExecuted by:
| 224 | ||||||||||||||||||||||||
| 336 | if (QStateMachine *mach = machine())
| 9-224 | ||||||||||||||||||||||||
| 337 | QStateMachinePrivate::get(mach)->maybeRegisterTransition(transition); executed 224 times by 2 tests: QStateMachinePrivate::get(mach)->maybeRegisterTransition(transition);Executed by:
| 224 | ||||||||||||||||||||||||
| 338 | } executed 233 times by 2 tests: end of blockExecuted by:
| 233 | ||||||||||||||||||||||||
| 339 | - | |||||||||||||||||||||||||
| 340 | /*! | - | ||||||||||||||||||||||||
| 341 | \fn QState::addTransition(const QObject *sender, PointerToMemberFunction signal, | - | ||||||||||||||||||||||||
| 342 | QAbstractState *target); | - | ||||||||||||||||||||||||
| 343 | \since 5.5 | - | ||||||||||||||||||||||||
| 344 | \overload | - | ||||||||||||||||||||||||
| 345 | - | |||||||||||||||||||||||||
| 346 | Adds a transition associated with the given \a signal of the given \a sender | - | ||||||||||||||||||||||||
| 347 | object, and returns the new QSignalTransition object. The transition has | - | ||||||||||||||||||||||||
| 348 | this state as the source, and the given \a target as the target state. | - | ||||||||||||||||||||||||
| 349 | */ | - | ||||||||||||||||||||||||
| 350 | - | |||||||||||||||||||||||||
| 351 | /*! | - | ||||||||||||||||||||||||
| 352 | Adds a transition associated with the given \a signal of the given \a sender | - | ||||||||||||||||||||||||
| 353 | object, and returns the new QSignalTransition object. The transition has | - | ||||||||||||||||||||||||
| 354 | this state as the source, and the given \a target as the target state. | - | ||||||||||||||||||||||||
| 355 | */ | - | ||||||||||||||||||||||||
| 356 | QSignalTransition *QState::addTransition(const QObject *sender, const char *signal, | - | ||||||||||||||||||||||||
| 357 | QAbstractState *target) | - | ||||||||||||||||||||||||
| 358 | { | - | ||||||||||||||||||||||||
| 359 | if (!sender) {
| 1-64 | ||||||||||||||||||||||||
| 360 | qWarning("QState::addTransition: sender cannot be null"); | - | ||||||||||||||||||||||||
| 361 | return 0; executed 1 time by 1 test: return 0;Executed by:
| 1 | ||||||||||||||||||||||||
| 362 | } | - | ||||||||||||||||||||||||
| 363 | if (!signal) {
| 1-63 | ||||||||||||||||||||||||
| 364 | qWarning("QState::addTransition: signal cannot be null"); | - | ||||||||||||||||||||||||
| 365 | return 0; executed 1 time by 1 test: return 0;Executed by:
| 1 | ||||||||||||||||||||||||
| 366 | } | - | ||||||||||||||||||||||||
| 367 | if (!target) {
| 1-62 | ||||||||||||||||||||||||
| 368 | qWarning("QState::addTransition: cannot add transition to null state"); | - | ||||||||||||||||||||||||
| 369 | return 0; executed 1 time by 1 test: return 0;Executed by:
| 1 | ||||||||||||||||||||||||
| 370 | } | - | ||||||||||||||||||||||||
| 371 | int offset = (*signal == '0'+QSIGNAL_CODE) ? 1 : 0;
| 2-60 | ||||||||||||||||||||||||
| 372 | const QMetaObject *meta = sender->metaObject(); | - | ||||||||||||||||||||||||
| 373 | if (meta->indexOfSignal(signal+offset) == -1) {
| 1-61 | ||||||||||||||||||||||||
| 374 | if (meta->indexOfSignal(QMetaObject::normalizedSignature(signal+offset)) == -1) {
| 0-1 | ||||||||||||||||||||||||
| 375 | qWarning("QState::addTransition: no such signal %s::%s", | - | ||||||||||||||||||||||||
| 376 | meta->className(), signal+offset); | - | ||||||||||||||||||||||||
| 377 | return 0; executed 1 time by 1 test: return 0;Executed by:
| 1 | ||||||||||||||||||||||||
| 378 | } | - | ||||||||||||||||||||||||
| 379 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 380 | QSignalTransition *trans = new QSignalTransition(sender, signal); | - | ||||||||||||||||||||||||
| 381 | trans->setTargetState(target); | - | ||||||||||||||||||||||||
| 382 | addTransition(trans); | - | ||||||||||||||||||||||||
| 383 | return trans; executed 61 times by 2 tests: return trans;Executed by:
| 61 | ||||||||||||||||||||||||
| 384 | } | - | ||||||||||||||||||||||||
| 385 | - | |||||||||||||||||||||||||
| 386 | namespace { | - | ||||||||||||||||||||||||
| 387 | - | |||||||||||||||||||||||||
| 388 | // ### Make public? | - | ||||||||||||||||||||||||
| 389 | class UnconditionalTransition : public QAbstractTransition | - | ||||||||||||||||||||||||
| 390 | { | - | ||||||||||||||||||||||||
| 391 | public: | - | ||||||||||||||||||||||||
| 392 | UnconditionalTransition(QAbstractState *target) | - | ||||||||||||||||||||||||
| 393 | : QAbstractTransition() | - | ||||||||||||||||||||||||
| 394 | { setTargetState(target); } executed 16 times by 1 test: end of blockExecuted by:
| 16 | ||||||||||||||||||||||||
| 395 | protected: | - | ||||||||||||||||||||||||
| 396 | void onTransition(QEvent *) Q_DECL_OVERRIDE {} | - | ||||||||||||||||||||||||
| 397 | bool eventTest(QEvent *) Q_DECL_OVERRIDE { return true; } executed 19 times by 1 test: return true;Executed by:
| 19 | ||||||||||||||||||||||||
| 398 | }; | - | ||||||||||||||||||||||||
| 399 | - | |||||||||||||||||||||||||
| 400 | } // namespace | - | ||||||||||||||||||||||||
| 401 | - | |||||||||||||||||||||||||
| 402 | /*! | - | ||||||||||||||||||||||||
| 403 | Adds an unconditional transition from this state to the given \a target | - | ||||||||||||||||||||||||
| 404 | state, and returns then new transition object. | - | ||||||||||||||||||||||||
| 405 | */ | - | ||||||||||||||||||||||||
| 406 | QAbstractTransition *QState::addTransition(QAbstractState *target) | - | ||||||||||||||||||||||||
| 407 | { | - | ||||||||||||||||||||||||
| 408 | if (!target) {
| 1-16 | ||||||||||||||||||||||||
| 409 | qWarning("QState::addTransition: cannot add transition to null state"); | - | ||||||||||||||||||||||||
| 410 | return 0; executed 1 time by 1 test: return 0;Executed by:
| 1 | ||||||||||||||||||||||||
| 411 | } | - | ||||||||||||||||||||||||
| 412 | UnconditionalTransition *trans = new UnconditionalTransition(target); | - | ||||||||||||||||||||||||
| 413 | addTransition(trans); | - | ||||||||||||||||||||||||
| 414 | return trans; executed 16 times by 1 test: return trans;Executed by:
| 16 | ||||||||||||||||||||||||
| 415 | } | - | ||||||||||||||||||||||||
| 416 | - | |||||||||||||||||||||||||
| 417 | /*! | - | ||||||||||||||||||||||||
| 418 | Removes the given \a transition from this state. The state releases | - | ||||||||||||||||||||||||
| 419 | ownership of the transition. | - | ||||||||||||||||||||||||
| 420 | - | |||||||||||||||||||||||||
| 421 | \sa addTransition() | - | ||||||||||||||||||||||||
| 422 | */ | - | ||||||||||||||||||||||||
| 423 | void QState::removeTransition(QAbstractTransition *transition) | - | ||||||||||||||||||||||||
| 424 | { | - | ||||||||||||||||||||||||
| 425 | Q_D(QState); | - | ||||||||||||||||||||||||
| 426 | if (!transition) {
| 1-8 | ||||||||||||||||||||||||
| 427 | qWarning("QState::removeTransition: cannot remove null transition"); | - | ||||||||||||||||||||||||
| 428 | return; executed 1 time by 1 test: return;Executed by:
| 1 | ||||||||||||||||||||||||
| 429 | } | - | ||||||||||||||||||||||||
| 430 | if (transition->sourceState() != this) {
| 1-7 | ||||||||||||||||||||||||
| 431 | qWarning("QState::removeTransition: transition %p's source state (%p)" | - | ||||||||||||||||||||||||
| 432 | " is different from this state (%p)", | - | ||||||||||||||||||||||||
| 433 | transition, transition->sourceState(), this); | - | ||||||||||||||||||||||||
| 434 | return; executed 1 time by 1 test: return;Executed by:
| 1 | ||||||||||||||||||||||||
| 435 | } | - | ||||||||||||||||||||||||
| 436 | QStateMachinePrivate *mach = QStateMachinePrivate::get(d->machine()); | - | ||||||||||||||||||||||||
| 437 | if (mach)
| 2-5 | ||||||||||||||||||||||||
| 438 | mach->unregisterTransition(transition); executed 5 times by 1 test: mach->unregisterTransition(transition);Executed by:
| 5 | ||||||||||||||||||||||||
| 439 | transition->setParent(0); | - | ||||||||||||||||||||||||
| 440 | } executed 7 times by 2 tests: end of blockExecuted by:
| 7 | ||||||||||||||||||||||||
| 441 | - | |||||||||||||||||||||||||
| 442 | /*! | - | ||||||||||||||||||||||||
| 443 | \since 4.7 | - | ||||||||||||||||||||||||
| 444 | - | |||||||||||||||||||||||||
| 445 | Returns this state's outgoing transitions (i.e. transitions where | - | ||||||||||||||||||||||||
| 446 | this state is the \l{QAbstractTransition::sourceState()}{source | - | ||||||||||||||||||||||||
| 447 | state}), or an empty list if this state has no outgoing transitions. | - | ||||||||||||||||||||||||
| 448 | - | |||||||||||||||||||||||||
| 449 | \sa addTransition() | - | ||||||||||||||||||||||||
| 450 | */ | - | ||||||||||||||||||||||||
| 451 | QList<QAbstractTransition*> QState::transitions() const | - | ||||||||||||||||||||||||
| 452 | { | - | ||||||||||||||||||||||||
| 453 | Q_D(const QState); | - | ||||||||||||||||||||||||
| 454 | return d->transitions(); executed 14 times by 1 test: return d->transitions();Executed by:
| 14 | ||||||||||||||||||||||||
| 455 | } | - | ||||||||||||||||||||||||
| 456 | - | |||||||||||||||||||||||||
| 457 | /*! | - | ||||||||||||||||||||||||
| 458 | \reimp | - | ||||||||||||||||||||||||
| 459 | */ | - | ||||||||||||||||||||||||
| 460 | void QState::onEntry(QEvent *event) | - | ||||||||||||||||||||||||
| 461 | { | - | ||||||||||||||||||||||||
| 462 | Q_UNUSED(event); | - | ||||||||||||||||||||||||
| 463 | } executed 412 times by 2 tests: end of blockExecuted by:
| 412 | ||||||||||||||||||||||||
| 464 | - | |||||||||||||||||||||||||
| 465 | /*! | - | ||||||||||||||||||||||||
| 466 | \reimp | - | ||||||||||||||||||||||||
| 467 | */ | - | ||||||||||||||||||||||||
| 468 | void QState::onExit(QEvent *event) | - | ||||||||||||||||||||||||
| 469 | { | - | ||||||||||||||||||||||||
| 470 | Q_UNUSED(event); | - | ||||||||||||||||||||||||
| 471 | } executed 277 times by 2 tests: end of blockExecuted by:
| 277 | ||||||||||||||||||||||||
| 472 | - | |||||||||||||||||||||||||
| 473 | /*! | - | ||||||||||||||||||||||||
| 474 | Returns this state's initial state, or 0 if the state has no initial state. | - | ||||||||||||||||||||||||
| 475 | */ | - | ||||||||||||||||||||||||
| 476 | QAbstractState *QState::initialState() const | - | ||||||||||||||||||||||||
| 477 | { | - | ||||||||||||||||||||||||
| 478 | Q_D(const QState); | - | ||||||||||||||||||||||||
| 479 | return d->initialState; executed 382 times by 2 tests: return d->initialState;Executed by:
| 382 | ||||||||||||||||||||||||
| 480 | } | - | ||||||||||||||||||||||||
| 481 | - | |||||||||||||||||||||||||
| 482 | /*! | - | ||||||||||||||||||||||||
| 483 | Sets this state's initial state to be the given \a state. | - | ||||||||||||||||||||||||
| 484 | \a state has to be a child of this state. | - | ||||||||||||||||||||||||
| 485 | */ | - | ||||||||||||||||||||||||
| 486 | void QState::setInitialState(QAbstractState *state) | - | ||||||||||||||||||||||||
| 487 | { | - | ||||||||||||||||||||||||
| 488 | Q_D(QState); | - | ||||||||||||||||||||||||
| 489 | if (d->childMode == QState::ParallelStates) {
| 2-181 | ||||||||||||||||||||||||
| 490 | qWarning("QState::setInitialState: ignoring attempt to set initial state " | - | ||||||||||||||||||||||||
| 491 | "of parallel state group %p", this); | - | ||||||||||||||||||||||||
| 492 | return; executed 2 times by 2 tests: return;Executed by:
| 2 | ||||||||||||||||||||||||
| 493 | } | - | ||||||||||||||||||||||||
| 494 | if (state && (state->parentState() != this)) {
| 0-181 | ||||||||||||||||||||||||
| 495 | qWarning("QState::setInitialState: state %p is not a child of this state (%p)", | - | ||||||||||||||||||||||||
| 496 | state, this); | - | ||||||||||||||||||||||||
| 497 | return; executed 1 time by 1 test: return;Executed by:
| 1 | ||||||||||||||||||||||||
| 498 | } | - | ||||||||||||||||||||||||
| 499 | if (d->initialState != state) {
| 0-180 | ||||||||||||||||||||||||
| 500 | d->initialState = state; | - | ||||||||||||||||||||||||
| 501 | emit initialStateChanged(QState::QPrivateSignal()); | - | ||||||||||||||||||||||||
| 502 | } executed 180 times by 2 tests: end of blockExecuted by:
| 180 | ||||||||||||||||||||||||
| 503 | } executed 180 times by 2 tests: end of blockExecuted by:
| 180 | ||||||||||||||||||||||||
| 504 | - | |||||||||||||||||||||||||
| 505 | /*! | - | ||||||||||||||||||||||||
| 506 | Returns the child mode of this state. | - | ||||||||||||||||||||||||
| 507 | */ | - | ||||||||||||||||||||||||
| 508 | QState::ChildMode QState::childMode() const | - | ||||||||||||||||||||||||
| 509 | { | - | ||||||||||||||||||||||||
| 510 | Q_D(const QState); | - | ||||||||||||||||||||||||
| 511 | return d->childMode; executed 390 times by 2 tests: return d->childMode;Executed by:
| 390 | ||||||||||||||||||||||||
| 512 | } | - | ||||||||||||||||||||||||
| 513 | - | |||||||||||||||||||||||||
| 514 | /*! | - | ||||||||||||||||||||||||
| 515 | Sets the child \a mode of this state. | - | ||||||||||||||||||||||||
| 516 | */ | - | ||||||||||||||||||||||||
| 517 | void QState::setChildMode(ChildMode mode) | - | ||||||||||||||||||||||||
| 518 | { | - | ||||||||||||||||||||||||
| 519 | Q_D(QState); | - | ||||||||||||||||||||||||
| 520 | - | |||||||||||||||||||||||||
| 521 | if (mode == QState::ParallelStates && d->initialState) {
| 1-5 | ||||||||||||||||||||||||
| 522 | qWarning("QState::setChildMode: setting the child-mode of state %p to " | - | ||||||||||||||||||||||||
| 523 | "parallel removes the initial state", this); | - | ||||||||||||||||||||||||
| 524 | d->initialState = Q_NULLPTR; | - | ||||||||||||||||||||||||
| 525 | emit initialStateChanged(QState::QPrivateSignal()); | - | ||||||||||||||||||||||||
| 526 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||||||||||||||||||||
| 527 | - | |||||||||||||||||||||||||
| 528 | if (d->childMode != mode) {
| 0-6 | ||||||||||||||||||||||||
| 529 | d->childMode = mode; | - | ||||||||||||||||||||||||
| 530 | emit childModeChanged(QState::QPrivateSignal()); | - | ||||||||||||||||||||||||
| 531 | } executed 6 times by 2 tests: end of blockExecuted by:
| 6 | ||||||||||||||||||||||||
| 532 | } executed 6 times by 2 tests: end of blockExecuted by:
| 6 | ||||||||||||||||||||||||
| 533 | - | |||||||||||||||||||||||||
| 534 | /*! | - | ||||||||||||||||||||||||
| 535 | \reimp | - | ||||||||||||||||||||||||
| 536 | */ | - | ||||||||||||||||||||||||
| 537 | bool QState::event(QEvent *e) | - | ||||||||||||||||||||||||
| 538 | { | - | ||||||||||||||||||||||||
| 539 | Q_D(QState); | - | ||||||||||||||||||||||||
| 540 | if ((e->type() == QEvent::ChildAdded) || (e->type() == QEvent::ChildRemoved)) {
| 75-787 | ||||||||||||||||||||||||
| 541 | d->childStatesListNeedsRefresh = true; | - | ||||||||||||||||||||||||
| 542 | d->transitionsListNeedsRefresh = true; | - | ||||||||||||||||||||||||
| 543 | if ((e->type() == QEvent::ChildRemoved) && (static_cast<QChildEvent *>(e)->child() == d->initialState))
| 18-787 | ||||||||||||||||||||||||
| 544 | d->initialState = 0; executed 18 times by 1 test: d->initialState = 0;Executed by:
| 18 | ||||||||||||||||||||||||
| 545 | } executed 862 times by 2 tests: end of blockExecuted by:
| 862 | ||||||||||||||||||||||||
| 546 | return QAbstractState::event(e); executed 1156 times by 2 tests: return QAbstractState::event(e);Executed by:
| 1156 | ||||||||||||||||||||||||
| 547 | } | - | ||||||||||||||||||||||||
| 548 | - | |||||||||||||||||||||||||
| 549 | /*! | - | ||||||||||||||||||||||||
| 550 | \fn QState::finished() | - | ||||||||||||||||||||||||
| 551 | - | |||||||||||||||||||||||||
| 552 | This signal is emitted when a final child state of this state is entered. | - | ||||||||||||||||||||||||
| 553 | - | |||||||||||||||||||||||||
| 554 | \sa QFinalState | - | ||||||||||||||||||||||||
| 555 | */ | - | ||||||||||||||||||||||||
| 556 | - | |||||||||||||||||||||||||
| 557 | /*! | - | ||||||||||||||||||||||||
| 558 | \fn QState::propertiesAssigned() | - | ||||||||||||||||||||||||
| 559 | - | |||||||||||||||||||||||||
| 560 | This signal is emitted when all properties have been assigned their final value. If the state | - | ||||||||||||||||||||||||
| 561 | assigns a value to one or more properties for which an animation exists (either set on the | - | ||||||||||||||||||||||||
| 562 | transition or as a default animation on the state machine), then the signal will not be emitted | - | ||||||||||||||||||||||||
| 563 | until all such animations have finished playing. | - | ||||||||||||||||||||||||
| 564 | - | |||||||||||||||||||||||||
| 565 | If there are no relevant animations, or no property assignments defined for the state, then | - | ||||||||||||||||||||||||
| 566 | the signal will be emitted immediately before the state is entered. | - | ||||||||||||||||||||||||
| 567 | - | |||||||||||||||||||||||||
| 568 | \sa QState::assignProperty(), QAbstractTransition::addAnimation() | - | ||||||||||||||||||||||||
| 569 | */ | - | ||||||||||||||||||||||||
| 570 | - | |||||||||||||||||||||||||
| 571 | /*! | - | ||||||||||||||||||||||||
| 572 | \fn QState::childModeChanged() | - | ||||||||||||||||||||||||
| 573 | \since 5.4 | - | ||||||||||||||||||||||||
| 574 | - | |||||||||||||||||||||||||
| 575 | This signal is emitted when the childMode property is changed. | - | ||||||||||||||||||||||||
| 576 | - | |||||||||||||||||||||||||
| 577 | \sa QState::childMode | - | ||||||||||||||||||||||||
| 578 | */ | - | ||||||||||||||||||||||||
| 579 | - | |||||||||||||||||||||||||
| 580 | /*! | - | ||||||||||||||||||||||||
| 581 | \fn QState::initialStateChanged() | - | ||||||||||||||||||||||||
| 582 | \since 5.4 | - | ||||||||||||||||||||||||
| 583 | - | |||||||||||||||||||||||||
| 584 | This signal is emitted when the initialState property is changed. | - | ||||||||||||||||||||||||
| 585 | - | |||||||||||||||||||||||||
| 586 | \sa QState::initialState | - | ||||||||||||||||||||||||
| 587 | */ | - | ||||||||||||||||||||||||
| 588 | - | |||||||||||||||||||||||||
| 589 | /*! | - | ||||||||||||||||||||||||
| 590 | \fn QState::errorStateChanged() | - | ||||||||||||||||||||||||
| 591 | \since 5.4 | - | ||||||||||||||||||||||||
| 592 | - | |||||||||||||||||||||||||
| 593 | This signal is emitted when the errorState property is changed. | - | ||||||||||||||||||||||||
| 594 | - | |||||||||||||||||||||||||
| 595 | \sa QState::errorState | - | ||||||||||||||||||||||||
| 596 | */ | - | ||||||||||||||||||||||||
| 597 | - | |||||||||||||||||||||||||
| 598 | QT_END_NAMESPACE | - | ||||||||||||||||||||||||
| 599 | - | |||||||||||||||||||||||||
| 600 | #endif //QT_NO_STATEMACHINE | - | ||||||||||||||||||||||||
| Source code | Switch to Preprocessed file |