aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/animations
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'gerrit/5.11' into wip/webassemblyMorten Johan Sørvig2018-03-0810-76/+72
|\ | | | | | | Change-Id: I729af792166fd2f6c5843ba564e63adf8ae09a97
| * use the override keyword consistently and correctly (clang-tidy)Shawn Rutledge2018-02-272-2/+2
| | | | | | | | | | Change-Id: If9e28d143f8cba3df3c757476b4f2265e2eb8b2a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * init variables where they are declared when possible (clang-tidy)Shawn Rutledge2018-02-265-13/+11
| | | | | | | | | | | | | | | | clang-tidy -p compile_commands.json $file -checks='-*,modernize-use-default-member-init,readability-redundant-member-init' -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' -header-filter='qtdeclarative' -fix Change-Id: I705f3235ff129ba68b0d8dad54a083e29fcead5f Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-264-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Avoid repeated calls into thread local storage to get the animation timerLars Knoll2018-01-222-43/+41
| | | | | | | | | | | | | | | | | | | | Instead hold a direct pointer to the animation timer and make it's methods non static. Change-Id: I6382fd2a1c02464ddb573f0210a14c603fd932db Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | wasm: get declarative building and running for webassemblyLorn Potter2018-01-041-1/+2
|/ | | | | | | One thread Change-Id: Iab9bd20eb5951c7b0fe0b6f48f1f14ea7560d8f7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+1
| | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* headers: Add missing override and remove redundant virtualAlexander Volkov2016-12-074-20/+20
| | | | | | Change-Id: Ifa816ebcd79372afca42dbd0dc0ecde006bb688a Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Qml: add missing 'override'Anton Kudryavtsev2016-10-072-7/+7
| | | | | | | ... and drop redundant 'virtual' Change-Id: Ib1f68c1ebd0468cb4a77eecc986bbf718f6bf789 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix compilationSimon Hausmann2016-05-241-0/+1
| | | | | | | Add missing qdebug.h include after some header file changes in qtbase. Change-Id: Ie3bc9469650c954596a03fb471765767149b8f05 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Replace QPODVector with a std::vector in QAbstractAnimationJobFrank Meerkoetter2016-04-072-14/+11
| | | | | | | | | | QAbstractAnimationJob::ChangeListener was not a POD type in the first place. The goal is to get rid of QPODVector altogether. Change-Id: Ia04d281d59b9691868a9ce563d2f2794d9db898b Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-1913-182/+260
| | | | | | | | | | | 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: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-067-0/+77
| | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* QtQml: Fix const correctness in old style castsThiago Macieira2015-07-095-5/+5
| | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c958364a2e9859 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Improve debug formatting of QAbstractAnimationJob and related classes.Friedemann Kleint2015-04-022-3/+4
| | | | | | | | | | | - Output the state. - Add output to QQuickAnimatorJob. - Add a private export to the debug operator for use by QQuickAnimatorProxyJob to format its contained job. Task-number: QTBUG-45220 Change-Id: Ic64bb5d949864de1c4fb322d53acc3e253977e5d Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Update copyright headersJani Heikkinen2015-02-1213-89/+89
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Update license headers and add new licensesJani Heikkinen2014-08-2513-245/+141
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Avoid eventloop recursion in touch event handling.Gunnar Sletta2014-07-312-1/+5
| | | | | | | | | | | | | | | | | | The eventloop recursion in the threaded render loop was there to preempt any pending event to make sure we worked with as recent as possible input events. The benefit of this was never verified. The recursion after the actual flush was to fix animations which were constantly started during touch events, such as a behavior tracking the mouse point. This is fixed differently. Event loop recursion is always dangerous, so we're doing what we can to avoid it. Change-Id: I120b2e98350e3b9068153415a671408773fbc769 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Append the start time of the current loop to the animation time.Gunnar Sletta2014-04-241-1/+1
| | | | | | | | | currentTime() uses the total time, so when we use only the loop-local time for the child animations, normal animations will seem to have terminated long ago (on the previous loop). Change-Id: I80a229f40a99569014d8082d153ad579c09fb9db Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Reset loop counters when animations are started.Gunnar Sletta2014-04-242-1/+4
| | | | | | | | | | Where normal animations would derive the current loop from the current time, uncontrolled animations use an iterative approach and which was not reset when an animation was restarted or a parent had a loop around it. Change-Id: Ia7a1880c8b7578463dff4c5ddeab48324bcb32ee Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix sequential animations with uncontrolled looped children.Gunnar Sletta2014-04-241-2/+6
| | | | | | | | | An animation needs to be through all its loop cycles or explicitly stopped before we can consider it finished. Task-number: QTBUG-37246 Change-Id: Ia30b27448ec7a1e0d2dd8165575b8a7105caae8d Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix nested parallel/sequential animations combined with animators.Gunnar Sletta2014-04-241-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | The logic for looping uncontrolled animations in QAbstractAnimationJob::setCurrentTime assumes that uncontrolled animations return duration == -1, always. The logic falls apart when a duration gets set while the animation is running. To rememdy this, update QParallelAnimation's duration to return -1 for this case. This is also how the sequential group's duration is implemented so these are now using the same pattern. Update the logic in parallel animations to flush previous loops in updateAnimationsTime to handle the case where duration is -1. This solves the case where we have for instance: ParallelAnimation Sequential YAnimator: duration: 1000 ScriptAction ... Sequential Pause duration: 5000 <--- longer than yanimator ScriptAction ... Task-number: QTBUG-37246 Change-Id: I7a1ea547b2f3090feb8b1e87aa7ca746151736fa Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Support dumping of animation jobs via QML_ANIMATION_TICK_DUMP.Michael Brasser2014-04-0812-0/+72
| | | | | Change-Id: I0b444321667691be3e1037164d02f29ed4dfc13e Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Don't start continuing animation when it doesn't have children.Gunnar Sletta2014-04-071-2/+5
| | | | | | | If we did, it would never stop. Change-Id: Ie9d8f1731f6fa555f8dd6a56d6967a8f8f19a9f4 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Stop the animation driver when no animations are ticking.Gunnar Sletta2014-04-041-1/+2
| | | | | | | | | | | | | | | | | When animations were registered we made a queued connection to 'startAnimations' to start the animation driver and also set the 'startAnimationPending' state to true. In 'stopTimer' we aborted if 'startAnimationPending' was true, presumeably to avoid stopping just to restart shortly after. However, if an animation is registered which triggers the invoke and then is immediately removed again, 'startAnimationPending' will be true with no pending animations at the time of 'stopTimer'. As a result, the driver would not stop and the system would continue animating and trying to render. Change-Id: Icbb01d7129c3a1bddef08a9f2a7aee957e3d2909 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Don't crash if a ScriptAction changes state mid-transition.Michael Brasser2014-03-131-14/+15
| | | | | Change-Id: Ia85cb128c7410e2276bf4da02f946d3d0bf44989 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Make SmoothedAnimation and SpringAnimation smoothly transition again.Michael Brasser2014-02-205-9/+194
| | | | | | | | | Fix regression introduced in Qt 5.0 when animation backend was rewritten. Task-number: QTBUG-36709 Change-Id: Ib8caa4bc6a38e3bb4c1d1d3961f775fdd2b342c7 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Fix various compiler warnings in order to remove warn_off in the near futureErik Verbruggen2013-11-041-1/+1
| | | | | Change-Id: Ic0492fbe31a1e134674bc6c20381f735dd6d5b7a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Support looping for "uncontrolled animations".Gunnar Sletta2013-09-265-29/+101
| | | | | | | | | | The render thread animations rely heavily on uncontrolled animations, meaning animations with duration=-1. We support this by adding a m_currentLoopStartTime and incrementally counting the finish time of each uncontrolled animation. Change-Id: I1f2ccea09aff4c51b1a7f98a2ddb58636af50557 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Animators - Render thread animation systemGunnar Sletta2013-09-212-0/+8
| | | | | | | | | | | | This introduces 6 new QML types for animating state in the scene graph when the UI thread is blocked. The QObject property being animated is updated after the animation completes. It works also with the "windows" and "basic" render loops, but offer litte benefit then compared to in the "threaded" case. Change-Id: Ic19e47c898c0b8bd53e457db922b3c9c457c8147 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Animations: Avoid accessing invalid memory if stop() triggers deletionKai Koehne2013-05-291-2/+2
| | | | | | | | | Return immediately if calling stop() results in the current object being deleted. Task-number: QTBUG-31247 Change-Id: I684a858bfb4cc53f415daa8cc1c4df96067daa1c Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-285-20/+0
| | | | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Ia07e99676e0134fde5e32880edb95e57c779a7ff Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1011-11/+11
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Do not crash on some animation changesAlbert Astals Cid2012-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stop() might end up deleting the animationjob object so wrap the call with a RETURN_IF_DELETED Fixes valgrind complaining ==18380== Invalid read of size 1 ==18380== at 0x5530B24: QAbstractAnimationJob::setCurrentTime(int) (in /home/tsdgeos/qt5/qtdeclarative/lib/libQt5Qml.so.5.0.0) ==18380== by 0x5530BDE: QQmlAnimationTimer::updateAnimationsTime(long long) (in /home/tsdgeos/qt5/qtdeclarative/lib/libQt5Qml.so.5.0.0) ==18380== by 0x65C05DC: QUnifiedTimer::updateAnimationTimers(long long) (in /home/tsdgeos/qt5/qtbase/lib/libQt5Core.so.5.0.0) ==18380== by 0x65C10E3: QAnimationDriver::advanceAnimation(long long) (in /home/tsdgeos/qt5/qtbase/lib/libQt5Core.so.5.0.0) ==18380== by 0x5047DB9: QQuickRenderThreadSingleContextWindowManager::event(QEvent*) (qquickthreadedwindowmanager.cpp:588) ==18380== by 0x58D7F9B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /home/tsdgeos/qt5/qtbase/lib/libQt5Widgets.so.5.0.0) ==18380== by 0x58DB364: QApplication::notify(QObject*, QEvent*) (in /home/tsdgeos/qt5/qtbase/lib/libQt5Widgets.so.5.0.0) ==18380== by 0x6756B9D: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /home/tsdgeos/qt5/qtbase/lib/libQt5Core.so.5.0.0) ==18380== by 0x6758855: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in /home/tsdgeos/qt5/qtbase/lib/libQt5Core.so.5.0.0) ==18380== by 0x679E7C2: postEventSourceDispatch(_GSource*, int (*)(void*), void*) (in /home/tsdgeos/qt5/qtbase/lib/libQt5Core.so.5.0.0) ==18380== by 0x85B7AB4: g_main_context_dispatch (gmain.c:2715) ==18380== by 0x85B7DE7: g_main_context_iterate.isra.24 (gmain.c:3290) ==18380== Address 0x1642bd48 is 88 bytes inside a block of size 128 free'd ==18380== at 0x4C2A44B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==18380== by 0x4F0728B: QQuickBehavior::write(QVariant const&) (qquickbehavior.cpp:210) ==18380== by 0x53EB0FE: QQmlVMEMetaObject::metaCall(QMetaObject::Call, int, void**) (in /home/tsdgeos/qt5/qtdeclarative/lib/libQt5Qml.so.5.0.0) ==18380== by 0x54FEA08: StoreProperty(QV8Engine*, QObject*, QQmlPropertyData*, v8::Handle<v8::Value>) (in /home/tsdgeos/qt5/qtdeclarative/lib/libQt5Qml.so.5.0.0) ==18380== by 0x79ED2CE: v8::internal::JSObject::SetPropertyWithCallback(v8::internal::Object*, v8::internal::String*, v8::internal::Object*, v8::internal::JSObject*, v8::internal::StrictModeFlag) (in /home/tsdgeos/qt5/qtjsbackend/lib/libQt5V8.so.5.0.0) ==18380== by 0x7A0AE71: v8::internal::JSObject::SetPropertyForResult(v8::internal::LookupResult*, v8::internal::String*, v8::internal::Object*, PropertyAttributes, v8::internal::StrictModeFlag) (in /home/tsdgeos/qt5/qtjsbackend/lib/libQt5V8.so.5.0.0) ==18380== by 0x7A0B2D8: v8::internal::JSReceiver::SetProperty(v8::internal::String*, v8::internal::Object*, PropertyAttributes, v8::internal::StrictModeFlag, bool) (in /home/tsdgeos/qt5/qtjsbackend/lib/libQt5V8.so.5.0.0) ==18380== by 0x79A8861: v8::internal::StoreIC::Store(v8::internal::InlineCacheState, v8::internal::StrictModeFlag, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::String>, v8::internal::Handle<v8::internal::Object>) (in /home/tsdgeos/qt5/qtjsbackend/lib/libQt5V8.so.5.0.0) ==18380== by 0x79A8DF0: v8::internal::StoreIC_Miss(v8::internal::Arguments, v8::internal::Isolate*) (in /home/tsdgeos/qt5/qtjsbackend/lib/libQt5V8.so.5.0.0) ==18380== by 0x24E8BD20618D: ??? ==18380== by 0x24E8BD237AC9: ??? ==18380== by 0x24E8BD2249E6: ??? Change-Id: Idcb195206d344bb526ee37f9172a6b3c029540db Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Add designer support for animations and componentCompleteMarco Bubke2012-11-221-1/+12
| | | | | | | | | In the designer animations confuse users, if you change a state or move a item around. Also component complete is called later by the designer. The call in the VME is to early. Change-Id: I49aa04edbc49fb44ddb7b52062307982865efd7e Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* Remove stale QT_MODULE() usage casesSergio Ahumada2012-10-295-10/+0
| | | | | | | | As of Qt5, this macro is defined to be empty; simply get rid of these leftovers. Change-Id: Ib3a8e8eae98e2839c3db4bf34be8dcf43f49af11 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fixed missing virtual destructors in qtdeclarative.Samuel Rødal2012-09-242-1/+6
| | | | | | Change-Id: I0b0e63b572617a56874e27361479de2690644aa3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2311-265/+265
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Avoid using previously declared variablesCharles Yin2012-05-291-3/+3
| | | | | Change-Id: Ia4ba88bef012cee7329244adf10c219bd763a936 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Avoid using previously declared variablesCharles Yin2012-05-291-2/+2
| | | | | Change-Id: Ie2f003cacc99fda00b666ed194cb044a7ee3faf1 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add more RETURN_IF_DELETED checking in animation codeCharles Yin2012-05-251-1/+1
| | | | | Change-Id: I5f77cdc7a6bede547119b2a0b59b41d27cfc401a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Only preallocate 1 change listener per animation instanceCharles Yin2012-05-231-1/+1
| | | | | | | | In most cases, only one animation change listener is added to animation instance, so change QPODVector's Increment parameter from 4 to 1 can save 24 bytes (8 bytes for each listener) per animation instance. Change-Id: Iaf50016899963689f2bf84c3dd14fcd05c306d21 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add completeToBeginning()/completeToEnd() to animation controllerCharles Yin2012-05-232-5/+38
| | | | | Change-Id: I1abac96754cc82c8e0e00c58a27c09b68c5075c1 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Remove unnecessary exportsMatthew Vogt2012-05-185-7/+7
| | | | | | | | | Reduce library load time by removing any exports which are not required by existing clients. Task-number: QTBUG-24768 Change-Id: Ia5754d6f97bb2ed46e290820a5b092f85a4bc5b0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* More defense programming in animation codeCharles Yin2012-05-171-2/+5
| | | | | | | | 1. Add more deletion checkings in animation job code 2. Add some more asserts Change-Id: I34772792ea4638b61eb2c3d65da5d35ce75183d7 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add a new running property to QQuickTransitionCharles Yin2012-04-162-2/+0
| | | | | | | | | | | This read only property can be used to track the transition running state. As all animation items inside a Transition item are just animation defination templetes, so their running properties won't be updated during the transition animations running, which makes it hard to know the current running state of a transition animation. Change-Id: If7fc0616ba384abc6bf2da67c7c639430c3d8fb9 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Rewrite QAnimationGroupJob::clear() methodCharles Yin2012-04-051-5/+11
| | | | | | | | Before removing and deleting children, set the m_group to 0 to avoid potential cycling deletions when this method is called from QAnimationGroupJob::~QAnimationGroupJob(). Change-Id: Idb6920be71fc9e033e5a76b724c9550018995035 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* More refactoring on animation controllerCharles Yin2012-03-132-9/+40
| | | | | | | | | Add a flag and helper functions for disabling user control in QAbstractAnimationJob class and make it synchronized with QDeclarativeAnimation class's disableUserControl flag. Change-Id: Ifa84ab0c78291941469c33f2cafe5f61ee718b2c Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Return early if animationjob was deleted in all callback methods.Charles Yin2012-03-121-6/+9
| | | | | Change-Id: I703c8a8904ffd760683de4ee74544dff9eb53144 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-2412-0/+2059
Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>