summaryrefslogtreecommitdiffstats
path: root/tests/auto/qstatemachine
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headersAkseli Salovaara2015-03-311-13/+13
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I7e3e96183e073877b46bc8071b2ccae19e69426b Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Updated year in copyright headerKai Koehne2014-03-261-1/+1
| | | | | | | | | | | | | | | | | | find . -path '*/3rdparty/*' -prune -o -type f -print | xargs -L1 sed -i -E 's/Copyright(.*) 2013 Digia/Copyright\1 2014 Digia/g' Manually patched files: demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp src/3rdparty/s60/eiksoftkeyimage.h tools/qdoc3/test/qt-project.qdocconf tests/auto/qsharedpointer/nontracked.h tests/auto/qsharedpointer/nontracked.cpp Change-Id: I3f9074923b4d6bd4666258ab04f01476cc6e901c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | 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-291-24/+24
| | | | | | | | 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-011-2/+2
| | | | | | | | | | | | | - 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>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | 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>
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Make sure QStateMachine stops when it's told toKent Hansen2011-01-261-0/+68
| | | | | | | | | | | | | | | | | 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
* Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | Reviewed-by: Trust Me
* tst_qstatemachine.cpp: fix compilation with Sun StudioOlivier Goffart2010-09-281-1/+1
| | | | Task-number: QTBUG-12995
* Reset history states when (re)starting state machineKent Hansen2010-03-221-0/+59
| | | | | | | | 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-061-1/+1
| | | | Reviewed-by: Trust Me
* Export QStateMachine::WrappedEvent and QStateMachine::SignalEventEskil Abrahamsen Blomfeldt2009-11-181-0/+8
| | | | | | | | 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
* Add test for QEventTransition when filtering on a QApplication instanceEskil Abrahamsen Blomfeldt2009-11-051-0/+31
| | | | | | Test for 8ec037effce7f515fffed6b05c011e385fb52593. Reviewed-by: Gunnar
* Rename QState::polished() signal to "propertiesAssigned"Eskil Abrahamsen Blomfeldt2009-11-031-17/+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-031-14/+28
| | | | | | | | | 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-031-4/+4
| | | | | | | 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-031-5/+5
| | | | | | | The name "animated" is consistent with naming in Qt otherwise, as in QTreeView::animated and QMainWindow::animated. Reviewed-by: Kent Hansen
* Cache a state's parent stateKent Hansen2009-10-291-0/+9
| | | | | | | | | | | | | 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
* Make QStateMachine event posting functions thread-safeKent Hansen2009-10-291-0/+48
| | | | | | | | 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
* Test that we gracefully handle event posting after the state machine is stoppedKent Hansen2009-10-291-0/+17
| | | | | The internal slot _q_process() should never be called if the machine is not in the Running state.
* statemachine: implement cloning of a whole bunch more GUI eventsKent Hansen2009-10-061-0/+27
| | | | | Now using QEventTransition with almost any type of event will actually work, instead of causing an assert.
* Make sure delayed events are cancelled when a state machine haltsKent Hansen2009-09-291-0/+39
| | | | | | | 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-291-5/+44
| | | | | | | | | | | | 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-291-0/+33
| | | | | | | | 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
* add a test for custom QEventTransitionKent Hansen2009-09-281-3/+74
| | | | | Test that the event has the right attributes. Also improve the custom QSignalTransition test to cover all attributes.
* Make QSignalEvent and QWrappedEvent inner classes of QStateMachineKent Hansen2009-09-281-2/+2
| | | | | | | | | 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
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Update tech preview license header for files that are new in 4.6.Jason McDonald2009-08-311-13/+13
| | | | Reviewed-by: Trust Me
* Q_ASSERT failure in QStateMachinePrivate::handleTransitionSignal.Gabriel de Dietrich2009-08-281-0/+42
| | | | | | | | | | | | | | The signal index actually emitted was different from the signal index registered. This was due to recent changes in the meta-object protocol, where new indexes are being created (cloned) for signals with default parameters. When registering the transition signal, we now look for the original (non cloned) signal index. The transition keeps track of the user-specified signal index, and sets it when calling onTransition. Reviewed-by: Kent Hansen Reviewed-by: Olivier Goffart Task-number: 260403
* Merge commit 'qt/master'Jason Barron2009-08-211-8/+8
|\
| * rename QEventTransition::eventObject to eventSourceKent Hansen2009-08-211-8/+8
| | | | | | | | | | | | eventObject was a horrible name. The documentation already used the term "event source", so let's call it that. Agreed with Eskil.
* | Merge commit 'qt/master'Jason Barron2009-08-131-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/samplebuffers/glwidget.cpp src/corelib/io/qfsfileengine_unix.cpp src/corelib/kernel/qobject.cpp src/corelib/tools/qsharedpointer.cpp src/gui/gui.pro tests/auto/qhttp/tst_qhttp.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp
| * Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Fixed qstatemachine autotest compilaton for Symbian OS.Janne Anttila2009-08-111-8/+8
| | | | | | | | | | | | | | | | Apparently Nokia X86 compiler is not able to use templated qCompare when given arguments have different different type but same base class. This error should be isolated and reported to Nokia X86 team. See task: 259508
* | Merge commit 'origin/master'Jason Barron2009-08-061-91/+91
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/qfilesystemmodel/qfilesystemmodel.pro tests/auto/qfontdialog/tst_qfontdialog.cpp tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp tests/auto/qsqldriver/qsqldriver.pro tests/auto/qsqlquery/qsqlquery.pro tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro tests/auto/qsqltablemodel/qsqltablemodel.pro tests/auto/qsqlthread/qsqlthread.pro tests/auto/qstatemachine/tst_qstatemachine.cpp tests/auto/qtcpsocket/tst_qtcpsocket.cpp
| * Trailing whitespace and tab/space fixes for auto testsJanne Anttila2009-08-041-91/+91
| |
* | remove constructors that are not usefulKent Hansen2009-08-031-17/+13
| | | | | | | | | | | | | | The constructors that take a list of target states produce hard-to-read code, and they're rarely useful in practice since 99% of transitions take a single target state; so it's better to enforce that setTarget{State,States}() be used instead.
* | add private goToState() function to state machineKent Hansen2009-07-311-0/+41
| | | | | | | | Needed for Declarative UI integration.
* | Make QStateMachine inherit QStateKent Hansen2009-07-221-234/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the need for a "root state" in the machine; or rather, the machine _is_ the root state. User code can now pass in a QStateMachine directly to the QState constructor, instead of machine->rootState(). This also means we could get rid of the "proxying" from the machine to the root state for things like properties (initialState et al), finished() signal and auto-reparenting of states (the ChildAdded event hack). A fun little side-effect of this change is that it's now possible to embed state machines within state machines. We can't think of a good use case yet where you would rather embed a stand-alone state machine (with its own event processing etc.) rather than having just a regular nested state, but it's neat and it works. Reviewed-by: Eskil Abrahamsen Blomfeldt
* | Fix memleaks in the autotestsKent Hansen2009-07-211-1/+14
| |
* | add autotest for adding transition from state machine's rootKent Hansen2009-07-211-0/+10
| | | | | | | | | | | | It's not supported because the root state has no ancestor, which is a requirement for the state machine's transition selection algorithm.
* | Disable private unit tests when Qt is configured withoutRohan McGovern2009-07-091-0/+2
|/ | | | | | | | | | | | -developer-build, part 2. Some autotests use private (unexported) code, either because they're testing private classes or because that's the easiest way to test the public classes. Configuring Qt with `-developer-build' is needed for these tests. This commit fixes the tests so configuring without `-developer-build' only builds the tests which strictly use public API.
* Remove default error stateEskil Abrahamsen Blomfeldt2009-06-231-38/+48
| | | | | | | | | Having an implicit default error state in the graph which the user has not added is unintuitive and ugly. Rather than have a default error state, we stop execution of the machine and print an error message when the machine has run-time errors. If a user wishes to prevent errors from stopping the machine, you can set one or more error states explicitly.
* Fix tests on WindowsEskil Abrahamsen Blomfeldt2009-06-231-16/+16
| | | | | | Formatting of pointers in sprintf() is platform dependent. Use QString::sprintf() instead to make sure warnings match the actual warnings emitted.
* perform normalization of signatures for signal transitionsKent Hansen2009-06-221-0/+25
| | | | Make state->addTransition(foo, SIGNAL( bar( ) ), ...) work.
* add test for parallel root state (which currently isn't supported)Kent Hansen2009-06-221-0/+24
|
* Autotests: fix compile issue on hpuxThierry Bastian2009-06-181-5/+5
|
* Autotests: fix compile issues on HPUXThierry Bastian2009-06-171-16/+16
|
* perform all property assignments of initial state that's nestedKent Hansen2009-06-171-11/+19
| | | | | | If the machine's initial state is nested, a set of states will be entered, and we need to do the property assignments of all of them.