diff options
Diffstat (limited to 'src/corelib/statemachine/qsignaltransition.cpp')
-rw-r--r-- | src/corelib/statemachine/qsignaltransition.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/corelib/statemachine/qsignaltransition.cpp b/src/corelib/statemachine/qsignaltransition.cpp index ac2aac8..2fc6a58 100644 --- a/src/corelib/statemachine/qsignaltransition.cpp +++ b/src/corelib/statemachine/qsignaltransition.cpp @@ -249,17 +249,15 @@ void QSignalTransitionPrivate::callOnTransition(QEvent *e) { Q_Q(QSignalTransition); - QSignalEvent *se = static_cast<QSignalEvent *>(e); - int savedSignalIndex; if (e->type() == QEvent::Signal) { - savedSignalIndex = se->m_signalIndex; + QSignalEvent *se = static_cast<QSignalEvent *>(e); + int savedSignalIndex = se->m_signalIndex; se->m_signalIndex = originalSignalIndex; - } - - q->onTransition(e); - - if (e->type() == QEvent::Signal) + q->onTransition(e); se->m_signalIndex = savedSignalIndex; + } else { + q->onTransition(e); + } } QT_END_NAMESPACE |