summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* QtStateMachine QML-facing properties' bindable support part 3Juha Vuolle2021-05-031-0/+13
| | | | | | | | | | This commit covers these QML-facing classes: QSignalTransition Task-number: QTBUG-91375 Change-Id: I0f55f55c5198d30260762583ec10d35351e217b6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QtStateMachine QML-facing properties' bindable support part 2Juha Vuolle2021-05-034-7/+101
| | | | | | | | | | This commit covers these QML-facing classes: SignalTransition Task-number: QTBUG-91375 Change-Id: I58bca7b4599b420aa99492233f9d88ea4af7e877 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QtStateMachine QML-facing properties' bindable support part 1Juha Vuolle2021-05-033-68/+164
| | | | | | | | | | | This commit covers these QML-facing classes: QHistoryState QState QAbstractState Task-number: QTBUG-91375 Change-Id: Ic66977c4f25198c19052f48754a956042caa3632 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QtScxml QML-facing properties bindable supportJuha Vuolle2021-05-037-83/+379
| | | | | | | | | | This commit adds the bindable support the QML facing properties that were feasible for such support. Task-number: QTBUG-89895 Change-Id: Ia8c9ada1c4bf9f14a1460363e79befd82975539d Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QScxmlEventConnection bindable supportJuha Vuolle2021-05-034-1/+148
| | | | | | | | | QScxmlEventConnection is a class exposed for QML use Task-number: QTBUG-89895 Change-Id: I315c1e460cc01a57f841e832385959ef36618e91 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QtScxml: Add explanation for test warningsTamas Martinec2021-04-191-0/+3
| | | | | | | Pick-to: 6.1 Task-number: QTBUG-89836 Change-Id: If149fb0ed410d3174eafffefcc1c13a0dd16e65e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QtScxml: Add description to blacklisted testsTamas Martinec2021-04-142-1/+16
| | | | | | | | | | Also added a missing file that is supposed to be loaded from test557.txml.scxml. Pick-to: 6.1 Task-number: QTBUG-89836 Change-Id: I598595db76ce0e9081df3b337bbb2735acdc1f67 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove compilation warnings in auto testsJuha Vuolle2021-03-312-25/+25
| | | | | | | Pick-to: 6.1 Task-number: QTBUG-89832 Change-Id: If60c83c51af4587757dddff64e9a821d0027e470 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Qt SCXML: Fix HistoryState crashTamas Martinec2021-03-263-0/+74
| | | | | | | | | | | | Use the initial state of the parent state as the transition of a history state, if the parent state of the history state was not entered before. Pick-to: 6.1 Task-number: QTBUG-89845 Fixes: QTBUG-76091 Change-Id: I4c8a5898406bdf2931424b3cf012e42e422431ae Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QtScxml: Fix parameter injection deprecation warning on a qml testJuha Vuolle2021-02-251-1/+1
| | | | | | | | Pick-to: 6.1 Task-number: QTBUG-89836 Change-Id: I7cc28e010ada81bf9083713fab206c57aa9db555 Reviewed-by: Tamas Martinec <tamas.martinec@symbio.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove qtcxml repo qmake build support (examples excepted)Juha Vuolle2021-02-2240-372/+0
| | | | | | | | | | | | | | | | | Remove qmake support by removing *.pr? files, with some exceptions: - Keep qmake support for the examples - Keeps qscxmlc.prf to retain STATECHARTS support for .pro files Also remove: - "#special case" and "# Generated from" comments from cmake files - .prev_CMakeLists.txt files Note: configure.json files are still kept as they still used to generate the configure.cmake Pick-to: 6.1 Task-number: QTBUG-89828 Change-Id: Ie9c7e86d099bbdc535f52b9f3e841fcf3973ca36 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Qt State Machine standalone documentationJuha Vuolle2021-02-1713-26/+26
| | | | | | | | | | | | | The Qt State Machine was carved off of the qtbase and qtdeclarative repositories and relocated to the qtscxml repository as a neighbor of the scxml state machine. As such the Qt State Machine had several fragments of existing documentation, but no qdoc packaging to make them work as a standalone documentation. This packaging and related necessary changes is the essence of this commit. Pick-to: 6.1 Task-number: QTBUG-89833 Change-Id: I43d8f8145d4467bd48dbf4674fa28a29671de868 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Add qscxmlc qmake options also for cmakeJuha Vuolle2021-02-0811-0/+297
| | | | | | | | | | | | | | qmake provides QSCXMLC_NAMESPACE, QSCXMLC_DIR and QSCXMLC_ARGUMENTS options as documented in https://doc.qt.io/qt-5/qtscxml-instantiating-state-machines.html and https://doc.qt.io/qt-5/qscxmlc.html Pick-to: 6.1 Task-number: QTBUG-89828 Change-Id: I866807d2b74eec1dcab361e99c3f39ae6fdad25f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Rename qqmlmetatype testUlf Hermann2021-01-285-11/+11
| | | | | | | | | The name clashes with a test in qtdeclarative, and CMake cannot handle that when doing a toplevel build. Change-Id: I14f94d401c2607c8b60b0f26b0ebd8560fba72c9 Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Make testcases more robustJuha Vuolle2021-01-282-176/+162
| | | | | | | | | | | | | The testcases fail under some circumstances on Linux. This change makes the timing characteristics more robust by adding QTRY to places that earlier relied on processEvents() The processEvents() calls that are related to actual event deliveries (eg. postEvent() are left intact. Task-number: QTBUG-89828 Change-Id: I0ff3cf2c8c9890d3b258bec0e455379bc20c5a76 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix example and tests depreceation warningsJuha Vuolle2021-01-281-4/+4
| | | | | | | | | Use QFontDatabase static methods QVariant type() deprecation Task-number: QTBUG-89832 Change-Id: Ia5a738d98563a8516770493fdf9e8c130185f1f4 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* An attempt to fix --no-gui cmake CI build of the QtScxmlJuha Vuolle2021-01-284-12/+15
| | | | | | Task-number: QTBUG-89828 Change-Id: Ia3708141ec1e8d787055cd0bddb2280b8f4d81ff Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QtScxml module cmake portJuha Vuolle2021-01-2119-123/+30
| | | | | | Task-number: QTBUG-89828 Change-Id: I95ec7905654bd3eaf61b22082ee1040aba4b9b24 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix a set of compilation errors against Qt6Juha Vuolle2021-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes include -qmllistproperty uses qsizetype instead of int -implicit constructor calls that Qt6 marks as explicit -QEnableIf removed => std::enable_if -Replace the removed QCoreApplicationPrivate::cloneEvent() -Conflicting forward declaration for QStringList (comes via qglobal.h) N.B. after this task the generated (by generator.cpp) code won’t still compile, and it likely requires more in-depth study how to fix it => looks like they relate to the Qt6 property system changes. By temporarily disabling the violating generated code all unit tests pass though => needs a followup task to analyze and fix. Task-number: QTBUG-89832 Change-Id: I9f7d1cd5898b549f243a7df464ca124d29074c46 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Re-generate all CMake filesJoerg Bornemann2021-01-1914-14/+108
| | | | | Change-Id: I40dd28da4ba47bd15471b471138900cd22b4e409 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Merge remote-tracking branch 'origin/wip/cmake' into devJoerg Bornemann2021-01-1811-0/+487
|\ | | | | | | Change-Id: Id18b041d49c8ddebdb4aff404e438700d0441948
| * Regenerate projectswip/cmakeAlexandru Croitor2019-11-157-14/+14
| | | | | | | | | | | | Change-Id: I8f779c41390e242634e32ff94d13041a8559f272 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-151-4/+4
| |\ | | | | | | | | | | | | | | | Removed dependencies.yaml. Change-Id: I7d1b06564b6b5c71882fe058f094894af7cb3efc
| * | Regenerate before mergeAlexandru Croitor2019-10-152-2/+2
| | | | | | | | | | | | | | | Change-Id: Ib78bff1d61ee9526b9e3373dbf109ae4d2dd81dc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Port QtScxml to CMakeJoerg Bornemann2019-09-2611-0/+487
| | | | | | | | | | | | | | | | | | Change-Id: I227f18b6a9825b6974eab6ba9feaf62bd0934133 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Move state machine tests into QtScxmlKarsten Heimrich2020-08-286-0/+7262
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-80316 Change-Id: I67b528b1ca0620ebc45b32086e2552a4172c3792 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Move qml statemachine plugin from qtdeclarative into qtsxcmlKarsten Heimrich2020-08-2127-1/+1477
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-80316 Change-Id: I6be4a0410d7934cdb11532c771185aad13d1f866 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | Fix flaky autotest with a delayed event in scionJarek Kobus2020-08-101-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before the historical fix for the issue (commit 3da30ee8928ab27249a74966ed4981766d62ff25) the playEvent() method submitted directly the delayed event and it tried to verify the configuration just after. It couldn't work, since the event was delayed, so the demanded configuration couldn't be reached yet - it was checked too early. After the mentioned fix, we didn't submit an event immediately, but waited demanded time (in hope, that statemachine reaches the configuration expected after a delay) to mimic the delay, and after that, we submitted a non-delayed event directly. This could also cause issues like these mentioned in task description. The reason could be a race between the point in time when statemachine issues the delayed "s" event and the point in time when we submit the "t2" event. It could happen, that we submit "t2" while still being in "b" state (so before the statemachine issues the "s" event), and in this case the "t2" event doesn't trigger any change in the statemachine, thus the configuration stay unchanged. In the current fix we go back to the original idea of submitting the delayed event directly, but we are delaying the point in time when we do check the configuration expected after the event is dispatched. So is case of delayed event we connect to the statemachine's signal emitted when the event is being dispatched. After the connection is established, we submit a delayed event and start awaiting for the right moment when we should expect the stabilized configuration. This will be signalled with a timeout of trigger timer object. When the submitted event has been dispatched (after the desired delay), we connect synchronously to state machine's reachedStableState() signal. When reachedStableState() is received, we trigger the timer to unwind from synchronously called slot and to get back to the place where we were awaiting for timer to be triggered. Now we should expect the right configuration. The above approach works nicely also in case of playing non-delayed events. Fixes: QTBUG-83420 Pick-to: 5.15 Change-Id: Ia6ddbc6ac9282a2dd41e0c99dd1bb59610690c95 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Use QList instead of QVectorJarek Kobus2020-06-264-23/+23
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-84469 Change-Id: Ibaf2524e49e75ec660889261347eddbae9ccdbc6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-03-021-1/+1
| |/ |/| | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I022d0c59b1fce62378a89c8f4087aaf99d3aac8c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-201-4/+4
|\ \ | |/ |/| | | Change-Id: I58544f3833ea4a0d08408795dfd4f146db70377d
| * Fix shadow buildSamuli Piippo2019-08-191-4/+4
| | | | | | | | | | | | | | | | Don't write to source directory when using shadow build. This stops working with Qt 5.14.0. Change-Id: Ica83b9c810e2a937aab75af131484f5f91570453 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Increase timeout for send-data/send1 testv5.13.0-rc3v5.13.0-rc2v5.13.0-rc1v5.13.0-beta4v5.13.0Ulf Hermann2019-05-131-1/+1
|/ | | | | | | Fixes: QTBUG-75684 Change-Id: I3b379c8f9ee9e17614e663d8842ae4329109c4a4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Don't suppress <log> tags with missing or bad exprUlf Hermann2018-11-143-0/+21
| | | | | | | | | Rather, output an empty string as message in this case. Ignoring log instructions is highly confusing. Change-Id: Iebb30ffd3ade33f1277f3073f015127a99170e40 Task-number: QTBUG-71746 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Fix header inclusion in tst_scion.cppUlf Hermann2018-07-131-1/+1
| | | | | | | | What we are looking for here is QScxmlStateMachine, not the ecmascript datamodel. Change-Id: I5c15e38ffb5a6cf6ec1fa8fcf93d2e3f5a093115 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-201-0/+3
|\ | | | | | | | | | | | | Conflicts: src/scxml/qscxmlcompiler.cpp Change-Id: I4abda984e523cdf2a0810ed7dc1773e055746e18
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-151-0/+3
| |\ | | | | | | | | | Change-Id: Id4d40ec35ed8f13c7704d737312205f334139129
| | * Output a better warning when runtime-loading malformed SCXMLUlf Hermann2017-11-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | The document might technically have a root element. We might not be able to read it, though. Also, output all errors without quotes. Change-Id: I8133e322e452ea0c3d079b5cbe23aed2f2952b3e Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Replace Q_NULLPTR with nullptrKevin Funk2017-09-271-3/+3
| | | | | | | | | | | | | | | Change-Id: I6bee476e2f467b57ee8e4bba1e780cf79c7a460e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Replace Q_DECL_FINAL with finalKevin Funk2017-09-221-1/+1
| | | | | | | | | | | | | | | Change-Id: I074b69d728dfb597f4eb68cf516a2591658303ba Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-211-1/+1
|/ / | | | | | | | | Change-Id: I68e08fd214ad3dbf4de9c9e23b1725950925c1fb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* / Pre-declare some meta types in the headersUlf Hermann2017-08-174-8/+0
|/ | | | | | | | | It doesn't make much sense to declare the meta type for QScxmlError in all the tests. Also, types exposed through Q_PROPERTY should be declared. Change-Id: Ibb08440e1f40845ea779e1c2a3882bc1b1e0a935 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Fix the crash when sending an event into not running seviceJarek Kobus2017-08-153-1/+67
| | | | | | Task-number: QTBUG-61484 Change-Id: I3cebb3378a73d16901b18ec9465bcacf2e5ad486 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix emission of state changed signalsJarek Kobus2017-08-143-0/+33
| | | | | | | | | | | | | | The state index is not the same as its changed signal index. The changed signal is not being generated for history states. The current fix is that we create a hash cache of state index into the signal index of its appropriate signal just after we set the table data for the state machine. Task-number: QTBUG-61243 Change-Id: I778adaf6c2d626be17c50b558f93ec0035ea3325 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-103-7/+119
|\ | | | | | | Change-Id: I467bf942ab818d350a1c08c8567566b9bbfcb5a5
| * Make the content/expr test compliantUlf Hermann2017-02-082-7/+16
| | | | | | | | | | | | | | | | | | We cannot add both an 'event' attribute and a <content> element to <send>, and we cannot match anonymous events in transitions. We can receive them in the C++ code, though. Change-Id: Ieef7aba3fee79181c56002a0334f9f8e4af4df14 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Add a way to verify events received from a test caseUlf Hermann2017-02-081-0/+103
| | | | | | | | | | Change-Id: I1012cb5c1b38c23af32197c48459668dc64144b2 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | Make QScxmlScxmlService::stateMachine a Q_PROPERTYUlf Hermann2017-02-243-0/+96
|/ | | | | | | | Without this, the invoke example doesn't work. Change-Id: I8c4ae9b21e1164946f2a60777b9e9905f2b51237 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Emit runningChanged signal when running changesJan Arne Petersen2016-12-081-0/+21
| | | | | | | | | The QScxmlStateMachine::runningChanged signal was never emitted. Emit it when the running property changes. Change-Id: I9b6cb8d48c9c8d893b0af2b8f87ecd74f4e64055 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* Drop the --no-c++11 parameter from qscxmlcUlf Hermann2016-11-231-1/+0
| | | | | | | We don't support C++98 anymore, so this is useless. Change-Id: Ie918567253af6d9309b601c7cfbc0205ec888048 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>