summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/statemachine/qstatemachine
Commit message (Collapse)AuthorAgeFilesLines
* Move QStateMachine from QtCore to QtScxmlKarsten Heimrich2020-08-243-6893/+0
| | | | | | Task-number: QTBUG-80316 Change-Id: I2ee74110fd55e94d86321d3b3dc5bb8297424ed4 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* CMake: Regenerate subdir test projectsAlexandru Croitor2020-07-091-0/+20
| | | | | | | | And generate a few more test projects that were missing. Change-Id: I5df51106549aa5ae09bc3c42360e14b143719547 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Use QList instead of QVector in corelib testsJarek Kobus2020-07-071-3/+3
| | | | | | Task-number: QTBUG-84469 Change-Id: Ic80fde5517aed363f17d0da55cadcc958c3c8895 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* std::chrono overload added to QStateMachine::postDelayedEvent()Dmitriy Purgin2020-02-101-0/+162
| | | | | | | | | Some Qt classes already accept std::chrono durations in their methods (see, for example, QTimer). The proposed change adds an overload with std::chrono::milliseconds to QStateMachine::postDelayedEvent(). Change-Id: I360fd2bb54fedc7415e9ec17e096095be3604d41 Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
* QStateMachine: Don't scream at the userRobert Loehning2019-10-241-4/+4
| | | | | | Change-Id: I171606d10985bc7338b0f24ceb142fc0d88e7932 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* test: migrate QStateMachine test to QRegularExpressionSamuel Gaist2019-06-101-2/+2
| | | | | | | | | | | | | | | | | This is part of the migration of qtbase from QRexExp to QRegularExpression. Task-number: QTBUG-72587 Change-Id: If5d5a9d1c3f094d554110ada3b259f4d863e7121 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStateMachine: handle parallel child mode for state machinesErik Verbruggen2019-05-161-4/+10
| | | | | | | | | | | | | | | | Setting the childMode property to ParallelStates will result in an invalid state machine. This is never checked (worse, we explicitly allow it and have a constructor to set it), but it results in findLCCA failing, which then results in a failing assert or crash. This fix in this patch is to handle this case separately. The proper fix would be to remove completely the ability to set the childMode on a QStateMachine, but that will have to wait until Qt6. Fixes: QTBUG-49975 Change-Id: I43692309c4d438ee1a9bc55fa4f65f8bce8e0a59 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Stabilize tst_QStateMachine::dontProcessSlotsWhenMachineIsNotRunningMilian Wolff2019-03-221-4/+4
| | | | | | | | | | | | | | | | | The test is flaky which was uncovered by the upcoming QTimer::singleShot optimization patches: When the Emitter's thread is started and executes the timout functor before the state machine is started, then the state machine will never see the emitSignalWithNoArg signal and thus never transition to the final state and finish. This patch ensures that the code in the background thread is only run after the state machine was started to fix this flakyness. Change-Id: I6f91a2420165662ece75e550a6d73fe098137d4c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
* tst_QStateMachine: Don't use unconditional waitsv5.11.0-beta3Kari Oikarinen2018-04-041-2/+5
| | | | | | | | Instead use QSignalSpy to wait directly for the expected events. Change-Id: I319302ea7177fe690b5d885347c505454904518e Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Fix crash in tst_QStateMachine::dontProcessSlotsWhenMachineIsNotRunningKari Oikarinen2018-02-141-3/+6
| | | | | | | | | | | | | | | | | | | | | The test sometimes ended up with: QThread: Destroyed while thread is still running Received a fatal error. This was because as a member variable of the local struct the QThread object was sometimes destructed before the signal connection quitting it was handled. Fix that by making sure that the thread is finished before finishing the test. Also moved connecting to the state machine's signal to be before starting the machine. Because the counting of QStateMachine::finished signal could hit 1 after the first signal is emitted and the test could pass without the code working, check that both of the signals have been emitted. Task-number: QTBUG-66372 Task-number: QTBUG-66216 Change-Id: If14141e39f37541032ddd8c6471daf40a77b0469 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-021-0/+32
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * Fix assert when emitting a signal from a different threadJesus Fernandez2017-12-141-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | If a signal is emitted more than once in a multithreaded application the QSignalEventGenerator::execute function asserts in the check for a valid signal index. It happens after abandoning the state and all the connections are disconnected. If we have pending signal to be processed the QObject::sender() won't be able to resolve the sender object. Task-number: QTBUG-61463 Change-Id: I9d4b7266c6dddc9ff2e7453b05a6989876ccb332 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-1/+1
|/ | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/devLiang Qi2016-01-261-0/+29
|\
| * Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-211-0/+29
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice_p.h src/corelib/kernel/qvariant_p.h src/corelib/tools/qsimd.cpp src/gui/kernel/qguiapplication.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
| | * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-191-0/+29
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/common/atomic64/atomic64.cpp configure src/3rdparty/forkfd/forkfd.c src/corelib/io/forkfd_qt.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tools/configure/configureapp.cpp Change-Id: Ic6168d82e51a0ef1862c3a63bee6722e8f138414
| | | * QStateMachine: fix ignore high-priority events.Masaru Ueki2016-01-051-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a high-priority event is posted in overrided 'QStateMachine::beginSelectTransitions', the event may be remained in event queue, and be not dispatched until another event posted. Change-Id: Ifda288d9c00ac7985e426b9cc02bda382ebaac35 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | | | Updated license headersJani Heikkinen2016-01-211-17/+12
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Add PointerToMemberFunction for ctor of QSignalTransitionAndré Klitzing2015-12-081-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][State Machine] Added constructor overload that takes a pointer-to-member for the QSignalTransition. Change-Id: I80ac6e16d0edf7d2ab09882b6f6db4cbd73364e1 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-041-0/+66
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/ptrsize.test configure src/corelib/global/qnamespace.h src/network/socket/qabstractsocket.cpp tests/auto/other/networkselftest/networkselftest.pro Change-Id: Ic78abb4a34f9068567cea876861d4220f5a07672
| * | Add a test case for conflicting transitionsJarek Kobus2015-10-301-0/+66
| | | | | | | | | | | | | | | | | | | | | This tests a fix: ff3ba1045e8322caa0293b05aecbff4411963ea2 Change-Id: I623b4e270c7eba1af0c4c023e83b6eea50fb45a1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Tests: Remove CONFIG += parallel_test.Friedemann Kleint2015-09-051-1/+0
| | | | | | | | | | | | | | | | | | | | | The keyword no longer has a meaning for the new CI. Change-Id: Ibcea4c7a82fb7f982cf4569fdff19f82066543d1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Remove QT_DISABLE_DEPRECATED_BEFORE=0 from tests not using deprecated API.Friedemann Kleint2015-09-011-1/+0
| | | | | | | | | | | | | | | Change-Id: I1955320e7639760b4383a53f37a506c8055933ef Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | | tests/corelib: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-08-191-7/+7
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Tests from corelib/tools were omitted in this change. Change-Id: I4c8786d33fcf429d11b2b624c7cd89c28cadb518 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QStateMachine: add defaultTransition in QHistoryStateErik Verbruggen2015-07-231-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The history state had the limitation that it was hard (or impossible) to use when more than one default state had to be entered. For example, using it in a parallel state was impossible without ending up in an infinite loop. This patch changes the QHistoryState to only have an initial transition, and the state selection algorithm is changed accordingly. It also brings QStateMachine closer to the SCXML standard. The existing defaultState is implemented on top of the defaultTransition: when used, a new transition, with the default state as its target, is set as the defaultTransition. Task-number: QTBUG-46703 Change-Id: Ifbb44e4f0f26b72e365af4c94753e4483f9850e7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | tst_QStateMachine: replace inefficient QLists with QVectorMarc Mutz2015-06-171-3/+3
|/ | | | | | | | It's just a test, but it's in the way of automatic tracking of inefficient QLists. Change-Id: I2dcfd81c9e208dab57bb256d7c276ad5303f196c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QStateMachine: empty the whole internal queue before external queueErik Verbruggen2015-05-191-0/+39
| | | | | | | | | | If the internal queue contained multiple events, but the first one did not select any transitions, the external event queue would be checked before the remaining events in the internal queue. Change-Id: I1a7f49afdefaaf2b4330bf13b079b61344385ea0 Task-number: QTBUG-46059 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QStateMachine: Fix transition ordering.Erik Verbruggen2015-05-071-0/+64
| | | | | | | | | | | | When there are conflicting transitions, a transition that is nested deeper (i.e. more specific) has priority. If two transitions have the same nesting level, the one that comes first in the document order gets priority. Before this patch, only the document order was considered. Change-Id: I58f188c270cabe2c386a783ceef7a0a955105425 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QStateMachine: add internal transitions.Erik Verbruggen2015-05-041-0/+44
| | | | | | | | | | | | | The behavior of "external" and "internal" transitions is identical, except in the case of a transition whose source state is a compound state and whose target(s) is a descendant of the source. In such a case, an internal transition will not exit and re-enter its source state, while an external one will. [ChangeLog][State machine] Added support for internal transitions. Change-Id: I9efb1e7368ee52aa2544eb84709a00ae3d5350d3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QStateMachine: cache expensive calculations.Erik Verbruggen2015-05-041-12/+15
| | | | | | | | | | | | | | | | | | As nothing changes in the state machine when selecting transitions for events and then calculating the exit- and entry-sets, some calculations can be cached. The exit set for a transition was calculated multiple times. First in removeConflictingTransitions, where the two loops would each calculate them multiple times. Then secondly in microstep(), which would calculate the exit set for all transitions. Transition selection, exit set calculation, and entry set calculation all calculate the transition domain and effective target states for transitions. Change-Id: I217328a73db2f71e371eb5f60a0c7b222303f0ca Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QStateMachine: remove conflicting transitions after selection.Erik Verbruggen2015-04-101-10/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After selecting all (enabled) transitions for a microstep, filter out any conflicting transition. The actual conflict resulution is done by ordering the transitions in order of the states that selected them. For example: if an event would trigger two transitions in a parallel state where one would exit that state and the other would not, this filtering prevents the state machine from selecting both states (as this case is an invalid state of the whole machine). This also fixes the exit set calculation for parallel states when one of its substates is exited and subsequently re-entered in the same transition. Previously, the parallel state was not exited, and subsequent re-entry was ignored (because it was still active). Now it is correctly exited and re-entered. A side-effect of the transition ordering mentioned above is it also fixes the non-deterministic behavior of which of the conflicting transitions is taken. [ChangeLog][QtCore] Fixed an issue where the state machine could end up in an invalid state when transitions from a parallel state were not checked for conflicts. [ChangeLog][QtCore] Fixed a case where a parallel state was not exited and re-entered when one of its substates was exited and subsequently re-entered. [ChangeLog][QtCore] Fixed the non-deterministic behavior of picking a transition from a set of conflicting transitions. Task-number: QTBUG-44783 Change-Id: I2ee72b6a2f552077bfa7aa4d369474ab62f4c2f0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* QStateMachine: fix history state restoration.Erik Verbruggen2015-04-101-0/+87
| | | | | | | | | | | | | | | | | | | | | | | When a history state is entered that has an actual saved history (so not the initial state), the entry set was calculated wrongly in some cases. See the bug report for the specific case. The fix is to fully implement the standard, so method names in the private class are updated to reflect the names as used in the standard. Note that, as mentioned in the bug report, the algorithm as described in http://www.w3.org/TR/2014/WD-scxml-20140529/ has a bug. What is implemented is the fixed algorithm as described in the current working draft as of Friday March 13, 2015. This draft can be found at: http://www.w3.org/Voice/2013/scxml-irp/SCXML.htm [ChangeLog][QtCore] Fixed an issue where a history state restore would activate too many states, possibly putting the state machine in an invalid state. Change-Id: Ibb5491b2fdcf3a167c223fa8c9c4aad302dbb795 Task-number: QTBUG-44963 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QStateMachine: add objectName to objects to ease debugging.Erik Verbruggen2015-03-161-1/+9
| | | | | Change-Id: I3c495cc5bd04c0cac24d4abf827d6acfb35b8433 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QStateMachine: fix warnings in test.Erik Verbruggen2015-03-161-3/+2
| | | | | | | | - removed an unused field - initialized variable that might be used uninitialized. Change-Id: I7a7a063f025ecc32fa462dd8d5e2485c2ba52eb8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QtCore: assorted migrations to QString::asprintfMarc Mutz2015-02-121-11/+11
| | | | | Change-Id: Ie99d3eeeced89dd8336717954fd5ca7117bb20b4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | 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. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-121-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | Manually included changes from 3a347a4e70e5a10ee92dd2578316c926a399e894 in src/opengl/qgl.cpp. Conflicts: src/opengl/qgl_qpa.cpp src/plugins/platforms/android/androidjnimain.cpp Change-Id: Ic26b58ee587d4884c9d0fba45c5a94b5a45ee929
| * Undo: Fix state entry bug for parallel state groupsPeter Kümmel2014-08-061-0/+3
| | | | | | | | | | | | | | | | | | | | This commit reverts c4cef6fae9f2a55f21fc9517855dfcf659c89081. The above fix for QTBUG-25958 (cloned in QTBUG-40219) is not complete and introduces the regression QTBUG-30049. Task-number: QTBUG-30049, QTBUG-25958, QTBUG-40219 Change-Id: I3c4b774dce06c13cb4e089f8413a7747cedfd212 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Export QAbstractState active property.BogDan Vatra2014-07-291-16/+888
| | | | | | | | | | | | | | It is needed to check if a State is active. Change-Id: I8aa0230b8cd96fb9b95b86b2ce118fe280f9ce97 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Export QStateMachine running property.BogDan Vatra2014-06-261-2/+272
| | | | | | | | | | | | | | It is needed to control a QStateMachine object from QML. Change-Id: I19271d97718af2d688c477647d6341f70fdef3ea Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Updated corelib's unit tests to use QSignalSpy's functor constructorKeith Gardner2014-05-081-81/+81
|/ | | | | | | | | The intent is to provide compile time validation of signals and to help detect signal overloading in the future. Change-Id: I9d5d46ed4b70c5d0cd407deb5928b1e76d37e007 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* don't erroneously claim that gui support is neededOswald Buddenhagen2013-10-161-1/+1
| | | | | Change-Id: Ia7b1f02cab9fa0fc9e487ca49d75e85ed0cfee9d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* add and use qtHaveModule() functionOswald Buddenhagen2012-12-211-1/+1
| | | | | | | | | | | this is much more elegant than the so far propagated !isEmpty(QT.foo.name). also replace feature-specific tests (no-gui and no-widgets) and the obsolete contains(QT_CONFIG, foo) syntax. Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* normalise signal/slot signatures [QtCore tests]Marc Mutz2012-10-221-7/+7
| | | | | | | | | | Normalise all signal/slot signatures in tests/*/corelib, except in tst_QObject, where they might be test data. Change-Id: Id4e101f285b1676bb583b0afae06d235e599e24b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* tests: Don't omit the body of a test function with QT_BUILD_INTERNALSergio Ahumada2012-09-141-2/+4
| | | | | | | | | | Changing it outside of the test function definition to avoid running empty/inapplicable test functions. Change-Id: I713560cde7f715696984ed082d682900f5f1bcdd Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Caroline Chao <caroline.chao@nokia.com>
* statemachine: Really fix signal transition handling in multi-threaded setupKent Hansen2012-08-081-0/+38
| | | | | | | | | | | | | | | | | | | | | Commit f9a17d7f0f02f7af849afdf653a763ffdaf78a1b fixed it for the case where the sender object is in a different thread at transition setup time. However, it still didn't work if either the sender object or the state machine was moved to a different thread at some later time, before the machine was started. Therefore: Bite the sour grape and traverse all the machine's transitions when the machine is being started, registering those signal transitions whose sender objects are in other threads. This will increase the machine's startup time (proportional to the number of transitions), but at least it works in all known scenarios, meaning we don't have to document weird restrictions regarding the order in which the user's operations have to be done. Task-number: QTBUG-19789 Change-Id: I5f1dd1321994e49635f52be65cf56d2678ed1253 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-011-0/+1
| | | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>