summaryrefslogtreecommitdiffstats
path: root/src/corelib/statemachine
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1324-24/+24
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2924-576/+576
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-0124-48/+48
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Various Qt documentation bug fixes (wk 42)artoka2012-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-18101 Task-number: QTBUG-8673 Task-number: QTBUG-14194 Task-number: QTBUG-9109 Task-number: QTBUG-9466 Task-number: QTBUG-8323 Task-number: QTBUG-7924 Task-number: QTBUG-20355 Task-number: QTBUG-19367 Task-number: QTBUG-21295 Task-number: QTBUG-14554 Task-number: QTBUG-8331 Task-number: QTBUG-8329 Task-number: QTBUG-8786 Task-number: QTBUG-8787 Change-Id: I4b6403df4a0078fa385abbfab5b6c3a94f175295 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-1124-24/+24
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Removed duplicate link from QFinalState documentation.jaanttil2011-09-271-1/+1
| | | | | | | Task-number: QTBUG-14553 Merge-request: 1402 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-1324-408/+408
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-03-311-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/example-slideswitch.qdoc doc/src/development/qmake-manual.qdoc doc/src/snippets/code/doc_src_qmake-manual.pro doc/src/snippets/code/doc_src_qtscript.qdoc src/corelib/animation/qabstractanimation.cpp src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qdir/qdir.pro tests/auto/qsslsocket/tst_qsslsocket.cpp tools/qdoc3/doc/qdoc-manual.qdocconf
| * Doc: Small update to QHistoryState::setDefaultState()Geir Vattekar2011-02-181-0/+3
| | | | | | | | Task-number: QTBUG-17522
* | Make sure QStateMachine stops when it's told toKent Hansen2011-01-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If QStateMachine::stop() was called by an event test or while transitioning to another state, the state machine could end up in an inconsistent internal state (stop==true, but the stopped() signal was not emitted). This also caused the machine to behave incorrectly if it was then restarted (it would immediately stop upon receiving the first event). Solution: Move the stop-handling after the event processing loop, so that it always takes precedence over other possible reasons for exiting the loop (event queues exhausted, final state entered). Task-number: QTBUG-16463 Reviewed-by: Eskil Abrahamsen Blomfeldt
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-1724-24/+24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-1124-24/+24
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2010-11-021-1/+1
|\|
| * Fix compilation on AIX 5.3 with gccKent Hansen2010-11-011-1/+1
| | | | | | | | | | | | | | | | | | "error: invalid pointer to bit-field `QAbstractStatePrivate::isMachine'" The extra qualification is not needed anyway, so remove it. Task-number: QTBUG-14491 Reviewed-by: Eskil Abrahamsen Blomfeldt
* | Compile fix for mingwPrasanth Ullattil2010-10-071-2/+4
| | | | | | | | Reviewed-by: Olivier Goffart
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-09-211-0/+3
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.h src/declarative/graphicsitems/qdeclarativeflickable.cpp src/declarative/graphicsitems/qdeclarativeflickable_p_p.h src/declarative/util/qdeclarativelistmodel.cpp
| * Documented onEntry() and onExit() functions.Jerome Pasion2010-08-171-0/+3
| | | | | | | | | | Reviewed by: David Boddie Task: QTBUG-9984
* | Remove the use of deprecated qFindChild(ren)Olivier Goffart2010-08-061-5/+5
|/ | | | | | | | | | | | | Test directory untouched. This just apply those regexp: git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(this,* */f\\1(/'" qFindChild git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(&\([^\(),]*\),* */\\2.f\\1(/'" qFindChild git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(\([^\(),]*()\),* */\\2->f\\1(/'" qFindChild git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(\([^\(),]*\):\([^\(),]*\),* */(\\2:\\3)->f\\1(/'" qFindChild git grep -O"sed -i 's/qF\(indChildr*e*n*<[^>]*>\)(\([^\(),]*\),* */\\2->f\\1(/'" qFindChild Rev-by: dev mailing list
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7Martin Jones2010-03-262-1/+20
|\ | | | | | | | | Conflicts: src/declarative/graphicsitems/qdeclarativeitem.cpp
| * Add a function to get the transitions available from a stateKent Hansen2010-03-222-1/+20
| | | | | | | | | | | | | | | | For introspection purposes. It's nicer than having to qobject_cast the state's children(). Task-number: QTBUG-7741 Reviewed-by: Eskil Abrahamsen Blomfeldt
* | Reset history states when (re)starting state machineKent Hansen2010-03-222-0/+13
|/ | | | | | | | State saved in QHistoryState should not be persistent between state machine starts/stops. Task-number: QTBUG-8842 Reviewed-by: Eskil Abrahamsen Blomfeldt
* Update copyright year to 2010Jason McDonald2010-01-0724-24/+24
| | | | Reviewed-by: Trust Me
* doc: Removed a const from a declaration in the example.Martin Smith2010-01-041-1/+1
| | | | Task-number: QTBUG-7092
* Export QStateMachine::WrappedEvent and QStateMachine::SignalEventEskil Abrahamsen Blomfeldt2009-11-181-2/+2
| | | | | | | | These two classes were missing exports. Since the accessors are inline, the bug would only be visible when someone tried to call the constructors of the classes. Reviewed-by: Kent Hansen
* Don't crash in QStateMachine when event transition listens toEskil Abrahamsen Blomfeldt2009-11-051-3/+2
| | | | | | | | | | QApplication instance We can't assert on actually watching the watched object, since we may have installed an event filter on QApplication::instance(), in which case we will filter events for all objects. Reviewed-by: Gunnar
* Merge branch 'statemachine-api-changes' into 4.6Eskil Abrahamsen Blomfeldt2009-11-036-36/+41
|\ | | | | | | | | | | Conflicts: doc/src/frameworks-technologies/statemachine.qdoc src/corelib/statemachine/qstatemachine.cpp
| * Rename QState::polished() signal to "propertiesAssigned"Eskil Abrahamsen Blomfeldt2009-11-034-11/+17
| | | | | | | | | | | | | | | | | | "Polished" was never a very descriptive word, and it already has a meaning attached in the QStyle API. Additionally, "propertiesAssigned" has the benefit of giving the relation to the assignProperty() function as part of the name. Reviewed-by: Kent Hansen
| * Remove return type of QState::addTransition(QAbstractTransition*)Eskil Abrahamsen Blomfeldt2009-11-032-9/+8
| | | | | | | | | | | | | | | | | | Returning the input argument in a function can lead to confusion and serves no purpose here. Instead, we'll mirror the API from QMenu::addAction() overloads, where the overload that takes a preconstructed object has a void return type. Reviewed-by: Kent Hansen
| * Change name of DoNotRestoreProperties enum to DontRestorePropertiesEskil Abrahamsen Blomfeldt2009-11-032-5/+5
| | | | | | | | | | | | | | Using the abbreviated "Dont" is consistent with other negated enum names in Qt. Reviewed-by: Kent Hansen
| * Change name of QStateMachine::animationsEnabled property to "animated"Eskil Abrahamsen Blomfeldt2009-11-033-11/+11
| | | | | | | | | | | | | | The name "animated" is consistent with naming in Qt otherwise, as in QTreeView::animated and QMainWindow::animated. Reviewed-by: Kent Hansen
* | Introduce internal StateType to avoid excessive qobject_castsKent Hansen2009-10-307-25/+80
|/ | | | | | | | | | The state machine algorithm frequently needs to know what type a state is, e.g. if it is atomic, final or a history state. We were using qobject_cast() to determine this, but that function is expensive. This commit introduces an internal StateType to be able to differentiate between the different types of state. This vastly improves performance. Reviewed-by: Eskil Abrahamsen Blomfeldt
* Cache a state's parent stateKent Hansen2009-10-292-2/+8
| | | | | | | | | | | | | QAbstractState::parentState() is called heavily by the state machine algorithm. The parent state is obtained by qobject_cast'ing QObject::parent(). qobject_cast() is expensive. This commit introduces caching of the result in order to improve performance. We expect that the cache won't be invalidated much since the parent-child relationship of states usually doesn't change after the state machine is started. Reviewed-by: Eskil Abrahamsen Blomfeldt
* doc: Remove \internal tag from QStateMachine::configuration()Kent Hansen2009-10-291-2/+0
| | | | | | | | This function is useful for debugging, if nothing else, and has been requested by users. We also refer to it in one of our blog posts, so there's little point in trying to hide it any longer. Reviewed-by: Eskil Abrahamsen Blomfeldt
* Make QStateMachine event posting functions thread-safeKent Hansen2009-10-292-17/+83
| | | | | | | | By popular demand on the Qt Labs blog. This makes it possible to readily use QStateMachine with e.g. worker threads that post events to the machine. Reviewed-by: Eskil Abrahamsen Blomfeldt
* Cache QState's child statesKent Hansen2009-10-292-10/+17
| | | | | | | | | | | | | This is the same type of optimization as that done for transitions in commit 5d8dcd57cd13fdd9c8643fa3bdda9f197a4351ff. The idea is to avoid calling qobject_cast() because it's very expensive. Obtaining child states needs to be as fast as possible because it's in the critical path of the state machine algorithm; it's called by a ton of internal functions, like isCompound(), isAtomic(), isInFinalState(). It's also called heavily for parallel state groups. Reviewed-by: Eskil Abrahamsen Blomfeldt
* QStateMachine::event() should call QState::event()Kent Hansen2009-10-291-1/+1
| | | | | | Since QStateMachine inherits QState now. Reviewed-by: Eskil Abrahamsen Blomfeldt
* Greatly improve the performance of obtaining a state's transitionsKent Hansen2009-10-282-8/+17
| | | | | | | | | | | | | | | | | | | Transitions are children of their source state. We use QObject::children() and qobject_cast() each child to a QAbstractTransition to see if it is indeed a transition. However, calling qobject_cast() is very expensive. This commit introduces a cached list of transitions. The list is invalidated after a child object has been added or removed. In the typical case we expect the object hierarchy to remain fairly constant once the state machine has been started (states, child states and transitions are usually "static"), in other words the cached list is not likely to be invalidated much. Obtaining a state's transitions needs to be as fast as possible because it's in the critical path of the state machine algorithm. Reviewed-by: Eskil Abrahamsen Blomfeldt
* add missing includeKent Hansen2009-10-061-0/+1
| | | | Necessary since the SignalEvent class was moved to qstatemachine.h.
* Add prefix to statemachine-specific event typesKent Hansen2009-10-023-5/+5
| | | | | | "Signal" and "Wrapped" is too generic; prefix with StateMachine. Reviewed-by: Eskil Abrahamsen Blomfeldt
* Make sure delayed events are cancelled when a state machine haltsKent Hansen2009-09-292-0/+21
| | | | | | | Otherwise the events might creep into the event loop if the state machine is restarted. Reviewed-by: Eskil Abrahamsen Blomfeldt
* Introduce state machine event priority, make it possible to cancel eventsKent Hansen2009-09-292-20/+89
| | | | | | | | | | | | The priority specifies whether the event should be posted to what the SCXML spec refers to as the "external" (NormalPriority) queue, or the "internal" (HighPriority) queue. Delayed events are now posted through a separate function, postDelayedEvent(). That function returns an id that can be passed to cancelDelayedEvent() to cancel it. Reviewed-by: Eskil Abrahamsen Blomfeldt
* Do synchronous processing of events in state machine if possibleKent Hansen2009-09-292-13/+40
| | | | | | | | Avoid delayed scheduling in the cases where there's no need to delay it (e.g. when the state machine intercepts a signal or event). Task-number: QTBUG-4491 Reviewed-by: Eskil Abrahamsen Blomfeldt
* doc: Describe the semantics of targetless state machine transitionsKent Hansen2009-09-291-0/+4
|
* Make QSignalEvent and QWrappedEvent inner classes of QStateMachineKent Hansen2009-09-287-207/+72
| | | | | | | | | Those two classes are specific to the state machine framework, but their names were so generic that we felt they were polluting the Q-namespace. They are now QStateMachine::SignalEvent and QStateMachine::WrappedEvent. Reviewed-by: Eskil Abrahamsen Blomfeldt
* Replacing QPointer usage with QWeakPointer in statemachineLeonardo Sobral Cunha2009-09-253-7/+7
| | | | Reviewed-by: thierry
* Update license headers again.Jason McDonald2009-09-0926-104/+104
| | | | Reviewed-by: Trust Me
* Doc: Added a note that a state machine requires a running event loop.David Boddie2009-09-071-31/+11
| | | | Reviewed-by: Trust Me
* fix warnings on mingwThierry Bastian2009-09-021-8/+6
|
* Update tech preview license header for files that are new in 4.6.Jason McDonald2009-08-3125-325/+325
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp