From c593492d1678a2ec08f1bfffcb572459b3bc6c00 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Wed, 26 Sep 2018 15:39:35 +0200 Subject: Modernize the "animation" feature Change-Id: Ibc164b3df3cf87db569ef4813de458a9067b7f7d Reviewed-by: Edward Welbourne Reviewed-by: Oswald Buddenhagen --- src/corelib/statemachine/qstatemachine.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/corelib/statemachine/qstatemachine.cpp') diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 24734f99ac..7388d496d9 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -59,7 +59,7 @@ #include "qeventtransition_p.h" #endif -#ifndef QT_NO_ANIMATION +#if QT_CONFIG(animation) #include "qpropertyanimation.h" #include "qanimationgroup.h" #include @@ -167,7 +167,7 @@ QT_BEGIN_NAMESPACE \sa start(), stop(), started(), stopped(), runningChanged() */ -#ifndef QT_NO_ANIMATION +#if QT_CONFIG(animation) /*! \property QStateMachine::animated @@ -401,7 +401,7 @@ QStateMachinePrivate::QStateMachinePrivate() error = QStateMachine::NoError; globalRestorePolicy = QState::DontRestoreProperties; signalEventGenerator = 0; -#ifndef QT_NO_ANIMATION +#if QT_CONFIG(animation) animated = true; #endif } @@ -700,12 +700,12 @@ void QStateMachinePrivate::microstep(QEvent *event, const QList selectedAnimations = selectAnimations(enabledTransitions); #endif enterStates(event, exitedStates, enteredStates, statesForDefaultEntry, assignmentsForEnteredStates -#ifndef QT_NO_ANIMATION +#if QT_CONFIG(animation) , selectedAnimations #endif ); @@ -827,7 +827,7 @@ void QStateMachinePrivate::exitStates(QEvent *event, const QListcallOnExit(event); -#ifndef QT_NO_ANIMATION +#if QT_CONFIG(animation) terminateActiveAnimations(s, assignmentsForEnteredStates); #else Q_UNUSED(assignmentsForEnteredStates); @@ -942,7 +942,7 @@ void QStateMachinePrivate::enterStates(QEvent *event, const QList &statesToEnter_sorted, const QSet &statesForDefaultEntry, QHash > &propertyAssignmentsForState -#ifndef QT_NO_ANIMATION +#if QT_CONFIG(animation) , const QList &selectedAnimations #endif ) @@ -958,7 +958,7 @@ void QStateMachinePrivate::enterStates(QEvent *event, const QList pendingRestorables; QHash > assignmentsForEnteredStates = computePropertyAssignments(enteredStates, pendingRestorables); -#ifndef QT_NO_ANIMATION +#if QT_CONFIG(animation) QList selectedAnimations = selectAnimations(transitions); #endif // enterStates() will set stopProcessingReason to Finished if a final @@ -1822,7 +1822,7 @@ void QStateMachinePrivate::_q_start() stopProcessingReason = EventQueueEmpty; enterStates(&nullEvent, exitedStates, enteredStates, statesForDefaultEntry, assignmentsForEnteredStates -#ifndef QT_NO_ANIMATION +#if QT_CONFIG(animation) , selectedAnimations #endif ); @@ -2957,7 +2957,7 @@ void QStateMachine::onExit(QEvent *event) QState::onExit(event); } -#ifndef QT_NO_ANIMATION +#if QT_CONFIG(animation) /*! Returns whether animations are enabled for this state machine. @@ -3004,7 +3004,7 @@ void QStateMachine::removeDefaultAnimation(QAbstractAnimation *animation) d->defaultAnimations.removeAll(animation); } -#endif // QT_NO_ANIMATION +#endif // animation // Begin moc-generated code -- modify carefully (check "HAND EDIT" parts)! -- cgit v1.2.3