diff options
Diffstat (limited to 'src/corelib/statemachine/qabstractstate.cpp')
-rw-r--r-- | src/corelib/statemachine/qabstractstate.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/corelib/statemachine/qabstractstate.cpp b/src/corelib/statemachine/qabstractstate.cpp index cf67cdd..ec5332f 100644 --- a/src/corelib/statemachine/qabstractstate.cpp +++ b/src/corelib/statemachine/qabstractstate.cpp @@ -78,8 +78,8 @@ QT_BEGIN_NAMESPACE function to perform custom processing when the state is exited. */ -QAbstractStatePrivate::QAbstractStatePrivate() - : parentState(0) +QAbstractStatePrivate::QAbstractStatePrivate(StateType type) + : stateType(type), isMachine(false), parentState(0) { } @@ -88,6 +88,11 @@ QAbstractStatePrivate *QAbstractStatePrivate::get(QAbstractState *q) return q->d_func(); } +const QAbstractStatePrivate *QAbstractStatePrivate::get(const QAbstractState *q) +{ + return q->d_func(); +} + QStateMachine *QAbstractStatePrivate::machine() const { QObject *par = parent; @@ -127,7 +132,7 @@ void QAbstractStatePrivate::emitExited() Constructs a new state with the given \a parent state. */ QAbstractState::QAbstractState(QState *parent) - : QObject(*new QAbstractStatePrivate, parent) + : QObject(*new QAbstractStatePrivate(QAbstractStatePrivate::AbstractState), parent) { } |