From c75d55cfbca0a34ae3ecc171178a8c1f0ae76039 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Mon, 25 May 2009 12:02:36 +0200 Subject: Added QT_NO_ANIMATION to qfeatures Now you can opt it out to save disk space (for embedded). Also tested it and fixed code in state machine. --- src/corelib/global/qfeatures.txt | 8 ++++++++ src/corelib/statemachine/qstatemachine.cpp | 13 +++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt index 5d63e46..23ec7b0 100644 --- a/src/corelib/global/qfeatures.txt +++ b/src/corelib/global/qfeatures.txt @@ -1157,6 +1157,14 @@ Requires: PROPERTIES Name: Accessibility SeeAlso: ??? +Feature: ANIMATION +Description: Provides a framework for animations. +Section: Utilities +Requires: PROPERTIES +Name: Animation +SeeAlso: ??? + + # SVG Feature: SVG diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 309c8be..757584a 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -678,9 +678,11 @@ void QStateMachinePrivate::applyProperties(const QList &tr const QList &exitedStates, const QList &enteredStates) { - Q_Q(QStateMachine); #ifdef QT_NO_ANIMATION Q_UNUSED(transitionList); + Q_UNUSED(exitedStates); +#else + Q_Q(QStateMachine); #endif // Process the property assignments of the entered states. QHash > propertyAssignmentsForState; @@ -851,7 +853,11 @@ void QStateMachinePrivate::applyProperties(const QList &tr // Emit polished signal for entered states that have no animated properties. for (int i = 0; i < enteredStates.size(); ++i) { QState *s = qobject_cast(enteredStates.at(i)); - if (s && !animationsForState.contains(s)) + if (s +#ifndef QT_NO_ANIMATION + && !animationsForState.contains(s) +#endif + ) QStatePrivate::get(s)->emitPolished(); } } @@ -1442,8 +1448,7 @@ void QStateMachinePrivate::unregisterEventTransition(QEventTransition *transitio void QStateMachinePrivate::handleTransitionSignal(const QObject *sender, int signalIndex, void **argv) { - const QVector &connectedSignalIndexes = connections[sender]; - Q_ASSERT(connectedSignalIndexes.at(signalIndex) != 0); + Q_ASSERT(connections[sender].at(signalIndex) != 0); const QMetaObject *meta = sender->metaObject(); QMetaMethod method = meta->method(signalIndex); QList parameterTypes = method.parameterTypes(); -- cgit v0.12