diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-06-04 16:05:19 +0200 |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-06-04 16:05:19 +0200 |
commit | 5c23548a0a60ca25631cff2fa7f296fdbd15b78a (patch) | |
tree | 0ea2c16452c89eed738a459f004afcfadac9d298 | |
parent | fcd1059f05be695b78f42c02446b17ab143ce9c0 (diff) | |
download | qt4-tools-5c23548a0a60ca25631cff2fa7f296fdbd15b78a.tar.gz |
add QT_NO_STATEMACHINE define so state machine can be compiled out
Reviewed-by: Thierry Bastian
29 files changed, 134 insertions, 0 deletions
diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt index 23ec7b0ec3..9408a5b214 100644 --- a/src/corelib/global/qfeatures.txt +++ b/src/corelib/global/qfeatures.txt @@ -1164,6 +1164,13 @@ Requires: PROPERTIES Name: Animation SeeAlso: ??? +Feature: STATEMACHINE +Description: Provides hierarchical finite state machines. +Section: Utilities +Requires: PROPERTIES +Name: State machine +SeeAlso: ??? + # SVG diff --git a/src/corelib/statemachine/qabstractstate.cpp b/src/corelib/statemachine/qabstractstate.cpp index 942722fc50..b9a50a2372 100644 --- a/src/corelib/statemachine/qabstractstate.cpp +++ b/src/corelib/statemachine/qabstractstate.cpp @@ -40,6 +40,9 @@ ****************************************************************************/ #include "qabstractstate.h" + +#ifndef QT_NO_STATEMACHINE + #include "qabstractstate_p.h" #include "qstate.h" #include "qstate_p.h" @@ -200,3 +203,5 @@ bool QAbstractState::event(QEvent *e) } QT_END_NAMESPACE + +#endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qabstractstate.h b/src/corelib/statemachine/qabstractstate.h index d0ebb52384..ee55541c96 100644 --- a/src/corelib/statemachine/qabstractstate.h +++ b/src/corelib/statemachine/qabstractstate.h @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE QT_MODULE(Core) +#ifndef QT_NO_STATEMACHINE + class QState; class QStateMachine; @@ -83,6 +85,8 @@ private: Q_DECLARE_PRIVATE(QAbstractState) }; +#endif //QT_NO_STATEMACHINE + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/statemachine/qabstracttransition.cpp b/src/corelib/statemachine/qabstracttransition.cpp index dfcafeb932..f582b8caef 100644 --- a/src/corelib/statemachine/qabstracttransition.cpp +++ b/src/corelib/statemachine/qabstracttransition.cpp @@ -40,6 +40,9 @@ ****************************************************************************/ #include "qabstracttransition.h" + +#ifndef QT_NO_STATEMACHINE + #include "qabstracttransition_p.h" #include "qabstractstate.h" #include "qstate.h" @@ -340,3 +343,5 @@ bool QAbstractTransition::event(QEvent *e) } QT_END_NAMESPACE + +#endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qabstracttransition.h b/src/corelib/statemachine/qabstracttransition.h index c63d55a34f..a1a62c94e1 100644 --- a/src/corelib/statemachine/qabstracttransition.h +++ b/src/corelib/statemachine/qabstracttransition.h @@ -52,6 +52,8 @@ QT_BEGIN_NAMESPACE QT_MODULE(Core) +#ifndef QT_NO_STATEMACHINE + class QEvent; class QAbstractState; class QState; @@ -104,6 +106,8 @@ private: Q_DECLARE_PRIVATE(QAbstractTransition) }; +#endif //QT_NO_STATEMACHINE + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/statemachine/qeventtransition.cpp b/src/corelib/statemachine/qeventtransition.cpp index f25d821bd3..4c40256eab 100644 --- a/src/corelib/statemachine/qeventtransition.cpp +++ b/src/corelib/statemachine/qeventtransition.cpp @@ -40,6 +40,9 @@ ****************************************************************************/ #include "qeventtransition.h" + +#ifndef QT_NO_STATEMACHINE + #include "qeventtransition_p.h" #include "qwrappedevent.h" #include "qstate.h" @@ -283,3 +286,5 @@ bool QEventTransition::event(QEvent *e) } QT_END_NAMESPACE + +#endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qeventtransition.h b/src/corelib/statemachine/qeventtransition.h index 3530bdd0e4..40ffecf648 100644 --- a/src/corelib/statemachine/qeventtransition.h +++ b/src/corelib/statemachine/qeventtransition.h @@ -51,6 +51,8 @@ QT_BEGIN_NAMESPACE QT_MODULE(Core) +#ifndef QT_NO_STATEMACHINE + class QEventTransitionPrivate; class Q_CORE_EXPORT QEventTransition : public QAbstractTransition { @@ -89,6 +91,8 @@ private: Q_DECLARE_PRIVATE(QEventTransition) }; +#endif //QT_NO_STATEMACHINE + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/statemachine/qfinalstate.cpp b/src/corelib/statemachine/qfinalstate.cpp index 0980336c9f..0eb531f40c 100644 --- a/src/corelib/statemachine/qfinalstate.cpp +++ b/src/corelib/statemachine/qfinalstate.cpp @@ -40,6 +40,9 @@ ****************************************************************************/ #include "qfinalstate.h" + +#ifndef QT_NO_STATEMACHINE + #include "qabstractstate_p.h" QT_BEGIN_NAMESPACE @@ -132,3 +135,5 @@ bool QFinalState::event(QEvent *e) } QT_END_NAMESPACE + +#endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qfinalstate.h b/src/corelib/statemachine/qfinalstate.h index fa68394b08..865f333bde 100644 --- a/src/corelib/statemachine/qfinalstate.h +++ b/src/corelib/statemachine/qfinalstate.h @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE QT_MODULE(Core) +#ifndef QT_NO_STATEMACHINE + class QFinalStatePrivate; class Q_CORE_EXPORT QFinalState : public QAbstractState { @@ -69,6 +71,8 @@ private: Q_DECLARE_PRIVATE(QFinalState) }; +#endif //QT_NO_STATEMACHINE + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/statemachine/qhistorystate.cpp b/src/corelib/statemachine/qhistorystate.cpp index 517faa8452..4304da316e 100644 --- a/src/corelib/statemachine/qhistorystate.cpp +++ b/src/corelib/statemachine/qhistorystate.cpp @@ -40,6 +40,9 @@ ****************************************************************************/ #include "qhistorystate.h" + +#ifndef QT_NO_STATEMACHINE + #include "qhistorystate_p.h" QT_BEGIN_NAMESPACE @@ -221,3 +224,5 @@ bool QHistoryState::event(QEvent *e) } QT_END_NAMESPACE + +#endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qhistorystate.h b/src/corelib/statemachine/qhistorystate.h index a0682bda0a..eee43d1dc6 100644 --- a/src/corelib/statemachine/qhistorystate.h +++ b/src/corelib/statemachine/qhistorystate.h @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE QT_MODULE(Core) +#ifndef QT_NO_STATEMACHINE + class QHistoryStatePrivate; class Q_CORE_EXPORT QHistoryState : public QAbstractState { @@ -84,6 +86,8 @@ private: Q_DECLARE_PRIVATE(QHistoryState) }; +#endif //QT_NO_STATEMACHINE + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/statemachine/qsignalevent.h b/src/corelib/statemachine/qsignalevent.h index 8221f68343..79d105335a 100644 --- a/src/corelib/statemachine/qsignalevent.h +++ b/src/corelib/statemachine/qsignalevent.h @@ -53,6 +53,8 @@ QT_BEGIN_NAMESPACE QT_MODULE(Core) +#ifndef QT_NO_STATEMACHINE + class Q_CORE_EXPORT QSignalEvent : public QEvent { public: @@ -70,6 +72,8 @@ private: QList<QVariant> m_arguments; }; +#endif //QT_NO_STATEMACHINE + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/statemachine/qsignaltransition.cpp b/src/corelib/statemachine/qsignaltransition.cpp index 9ffcb9cd7e..2e150a7c9b 100644 --- a/src/corelib/statemachine/qsignaltransition.cpp +++ b/src/corelib/statemachine/qsignaltransition.cpp @@ -40,6 +40,9 @@ ****************************************************************************/ #include "qsignaltransition.h" + +#ifndef QT_NO_STATEMACHINE + #include "qsignaltransition_p.h" #include "qsignalevent.h" #include "qstate.h" @@ -258,3 +261,5 @@ bool QSignalTransition::event(QEvent *e) } QT_END_NAMESPACE + +#endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qsignaltransition.h b/src/corelib/statemachine/qsignaltransition.h index b485785711..02b1de900f 100644 --- a/src/corelib/statemachine/qsignaltransition.h +++ b/src/corelib/statemachine/qsignaltransition.h @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE QT_MODULE(Core) +#ifndef QT_NO_STATEMACHINE + class QSignalTransitionPrivate; class Q_CORE_EXPORT QSignalTransition : public QAbstractTransition { @@ -82,6 +84,8 @@ private: Q_DECLARE_PRIVATE(QSignalTransition) }; +#endif //QT_NO_STATEMACHINE + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/statemachine/qstate.cpp b/src/corelib/statemachine/qstate.cpp index ebb0b47124..5dd56c0e41 100644 --- a/src/corelib/statemachine/qstate.cpp +++ b/src/corelib/statemachine/qstate.cpp @@ -40,6 +40,9 @@ ****************************************************************************/ #include "qstate.h" + +#ifndef QT_NO_STATEMACHINE + #include "qstate_p.h" #include "qhistorystate.h" #include "qhistorystate_p.h" @@ -482,3 +485,5 @@ bool QState::event(QEvent *e) */ QT_END_NAMESPACE + +#endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qstate.h b/src/corelib/statemachine/qstate.h index 6729c69e38..c98bb64a42 100644 --- a/src/corelib/statemachine/qstate.h +++ b/src/corelib/statemachine/qstate.h @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE QT_MODULE(Core) +#ifndef QT_NO_STATEMACHINE + class QAbstractTransition; class QSignalTransition; @@ -106,6 +108,8 @@ private: Q_DECLARE_PRIVATE(QState) }; +#endif //QT_NO_STATEMACHINE + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index d5f6b76371..64b33ace8c 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -40,6 +40,9 @@ ****************************************************************************/ #include "qstatemachine.h" + +#ifndef QT_NO_STATEMACHINE + #include "qstate.h" #include "qstate_p.h" #include "qstatemachine_p.h" @@ -2207,3 +2210,5 @@ QWrappedEvent::~QWrappedEvent() QT_END_NAMESPACE #include "moc_qstatemachine.cpp" + +#endif //QT_NO_STATEMACHINE diff --git a/src/corelib/statemachine/qstatemachine.h b/src/corelib/statemachine/qstatemachine.h index 2a98a9ad97..0b3c7283b8 100644 --- a/src/corelib/statemachine/qstatemachine.h +++ b/src/corelib/statemachine/qstatemachine.h @@ -54,6 +54,8 @@ QT_BEGIN_NAMESPACE QT_MODULE(Core) +#ifndef QT_NO_STATEMACHINE + class QEvent; class QAbstractState; class QState; @@ -159,6 +161,8 @@ private: #endif }; +#endif //QT_NO_STATEMACHINE + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/statemachine/qwrappedevent.h b/src/corelib/statemachine/qwrappedevent.h index b01c60888a..cb4261b45a 100644 --- a/src/corelib/statemachine/qwrappedevent.h +++ b/src/corelib/statemachine/qwrappedevent.h @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE QT_MODULE(Core) +#ifndef QT_NO_STATEMACHINE + class QObject; class Q_CORE_EXPORT QWrappedEvent : public QEvent @@ -69,6 +71,8 @@ private: Q_DISABLE_COPY(QWrappedEvent) }; +#endif //QT_NO_STATEMACHINE + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index a9424dba23..f2a3498148 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -838,9 +838,11 @@ void QApplicationPrivate::initialize() // trigger registering of QVariant's GUI types extern int qRegisterGuiVariant(); qRegisterGuiVariant(); +#ifndef QT_NO_STATEMACHINE // trigger registering of QStateMachine's GUI types extern int qRegisterGuiStateMachine(); qRegisterGuiStateMachine(); +#endif is_app_running = true; // no longer starting up @@ -1062,9 +1064,11 @@ QApplication::~QApplication() QApplicationPrivate::fade_tooltip = false; QApplicationPrivate::widgetCount = false; +#ifndef QT_NO_STATEMACHINE // trigger unregistering of QStateMachine's GUI types extern int qUnregisterGuiStateMachine(); qUnregisterGuiStateMachine(); +#endif // trigger unregistering of QVariant's GUI types extern int qUnregisterGuiVariant(); qUnregisterGuiVariant(); diff --git a/src/gui/statemachine/qbasickeyeventtransition.cpp b/src/gui/statemachine/qbasickeyeventtransition.cpp index f7f1eb6eeb..61362b2526 100644 --- a/src/gui/statemachine/qbasickeyeventtransition.cpp +++ b/src/gui/statemachine/qbasickeyeventtransition.cpp @@ -40,6 +40,9 @@ ****************************************************************************/ #include "qbasickeyeventtransition_p.h" + +#ifndef QT_NO_STATEMACHINE + #include <QtGui/qevent.h> #include <qdebug.h> #include <private/qabstracttransition_p.h> @@ -201,3 +204,5 @@ void QBasicKeyEventTransition::onTransition(QEvent *) } QT_END_NAMESPACE + +#endif //QT_NO_STATEMACHINE diff --git a/src/gui/statemachine/qbasickeyeventtransition_p.h b/src/gui/statemachine/qbasickeyeventtransition_p.h index 39fa6adc04..aef1f991fa 100644 --- a/src/gui/statemachine/qbasickeyeventtransition_p.h +++ b/src/gui/statemachine/qbasickeyeventtransition_p.h @@ -54,6 +54,9 @@ // #include <QtCore/qabstracttransition.h> + +#ifndef QT_NO_STATEMACHINE + #include <QtGui/qevent.h> QT_BEGIN_NAMESPACE @@ -90,4 +93,6 @@ private: QT_END_NAMESPACE +#endif //QT_NO_STATEMACHINE + #endif diff --git a/src/gui/statemachine/qbasicmouseeventtransition.cpp b/src/gui/statemachine/qbasicmouseeventtransition.cpp index 20dd792d17..0304e28ca0 100644 --- a/src/gui/statemachine/qbasicmouseeventtransition.cpp +++ b/src/gui/statemachine/qbasicmouseeventtransition.cpp @@ -40,6 +40,9 @@ ****************************************************************************/ #include "qbasicmouseeventtransition_p.h" + +#ifndef QT_NO_STATEMACHINE + #include <QtGui/qevent.h> #include <QtGui/qpainterpath.h> #include <qdebug.h> @@ -206,3 +209,5 @@ void QBasicMouseEventTransition::onTransition(QEvent *) } QT_END_NAMESPACE + +#endif //QT_NO_STATEMACHINE diff --git a/src/gui/statemachine/qbasicmouseeventtransition_p.h b/src/gui/statemachine/qbasicmouseeventtransition_p.h index 3161844873..ed0022ac5f 100644 --- a/src/gui/statemachine/qbasicmouseeventtransition_p.h +++ b/src/gui/statemachine/qbasicmouseeventtransition_p.h @@ -54,6 +54,9 @@ // #include <QtCore/qabstracttransition.h> + +#ifndef QT_NO_STATEMACHINE + #include <QtGui/qevent.h> QT_BEGIN_NAMESPACE @@ -93,4 +96,6 @@ private: QT_END_NAMESPACE +#endif //QT_NO_STATEMACHINE + #endif diff --git a/src/gui/statemachine/qguistatemachine.cpp b/src/gui/statemachine/qguistatemachine.cpp index 612e43e100..69155a9fe4 100644 --- a/src/gui/statemachine/qguistatemachine.cpp +++ b/src/gui/statemachine/qguistatemachine.cpp @@ -40,6 +40,9 @@ ****************************************************************************/ #include <QtCore/qstatemachine.h> + +#ifndef QT_NO_STATEMACHINE + #include <private/qstatemachine_p.h> #include <QtGui/qevent.h> #include <QtGui/qgraphicssceneevent.h> @@ -557,3 +560,5 @@ int qUnregisterGuiStateMachine() Q_DESTRUCTOR_FUNCTION(qUnregisterGuiStateMachine) QT_END_NAMESPACE + +#endif //QT_NO_STATEMACHINE diff --git a/src/gui/statemachine/qkeyeventtransition.cpp b/src/gui/statemachine/qkeyeventtransition.cpp index f8037119dd..fee9f817f0 100644 --- a/src/gui/statemachine/qkeyeventtransition.cpp +++ b/src/gui/statemachine/qkeyeventtransition.cpp @@ -40,6 +40,9 @@ ****************************************************************************/ #include "qkeyeventtransition.h" + +#ifndef QT_NO_STATEMACHINE + #include "qbasickeyeventtransition_p.h" #include <QtCore/qwrappedevent.h> #include <private/qeventtransition_p.h> @@ -184,3 +187,5 @@ void QKeyEventTransition::onTransition(QEvent *event) } QT_END_NAMESPACE + +#endif //QT_NO_STATEMACHINE diff --git a/src/gui/statemachine/qkeyeventtransition.h b/src/gui/statemachine/qkeyeventtransition.h index d9c7760880..c9e06f5702 100644 --- a/src/gui/statemachine/qkeyeventtransition.h +++ b/src/gui/statemachine/qkeyeventtransition.h @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE QT_MODULE(Gui) +#ifndef QT_NO_STATEMACHINE + class QKeyEventTransitionPrivate; class Q_GUI_EXPORT QKeyEventTransition : public QEventTransition { @@ -80,6 +82,8 @@ private: Q_DECLARE_PRIVATE(QKeyEventTransition) }; +#endif //QT_NO_STATEMACHINE + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/gui/statemachine/qmouseeventtransition.cpp b/src/gui/statemachine/qmouseeventtransition.cpp index e4e18eb3b4..6ae3d36742 100644 --- a/src/gui/statemachine/qmouseeventtransition.cpp +++ b/src/gui/statemachine/qmouseeventtransition.cpp @@ -40,6 +40,9 @@ ****************************************************************************/ #include "qmouseeventtransition.h" + +#ifndef QT_NO_STATEMACHINE + #include "qbasicmouseeventtransition_p.h" #include <QtCore/qwrappedevent.h> #include <QtGui/qpainterpath.h> @@ -214,3 +217,5 @@ void QMouseEventTransition::onTransition(QEvent *event) } QT_END_NAMESPACE + +#endif //QT_NO_STATEMACHINE diff --git a/src/gui/statemachine/qmouseeventtransition.h b/src/gui/statemachine/qmouseeventtransition.h index 9c7af5b510..557b2c3c87 100644 --- a/src/gui/statemachine/qmouseeventtransition.h +++ b/src/gui/statemachine/qmouseeventtransition.h @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE QT_MODULE(Gui) +#ifndef QT_NO_STATEMACHINE + class QMouseEventTransitionPrivate; class QPainterPath; class Q_GUI_EXPORT QMouseEventTransition : public QEventTransition @@ -85,6 +87,8 @@ private: Q_DECLARE_PRIVATE(QMouseEventTransition) }; +#endif //QT_NO_STATEMACHINE + QT_END_NAMESPACE QT_END_HEADER |