summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-05-25 10:02:36 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-05-25 10:02:36 (GMT)
commitc75d55cfbca0a34ae3ecc171178a8c1f0ae76039 (patch)
tree47fa5037676c85d3ff6f5dc4d61605be0422ff2b
parent9edac0287250ff6da9b6998412dba6a432899518 (diff)
downloadQt-c75d55cfbca0a34ae3ecc171178a8c1f0ae76039.zip
Qt-c75d55cfbca0a34ae3ecc171178a8c1f0ae76039.tar.gz
Qt-c75d55cfbca0a34ae3ecc171178a8c1f0ae76039.tar.bz2
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.
-rw-r--r--src/corelib/global/qfeatures.txt8
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp13
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<QAbstractTransition*> &tr
const QList<QAbstractState*> &exitedStates,
const QList<QAbstractState*> &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<QAbstractState*, QList<QPropertyAssignment> > propertyAssignmentsForState;
@@ -851,7 +853,11 @@ void QStateMachinePrivate::applyProperties(const QList<QAbstractTransition*> &tr
// Emit polished signal for entered states that have no animated properties.
for (int i = 0; i < enteredStates.size(); ++i) {
QState *s = qobject_cast<QState*>(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<int> &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<QByteArray> parameterTypes = method.parameterTypes();