summaryrefslogtreecommitdiffstats
path: root/src/corelib/statemachine/qstatemachine.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Export QStateMachine running property.BogDan Vatra2014-06-261-2/+35
| | | | | | | It is needed to control a QStateMachine object from QML. Change-Id: I19271d97718af2d688c477647d6341f70fdef3ea Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-131-54/+54
| | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-5/+5
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Remove qSort usages from statemachinesGiuseppe D'Angelo2013-09-111-2/+4
| | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I6edaafa75348a4e8795c3e29eeea9c45c178b621 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.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>
* Inserted hardcoded urls for State Charts and S. C. XMLNico Vertriest2012-12-111-5/+3
| | | | | | | | Corrected in qstatemachine QTBUG-28500 Change-Id: I45b2ffea983ee5754b080b8a6faa18d4d163e578 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QtCore: Make more signals private.Stephen Kelly2012-11-281-4/+4
| | | | | | Change-Id: Ida190e8b9c1ff47a6f54a5bf68673ab50a2f1bfe Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Trim trailing whitespace.Stephen Kelly2012-10-221-28/+28
| | | | | Change-Id: Iee6bb66831f53399e5937eab5704af835979f5c3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make QSignalTransition take a pointer-to-const QObjectGiuseppe D'Angelo2012-09-261-1/+1
| | | | | | | | | | | | | | The obvious idea is that a connect() happens behind the scenes. As QObject::connect takes a pointer-to-const, QSignalTransition should do that as well. TODO: the API becomes asymmetric in that it takes a "const QObject *" but returns a "QObject *". Reasoning is needed. Change-Id: I18d0436e7036eee851fd36d5b8ccda4a4757938f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.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>
* Doc: Add \inmodule QtCore to all QtCore class doc bodiesThiago Macieira2012-08-231-0/+3
| | | | | Change-Id: I19100755c97cc155c76a859e19940e9f9222d34e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* statemachine: Really fix signal transition handling in multi-threaded setupKent Hansen2012-08-081-6/+26
| | | | | | | | | | | | | | | | | | | | | 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>
* statemachine: Make states exit order spec-compliantKent Hansen2012-08-011-3/+3
| | | | | | | | | | The SCXML spec states that entry order should be equivalent to "document order" and exit order should be "reverse document order". Since QStateMachine uses child order for the entry order, the exit order should be reverse child order. Change-Id: Ia7b05fdd5c9261ccf202f64f8d23f5c88b20a8c3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Move RestorePolicy enum to QState classKent Hansen2012-07-161-33/+7
| | | | | | | | | | This makes it possible to add API for setting the restore policy per state, or even per property assignment (QTBUG-17861). This change is fully source compatible with Qt4. Change-Id: I53628546b070f6fc84891f86e7ad7bd8ef5ba285 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Add QStateMachine constructor that takes a ChildModeKent Hansen2012-07-161-0/+14
| | | | | | | | | | | | Back when QStateMachine was changed to inherit QState, this constructor was conveniently left out because setting the state machine (root state) to be a parallel state group didn't actually work. But as of commit d281aa6936ad01e28dacabb41bd9eb59891f85a1, it does work, so add the missing constructor. Task-number: QTBUG-15430 Change-Id: I68c599baa0ef1bfc869195140cf5daf645e75b8b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Micro-optimization for signal transition connectKent Hansen2012-07-131-4/+4
| | | | | | | | | | It's silly to call one virtual function plus one function that walks the inheritance chain, on every signal transition connect and disconnect, when the method offset of the internal QSignalEventGenerator class cannot change. Change-Id: Ic4e83bdc6ab445ea8ca00f3d8da3031250621e2f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Use new Qt5 api for obtaining method parameter typesKent Hansen2012-07-131-3/+2
| | | | | | | This is much faster than the string-based api. Change-Id: Id7ba76aee3346dd90412ec5c8505329360aae937 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Make signal transition registration thread-safeKent Hansen2012-07-131-0/+10
| | | | | | | | Since Qt's connections are thread-safe, QStateMachine's plumbing around them should be thread-safe too. Change-Id: I8ae91c2edc2d32ca4ed4258b71e5da22de30ed91 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Fix signal transition handling in multi-threaded setupKent Hansen2012-07-131-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, QStateMachine lazily registers signal transitions (i.e., connects to the signal) when the transition's source state is entered. The connections are established in Qt::AutoConnection mode, which means that if the sender object lives in a different thread, the signal processing will be queued. But if a sender object's signal is used in an out-going transition of the target state of the queued transition, it's possible that a second signal emission on the sender object's thread will be "missed" by the state machine; before the machine gets around to processing the first queued emission (and registering the transitions of the new state), a sender object on the other thread could have emitted a new signal. The solution employed here is to eagerly register any signal transition whose sender object is on a different thread; that is, register it regardless of whether the transition's source state is active. Conversely, when a machine's transitions are unregistered (i.e., because the machine finished), signal transitions with sender objects on other threads should be left as-is, in case the machine will be run again. This doesn't solve the case where the sender object is moved to a different thread _after_ the transition has been initialized. Theoretically, we could catch that by installing an event filter on every sender object and handle the ThreadChange events, but that would be very expensive, and likely useless in most cases. So let's just say that that case isn't supported for now. Task-number: QTBUG-19789 Change-Id: Ibc87bfbf2ed83217ac61ae9401fe4f179ef26c24 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Small refactoring of transition registrationKent Hansen2012-07-131-6/+36
| | | | | | | | | | | | | | Split the guts of registerTransitions() into a registerTransition() function. This allows a particular transition to be registered, instead of walking the source state's whole list of transitions every time. Move the logic for determining whether a transition should be registered to the state machine, since that's also where the actual registration takes place. Change-Id: I0496dee9454cd77b62cf2768942a82a96b320744 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Avoid warning when setting up signal transitionKent Hansen2012-07-131-0/+2
| | | | | | | | | | If the sender object was set, but not the signal signature, the registration would proceed anyway, producing a strange warning like QSignalTransition: no such signal: MyObject:: Change-Id: If0b113bdb60dd770d60b0d38d509b673e9d8c5eb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Set correct signal index when signal is non-normalizedKent Hansen2012-07-131-0/+1
| | | | | | | | | | | | The originalSignalIndex member was not set if the signature had to be normalized. This caused the SignalEvent passed to onTransition() to report a signal index of -1. Improve the signal transition tests so they check both the event passed to eventTest() and onTransition(). Change-Id: I5331fd1944d53310b6d11eb2fd8713b80faa53a1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Fix state entry bug for parallel state groupsKent Hansen2012-07-121-23/+34
| | | | | | | | | | | | | | | | | | The SCXML spec had a bug that would cause the initial state of a compound state within a parallel state group to be entered even if the transition specified another (non-initial) state of the compound state as its target. This only happened if the transition had multiple target states. The bug has been fixed in recent revisions of the SCXML spec. This commit implements the fix, which is to walk the ancestors of the transition's target states only after all the target states themselves have been added, so that the default initial states are correctly overridden/ignored. Task-number: QTBUG-25958 Change-Id: Iac532047678c483a4a3996e24dacf30e00f6bbe0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Move invariant code out of loop bodyKent Hansen2012-07-121-6/+6
| | | | | | | | | The lca variable doesn't change inside the loop. Comparing our implementation to the algorithm in the SCXML spec reveals that this check should indeed be done outside the loop. Change-Id: I5e9824758fd147766e975d107a73561bd7f5a190 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Support parallel root stateKent Hansen2012-07-111-11/+27
| | | | | | | | | | | QStateMachine inherits from QState, so it should be possible to set its childMode to ParallelStates, and it should behave as expected (the machine should emit the finished() signal when all its child states are in final states). Task-number: QTBUG-22931 Change-Id: Ic436351be0be69e3b01ae9984561132cd9839fa7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Emit finished() signal when the initial state is finalKent Hansen2012-07-111-1/+12
| | | | | | | | | | It's legal to set a QFinalState as the initial state. The state machine should correctly emit the finished() signal upon entering such a state in the initial transition, and don't do any further processing. Change-Id: Ica8d3fadbbde604512ea1136624af54eb3b13b11 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Small refactoring of initial transition codeKent Hansen2012-07-111-15/+15
| | | | | | | | In preparation of supporting parallel root states, which will make the initial transition creation slightly more involved. Change-Id: Iad996eb4db248842c1a2088430c13bd5c953c374 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Get rid of hidden start stateKent Hansen2012-07-111-41/+9
| | | | | | | | | | | The hidden start state was used as a mechanism for performing the initial transition (to the real initial state, QStateMachine::setInitialState()), but it mutated the state machine in a way that causes problems when the root state is a parallel state group (see future commit). Change-Id: I41ac4f6bcabf3bec0a412e46282a1373928105a3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Revamp property assignments implementationKent Hansen2012-07-111-230/+352
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the old implementation, property assignments (QState::assignProperty()) were "second-class citizens". Assignments were not really integrated into the state machine algorithm, but rather done as a separate step (QStateMachinePrivate::applyProperties()). While that was convenient for SCXML spec transcription purposes, it resulted in some pretty poor semantics on the user side: * Properties were not assigned until _after_ both the QAbstractState::onEntry() function had been called and the QState::entered() signal had been emitted. * Automatic property restoration (QStateMachine::RestoreProperties) did not play nice with nested states (and parallel states, in particular). The proper fix is to refactor the implementation to make property assignments first-class in the core state machine algorithm (QStateMachinePrivate::microstep()). In practice, this meant splitting some steps. Instead of calling exitStates() straight away, we now first only compute the states to exit (without actually exiting them), and use the resulting set to compute which properties are candidates for restoration. Similarly, instead of calling enterStates(), we first only compute the states to enter (without actually entering them), and use the resulting set to compute which properties are assigned by the entered states. With that in place, the rest was a matter of moving the various chunks of the old applyProperties() logic to the place where they belong in the per-state entry/exit. All existing autotests pass. Added several tests that verify the desired semantics in more detail. Task-number: QTBUG-20362 Change-Id: I7d8c7253b66cae87bb0d09aa504303218e230c65 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Refactor {enter,exit}States() functionsKent Hansen2012-07-111-17/+28
| | | | | | | | | | | | Move the computation of the sets of entered/exited states to separate functions. This separation is done in order to facilitate the integration of property assignments (QState::assignProperty()) into the core state machine algorithm. Change-Id: I5b7084e0e37037eb64909d217856746d81bf1878 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Don't assign properties for transitions with no targetsKent Hansen2012-07-101-6/+4
| | | | | | | | | | If the transition has no target states, that means the current state won't change; hence, property assignments should not be performed. In particular, properties should not be restored to the values they had before the state was entered. Change-Id: I237bbb541f939c272777e70c5f26c886ec457a17 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Tiny refactoring to avoid double lookupKent Hansen2012-07-101-2/+1
| | | | | Change-Id: I5040ca417dc12e1e0938ba7669b3017e414d13f9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Small refactoring of animation selection codeKent Hansen2012-07-101-14/+20
| | | | | | | | | QStateMachinePrivate::applyProperties() is an epically long function. Move the code for selecting animations to a separate function, in preparation of a larger refactoring. Change-Id: Ic5846db97dd0cb0d6ad01740f413b233d2a66975 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Purge restorable properties when they are restoredKent Hansen2012-07-101-0/+2
| | | | | | | | | | | | Previously, a registered restorable property would only be unregistered if the property was animated (see QStateMachinePrivate::_q_animationFinished()). But if a property is set directly, it should also be unregistered; otherwise, the state machine would use the previously saved (stale) value the next time that property should be restored. Change-Id: I5d246aa5355ddd0ba5f81b0186a9f0e4f3bbaa3f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Let QPropertyAssignment do the property writeKent Hansen2012-07-101-4/+3
| | | | | | | | This allows QPropertyAssignment to be smarter (caching the property index, for example). Change-Id: Ib6d302f46f784219b6b3f07784e5c31dd7288c6e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Don't crash if property assignment target is deletedKent Hansen2012-07-101-11/+29
| | | | | | | | Do like QPropertyAnimation and store the QObject in a QPointer. Purge the assignments list upon state entry and property restore. Change-Id: I54a56885a2905178ab6aa5cf292b3d25c86b7a97 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: goToState() should require that the machine is runningKent Hansen2012-07-101-10/+7
| | | | | | | | | | | goToState() is an internal function. Allowing both goToState() and machine.setInitialState() to be used to set the initial state of the machine complicates the logic of QStateMachine::start(). The existing tests for goToState() still pass. Change-Id: Ie831b4c869848f7f4c3e6bd576cf298a9799eb22 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* doc: add missing \sa tagKent Hansen2012-06-281-1/+1
| | | | | | Change-Id: I50580bfefdf556f116b7099946b047acd12d4563 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* statemachine: Make delayed event posting work from secondary threadKent Hansen2012-06-061-16/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | postDelayedEvent() and cancelDelayedEvent() are marked as thread-safe in the documentation. Unfortunately, they didn't actually work when called from another thread; they just produced some warnings: QObject::startTimer: timers cannot be started from another thread QObject::killTimer: timers cannot be stopped from another thread As the warnings indicate, the issue was that postDelayedEvent() (cancelDelayedEvent()) unconditionally called QObject::startTimer() (stopTimer()), i.e. without considering which thread the function was called from. If the function is called from a different thread, the actual starting/stopping of the associated timer is now done from the correct thread, by asynchronously calling a private slot on the state machine. This also means that the raw timer id can no longer be used as the id of the delayed event, since a valid event id must be returned before the timer has started. The state machine now manages those ids itself (using a QFreeList, just like startTimer() and killTimer() do), and also keeps a mapping from timer id to event id once the timer has been started. This is inherently more complex than before, but at least the API should work as advertised/intended now. Task-number: QTBUG-17975 Change-Id: I3a866d01dca23174c8841112af50b87141df0943 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Enter initial state before QStateMachine::started() is emittedKent Hansen2012-06-041-1/+3
| | | | | | | | | | | | | | | The documentation says that started() "is emitted when the state machine has entered its initial state", but the implementation didn't adhere to that. The consequence is that if you e.g. emitted a signal from a slot connected to started(), and that signal was used by a transition from the initial state, the signal would effectively get ignored and the state machine would remain in the initial state. Task-number: QTBUG-24307 Change-Id: Ibbeb627d517eaff821d88e256a949eacf6aae350 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix typos in QState sorting functionsKent Hansen2012-06-041-4/+4
| | | | | | | | | | | | | | A QObject can't be a child of itself, so the comparison always returned false. In practice, this was causing the entry/exit order of parallel states to be random. QObject::children() is documented to contain the children in the order in which they were added, so this fix actually achieves deterministic behavior. Task-number: QTBUG-25959 Change-Id: Id3f12d6bfbc249f1d4fed0bafb7d0217093e458e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix To-Do in qstatemachine (use QObject::senderSignalIndex())Kent Hansen2012-06-011-8/+2
| | | | | Change-Id: Id8a541878918f27a34595ff297d0f41b79275a96 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Don't call metaObject()->method() redundantlyKent Hansen2012-05-311-1/+1
| | | | | | | The desired method is already stored in a local variable. Change-Id: Ibf0078813c7aebc83604b9c7ad9a8b6c596c5c65 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move rarely used QObjectPrivate data to extraDataMartin Jones2012-05-211-1/+1
| | | | | | | | | | | Move runningTimers, eventFilters and objectName data members to ExtraData. Saves 12 bytes per QObject for 95% of use cases (QObjectPrivate goes from 76B -> 64B). Change-Id: I5648c89f65a7be3ea51bd703ee8a9dcff6222c3c Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove QMetaObjectExtraData and put everything into QMetaObjectOlivier Goffart2012-04-251-5/+1
| | | | | | | | | | | | | | | | QMetaObjectExtraData was added when support for QMetaObject::newInstance was added. One needed a place to put the pointer to static_metacall in the QMetaObject. But as we break binary compatibility, one can change the size of QMetaObject, and put everything back inside QMetaObject's own structure. Meaning it is not required anymore to have one QMetaObjectExtraData instance per QMetaObject anymore. Change-Id: If0b8f586cbaf633eed10045adee3ba3366826c86 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-191-2/+2
| | | | | | | | | | | | This change fixes most qdoc errors in QtCore. There are about 900 left. The main thing this change does is moving documentation from qtcore from /doc/src to /src/corelib/doc. Other issues resolved are mis-use of qdoc commands. Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Introduce initializer macros for QString- and QByteArrayDataJoão Abecasis2012-04-041-4/+4
| | | | | | | | | This enables easier updating of those structs, by reducing the amount of code that needs to be fixed. The common (and known) use cases are covered by the two macros being introduced in each case. Change-Id: I44981ca9b9b034f99238a11797b30bb85471cfb7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update QSignalEventGenerator to meta-object revision 7Kent Hansen2012-02-291-9/+27
| | | | | | | | Regenerate the moc output so that it's in sync with the latest moc. Change-Id: Ic347f7cd030248da431070bf3307950df30edd66 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Rename QMetaMethod::signature() to methodSignature()Kent Hansen2012-02-291-1/+1
| | | | | | | | | | | | | | | | | | | | In Qt5 the meta-data format will be changed to not store the method signature string explicitly; the signature will be reconstructed on demand from the method name and parameter type information. The QMetaMethod::signature() method returns a const char pointer. Changing the return type to QByteArray can lead to silent bugs due to the implicit conversion to char *. Even though it's a source- incompatible change, it's therefore better to introduce a new function, methodSignature(), and remove the old signature(). Task-number: QTBUG-24154 Change-Id: Ib3579dedd27a3c7c8914d5f1b231947be2cf4027 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Port QSignalEventGenerator meta-object to revision 6Kent Hansen2012-02-201-19/+40
| | | | | | | | | | We want to drop support for old revisions in Qt 5. This commit brings the QSignalEventGenerator meta-object in sync with current moc output. Change-Id: Id5f4954b08cf49169850bd77543b2a7ab8274c18 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>