summaryrefslogtreecommitdiffstats
path: root/src/corelib/statemachine
Commit message (Collapse)AuthorAgeFilesLines
* Make local symbols of some leaked namesThiago Macieira2018-08-032-18/+20
| | | | | | | | | Unnamed namespaces and static are great tools. Use them. Change-Id: Ie01831ddac5446fdbdeefffd15468b3acb3ced79 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* doc: Correct remaining qdoc warning in qsignaltransition.cppMartin Smith2018-01-041-2/+1
| | | | | | | clang required adding template clause to a \fn command. Change-Id: Ie95a1db90adcc9f6b10a7d2943af574c3b0ce2e2 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Correct remaining qdoc warning in qstate.cppMartin Smith2018-01-041-2/+1
| | | | | | | clang required adding template clause to a \fn command. Change-Id: Icbe0557f7fa67ba211df5cfbc68baa6cf737d7b1 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-021-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-231-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| * Fix clazy-strict-iteratorsFriedemann Kleint2017-10-251-1/+1
| | | | | | | | | | Change-Id: I9276a85f0a8061b2636687cf694b8ed1abaa18b8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-1912-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-1911-28/+28
|/ | | | | | | | | | | | | | | | 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>
* QtCore: include mocsThiago Macieira2017-05-057-0/+15
| | | | | | | | | | | | | | | | | | | Compilation and link times in CPU seconds with GCC 7, using precompiled headers (not including moc, rcc, uic, etc. steps or headersclean): Before After Debug -O0 198,1 180,3 Debug -Og 240,7 229,2 Release -O3 267,1 249,2 Release LTO 239,4 229,8 QtCore required a little manual adjusting because some files are bootstrapped into moc itself and into qmake. Change-Id: I84e363d735b443cb9beefffd14b8b57c10e7da36 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix build without features.qeventtransitionTasuku Suzuki2017-04-041-0/+2
| | | | | | Change-Id: I498d482b01d9dcaf794d35ecc26110c9a2d45ce0 Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Core: Replace LGPL21 with LGPL license headerKai Koehne2017-03-281-14/+20
| | | | | | | | Also use canonical contact url. Change-Id: I43f8c6a2c4949ee0e054045bccc17d82575b072c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fix build without feature.animationTasuku Suzuki2017-01-161-4/+6
| | | | | Change-Id: Ia1b9ae3a35cbc73d0bbf27db234d0cd120d0b601 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QtCore: fix GCC 7 warningsMarc Mutz2017-01-151-1/+3
| | | | | | | | | GCC 7 warns about implicit fall-throughs now. Fix by adding Q_FALLTHROUGH. Change-Id: I482ab4c6adc469b11e1fd163516ff486b3b55ef7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-241-2/+2
|\ | | | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_winrt.cpp tools/configure/configureapp.cpp tools/configure/environment.cpp Change-Id: Ieae6f2ee004a87f041751852b687484f91ee4480
| * QtCore: Add missing overrideAlexander Volkov2016-11-161-2/+2
| | | | | | | | | | Change-Id: Ifdec31aabdd0371f36abbb382e49f52f5b58ee94 Reviewed-by: hjk <hjk@qt.io>
* | Fix build with statemachine feature disabledLars Knoll2016-10-1126-95/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | The sources of the state machine are excluded completely at the build system level instead of littering them with #ifs. All remaining usages of QT_NO_STATEMACHINE are converted to QT_CONFIG(statemachine) or a QT_REQUIRE_CONFIG(statemachine). Also make the qeventtransition feature dependent on statemachine. Change-Id: Ib05c7ca263a02042523fff8f794fa87342df1069 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | fix build with various QT_NO_* definesNick Shaforostoff2016-08-262-2/+12
| | | | | | | | | | | | | | Done-with: Andriy Gerasika <andriy.gerasika@gmail.com> Change-Id: I90883a491dbddb005c3d756c339e42285d50e437 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Add a qeventtransition featureLars Knoll2016-08-194-14/+16
| | | | | | | | | | | | | | | | | | This replaces the QT_NO_STATEMACHINE_EVENTFILTER define, and gives it a proper name. Change-Id: I2b9386458224ff2bd30003daac548daa61961085 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Make sure all private headers in Qt Core include qglobal_p.hThiago Macieira2016-06-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The rule was: - if the header included qglobal.h, turn that into qglobal_p.h - otherwise, insert the #include after the "We mean it" warning qglobal_p.h currently only includes qglobal.h. Change-Id: Ib056b47dde3341ef9a52ffff13ef677e471674b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-231-1/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/wince80colibri-armv7-msvc2012/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/corelib/global/qnamespace.h src/corelib/global/qnamespace.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/tools/tools.pri src/network/ssl/qsslconfiguration_p.h src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/plugins/platforms/windows/windows.pri src/src.pro src/tools/bootstrap/bootstrap.pro src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/dialogs/qfilesystemmodel.cpp tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt Change-Id: I4d2ac78f0dcc97f008186bbbc769c6fe588ab0e5
| * QtCore/QtDBus/QtSql: port the last remaining Q_FOREACH loop and add ↵Marc Mutz2016-05-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | QT_NO_FOREACH Port the last remaining Q_FOREACH user in QtCore to C++11 range-for and mark QtCore, QtSql and QtDBus as Q_FOREACH-free, using QT_NO_FOREACH. Change-Id: Ia6f99139cb1ca4a8bbe9e445421592242e048b0a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-033-7/+9
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/double-conversion/include/double-conversion/utils.h src/corelib/global/qnamespace.qdoc src/corelib/tools/qsimd_p.h tests/auto/corelib/io/qfile/tst_qfile.cpp Change-Id: I3ca1007bab5355d251c13002a18e93d81c254d34
| * CoreLib: use const (and const APIs) moreAnton Kudryavtsev2016-04-182-4/+7
| | | | | | | | | | | | | | | | | | | | For CoW types const methods will be called. Mark store_persistent_indexes() as const, because this method does not modify the object. Change-Id: Ic867913b4fb5aaebfbaaffe1d3be45cf7b646403 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fix some qdoc-warnings in 5.7.Friedemann Kleint2016-04-131-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/corelib/global/qnamespace.qdoc:101: warning: Undocumented enum item 'AA_SynthesizeMouseForUnhandledTabletEvents' in Qt::ApplicationAttribute qtbase/src/corelib/global/qnamespace.qdoc:2554: warning: Undocumented enum item 'ImAnchorRectangle' in Qt::InputMethodQuery qtbase/src/corelib/statemachine/qsignaltransition.cpp:154: warning: Can't link to 'Q_COMPILER_DELEGATING_CONSTRUCTORS' qtbase/src/gui/image/qiconloader.cpp:160: warning: Cannot find 'QIconCacheGtkReader' specified with '\class' in any header file qtbase/src/gui/painting/qpaintengine_raster.cpp:1382: warning: No documentation for 'QRasterPaintEngine::fillPath(const QPainterPath &path, QSpanData *fillData)' qtbase/src/testlib/qtest.h:176: warning: No documentation for 'QTest::toString(const QHostAddress &addr)' qtbase/src/testlib/qtest_gui.h:77: warning: No documentation for 'QTest::toString(const QColor &color)' Change-Id: If9ac0807accf2530ec7fc2ca7db71a110f9f79bb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-04-051-2/+2
|\| | | | | | | | | | | | | | | | | Conflicts: examples/corelib/ipc/ipc.pro src/plugins/platforms/xcb/qxcbbackingstore.cpp tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp Change-Id: Ia006e10ff1732fe78f90138c41f05b59b49486cf
| * Fix some documentation warnings.Friedemann Kleint2016-03-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/corelib/io/qnoncontiguousbytedevice.cpp:87: warning: Cannot find 'atEnd(...)' in '\fn' virtual bool QNonContiguousByteDevice::atEnd() qtbase/src/corelib/io/qnoncontiguousbytedevice.cpp:107: warning: Cannot find 'size(...)' in '\fn' virtual qint64 QNonContiguousByteDevice::size() qtbase/src/corelib/io/qsettings.cpp:2387: warning: Unexpected '\endlist' qtbase/src/corelib/kernel/qcoreevent.cpp:90: warning: Undocumented enum item 'Pointer' in QEvent::Type qtbase/src/corelib/kernel/qmetaobject.cpp:346: warning: No documentation for 'QMetaObject::inherits(const QMetaObject *metaObject)' qtbase/src/corelib/statemachine/qsignaltransition.cpp:154: warning: No such parameter 'sourceSate' in QSignalTransition::QSignalTransition() qtbase/src/corelib/global/qglobal.cpp:945: warning: Undocumented parameter 'memberFunctionPointer' in qConstOverload() qtbase/src/corelib/global/qglobal.cpp:956: warning: Undocumented parameter 'memberFunctionPointer' in qNonConstOverload() qtbase/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc:519: warning: Command '\snippet (//! [96])' failed at end of file 'code/doc_src_stylesheet.cpp' Change-Id: I7da69b9b535f484e10ca030dbf64b6007dce0df3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Fix Q_QDOC code for PointerToMemberFunctionOlivier Goffart2016-03-292-0/+2
|/ | | | | | | | | | | | | | | In functions such as QObject::connect and similar which are using pointer to member function or functor, we have a different declaration for qdoc because we don't want to show the QEnableIf and other type traits in the doc. However, The code still needs to be valid, as we will use clang to parse the documentation. Fix it by making 'PointerToMemberFunction' and 'Functor' template parameters (which they actually are). Change-Id: Ie2648407bae21ba6d1677f6de2d6f597486b5c98 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-026-15/+94
|\ | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/plugins/platforms/cocoa/qcocoahelpers.mm src/tools/qlalr/cppgenerator.cpp Change-Id: I0103ca076a9aca7118b2fd99f0fdaf81055998c3
| * Allow QFinalStatePrivate to be subclassed.Erik Verbruggen2016-01-286-15/+94
| | | | | | | | | | | | | | | | | | | | | | - put it in a separate private header - add a protected QFinalState constructor that takes a QFinalStatePrivate - when passing through, also export QStatePrivate, so the linker can find the symbol Change-Id: I8563da16739731d9d6142be438a8769fc29de148 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-211-4/+6
|\| | | | | | | | | | | | | | | | | | | | | 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-4/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1524-336/+480
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | QStateMachine: replace a QPair with a small structMarc Mutz2016-01-052-19/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of QPair made the return type of initializeAnimation() so complicated, that the original author opted to declare the pair on one line, then assign to it in the next, to keep below the line length limit. She also copied a member of the pair just so as to give it a descriptive name. Fix both by introducing a small result struct. It has a nicer name, compared to the pair, but still port callers to use 'auto'. The member names are descriptive enough now. Saves more than 0.5KiB in text size on optimized GCC 4.9 Linux AMD64 builds, too. Change-Id: I7ed007ffa0fb16e182e38cd405cfd54da4e363fb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | | QtCore: eradicate all Q_FOREACH loops [statemachine]Marc Mutz2016-01-041-22/+25
| | | | | | | | | | | | | | | | | | | | | | | | Saves a bit over 2.5KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I18a635d65a3c20c4bf5ec2cbfa4ed81a8153cab3 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | QStateMachine: replace a Q_FOREACH with QSet::op-=Marc Mutz2015-12-311-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both 'configuration' and 'pendingErrorStates' are QSet<QAbstractState*>, so we can use QSet::operator-= to subtract one from the other. No need to loop over QSet::remove() here. Nevermind that QSet::operator-= is really poorly implemented atm. That needs to be fixed in QSet. Change-Id: I3f3172ce9a485c4c2abf7d19b831fb0dc1ea61b1 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Make use of new QHash::erase(const_iterator) overloadMarc Mutz2015-12-191-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drive-by changes: - use auto for iterators - add Q_UNLIKELY for conditions leading to a qWarning etc Change-Id: Iff8f36d67c96674d354a501b26640f73c15ce58d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sérgio Martins <iamsergio@gmail.com>
* | | Add PointerToMemberFunction for ctor of QSignalTransitionAndré Klitzing2015-12-082-0/+26
|/ / | | | | | | | | | | | | | | [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>
* | State machine: fix removeConflictingTransitions()Jarek Kobus2015-10-301-2/+2
| | | | | | | | | | | | | | | | | | Since QSet<>::intersect() modifies the original set, exitSetT1 has wrong content for next iterations. Use intersects() instead. Change-Id: I09e0961ec6dfb34ade88d48d1e009529aeab82b4 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QStateMachine: cleanup QAbstractTransition::setTargetStatesErik Verbruggen2015-10-151-11/+40
| | | | | | | | | | | | | | | | | | | | Prevent QPointer creation for every new target, and a copy of a QVector of QPointer, and two QPointer destructions, when setting new target states. The typical (only?) use-case, setting the target states right after transition creation, is also faster. Change-Id: I931783afbcea43c8a84200133f26454a4b689edc Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QStateMachine: fix leak of delayed events.Erik Verbruggen2015-10-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | When a delayed event is queued, the state-machine is responsible for deleting it. Normal flow will ensure that: after the timer fires, the delayed event is handled normally, which includes deletion. However, when a timer cannot be set, the event was leaked. But more important: if there were unhandled (delayed) events when the state-machine was destoryed, the events were never deleted. Change-Id: I7d8a6b572765dc1551ddbdebb446aaa3258680c8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Libraries: Fix single-character string literals.Friedemann Kleint2015-10-131-3/+3
| | | | | | | | | | | | | | Use character literals where applicable. Change-Id: I8e198774c2247c1cc1d852a41b59b301199b7878 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Add \since 5.6 to method docs and document the changed signalLars Knoll2015-10-081-0/+13
| | | | | | | | | | | | Change-Id: I9a727a2a01927693e8182eb5518ee4d8f6e5be23 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | QStateMachine: make enterStates/exitStates virtual.Erik Verbruggen2015-09-251-6/+6
| | | | | | | | | | | | | | | | This allows handling of state specific code when entering/exiting states during a micro-step. Change-Id: If2fa8dde9a1e209345950a93dee59414063d863e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Add a method to detect when the state-machine can exit.Erik Verbruggen2015-09-152-0/+9
| | | | | | | | | | | | | | | | | | | | | | According to the SCXML specification, the state-machine can exit the interpreter loop when a final state has been reached. This happens after finishing a macro-step or when it ends up in a final state right after startup (e.g. when the only state is a final state). This patch adds a virtual method which can be used to detect this reliably. Change-Id: I594e952a4972dd70d4089a2c4ce1c86880568eb9 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Document QStateMachine::running property in single placeLouai Al-Khanji2015-08-251-10/+2
| | | | | | | | | | | | | | | | | | This fixes a number of qdoc warnings due to e.g. missing documentation for setter argument. Change-Id: If9ae43f70f0e42fe8b8a4f04f49d522cd7d69099 Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | QStateMachine: add defaultTransition in QHistoryStateErik Verbruggen2015-07-236-21/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | StateMachine: remove initial state for parallel states.Erik Verbruggen2015-07-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | A parallel state cannot have an initial state, as all children of the parallel state will be entered. Setting such an initial state on a QState marked as ParallelStates would already produce a warning and ignore the initial state. Now any initial state that has been set before changing the child-mode to ParallelStates will also produce a warning and remove the previously set initial state. Change-Id: Ie5fcd44b03516744f785f2d1880bf806918c44d4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | QStateMachine: remove left-over method.Erik Verbruggen2015-07-232-68/+5
| | | | | | | | | | | | | | | | | | | | This method was probably there in older versions of the specification, but it is no longer used now. The only caller was in QStateMachinePrivate::setError, which has been changed to use the newer methods. Change-Id: Ic4961990d8d2c902676e63193d3f30ef427e6f0c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>