aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickstateoperations.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Small performance improvements suggested by clang-tidyAlbert Astals Cid2019-10-071-6/+6
| | | | | | | | | mostly add const &, a few std::move and in particular case, remove const so the std::move being done over the variable actually has effect Change-Id: Id611cd31bc012f219d7a17d4626b1c2a5fbddd66 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Add missing dots (qtdeclarative)Paul Wicking2018-06-191-2/+2
| | | | | | Task-number: QTBUG-68933 Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-23/+23
| | | | | | | | | | | | | 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>
* Disambiguate QQuickStateActionEvent::overrideKevin Funk2017-09-251-2/+2
| | | | | | | | | | Don't use override as function name, may create confusion with the official override specifier since C++11 Rename method to QQuickStateActionEvent::mayOverride Change-Id: I1f34ec1127cc3e7c529b7e0aa3272fbfed553fa1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use qRadiansToDegrees() more widelyEdward Welbourne2017-03-161-1/+1
| | | | | | | | It documents the meaning of the computation more clearly. Task-number: QTBUG-58083 Change-Id: Ie2d486d1e1919569de5a1565e783703b9b3bc813 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* Port existing qmlInfo callers to qmlWarningRobin Burchell2017-01-111-4/+4
| | | | | | | | | | | | | Now that qmlInfo actually reports info messages, we want to change existing callers to use warning-level messages to preserve the original message level. This was done through: perl -p -i -e "s/qmlInfo\(/qmlWarning\(/" **/*.{cpp,h,qdoc} .. with a little care taken to only add the hunks that should be changed. Change-Id: I511cee11ce0a26ec1048cd2b84c7536b812a0d89 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Quick: mark some methods as constAnton Kudryavtsev2016-10-121-4/+4
| | | | | | | These methods do not modify objects. Change-Id: Ibb2622cad6fbcec31c785f5d032304c648372350 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QML: Specialize bindings based on target property type.Erik Verbruggen2016-06-271-13/+13
| | | | | | | | | | | When we can determine the type of a target property during type compilation, we can skip a whole bunch of code that deals with converting the result of a binding to the correct (target) type. This removes 65 instructions on x86 for such typed bindings. Change-Id: Id2c7c57b9ae6dfbeb921121beae9630604ca1d17 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | 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>
* Get rid of QQuickStateActionEvent::ReasonLars Knoll2015-06-101-20/+4
| | | | | | | | This doesn't do anything useful anymore afaict now that bindings are refcounted. Change-Id: I829facaa1bd463f90653a4190f08f8d04f31a6a4 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Make bindings refcountedLars Knoll2015-06-101-115/+66
| | | | | | | | | | | Refcounting our bindings greatly simplifies our memory management of the objects and ensures we safely clean them all up. In addition, it allows us to remove the m_mePtr and weak reference handling from QQmlAbstractBinding as we can safely handle this through the same mechanism. Change-Id: If23ebc8be276096146952b0008b62018f5d57faf Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Get rid of QQmlBinding::property()Lars Knoll2015-04-271-14/+14
| | | | | | | The method is slow and not required anymore Change-Id: I8c2bc6eeedbd15b901b60aa08408fe8c32a81707 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Make removal of bindings explicitLars Knoll2015-04-251-21/+21
| | | | | | | This simplifies the code for further refactoring. Change-Id: I6bcb5ce397f642242af80ce37dc8bba1fa9bf3f5 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Cleanup math function includes and usageAllan Sandfeld Jensen2015-02-191-1/+1
| | | | | | | | Use std::math on floats and doubles, and qMath on qreals, and only include the math headers actually needed. Change-Id: I1d511d7b1bac0050eaa947c7baee760b736858bf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Update copyright headersJani Heikkinen2015-02-121-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. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Add null check for target as wellHolger Hans Peter Freyther2015-01-141-1/+1
| | | | | | | | | | I couldn't see any documentation for the implication that if stackBefore is set then target must not be null. Coverity didn't find that implication either. Change-Id: Ifb93aa4c1e40f417033057b9a403d368dfdf0ba8 Fixes: Coverity CID 10627 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - 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>
* QtQuick docs: add missing \qmlpropertygroup commandsJ-P Nurmi2013-12-201-0/+1
| | | | | | | "warning: No QML property group command found; using..." Change-Id: Iafbdbc09cbd76bf81a5baf3a5a4fab843778b5cb Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Remane private QQuickAction into QQuickStateActionGabriel de Dietrich2013-10-031-25/+25
| | | | | | | | | | | This avoid symbol conflicts when statically linking with Qt Quick Controls, that has its own QQuickAction class and which may become public some day. (QQuickPropertyAction might be a more apt name, but it's already taken). Change-Id: Ia9514d63d38295603a89d8ec5a88815a651380f7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* qdoc: no longer recognizes the version nr in QML refsMartin Smith2013-10-021-16/+16
| | | | | | | | | | All QML references of the form <QML-module-name><QML-module-version>::<QML-type>::<member-name> have had the <QML-module-version> removed i. Task-number: QTBUG-33776 Change-Id: Idde279e0f254cd24ea44f9841662dd81a2c5bbc6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Fixed and updated Qt Quick's \qmlmodule pageJerome Pasion2013-09-251-2/+2
| | | | | | | | | | | -incremented version to Qt Quick 2.2 (in \qmlmodule page) -import changed to QtQuick 2.2 -\inqmlmodule no longer needs the version. QDoc will ignore the version but it is better to remove it now to avoid confusion Task-number: QTBUG-32172 Change-Id: I40b52e59667014720be40a35b3a8fb9836825e31 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Get rid of the first half of QQmlGuard usageLars Knoll2013-07-051-3/+3
| | | | | | | | | QQmlGuard was being used as a more performant replacement for QPointer. QPointer got now fixed in Qt 5.0, making this class obsolete. Change-Id: I77eef066c4823af4b074ef32d4d78dbd67c36cd0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Renamed QQuickItem::pos property to positionShawn Rutledge2012-11-291-1/+1
| | | | | | | | | Abbreviated property names are less descriptive so we don't have many of them. Might as well be consistent. QWindow::pos was already renamed. Change-Id: Ib52673e68e7dc902b2f8942dba6b899074b2538b Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix potential memory leak in AnchorChanges.Michael Brasser2012-08-271-1/+42
| | | | | | Task-number: QTBUG-24708 Change-Id: I4e24b3859f3881ebea4780872b7e4f3790e42d54 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Fix uses of various qml doc commandsBea Lam2012-08-081-16/+16
| | | | | | | | | | | | | | Signals documented with \qmlsignal should indicate handler name, i.e. 'onSignal' rather than 'signal'. Methods documented with \qmlmethod do not need to document 'void' return values. Also the name of any documented attribute should be qualified with 'QtQuick2::<qmltype>'. Change-Id: I206dd9e8f39c3b84e029ae9d4101b05d0bfb3478 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Make QQmlScriptString opaque.Michael Brasser2012-08-031-32/+26
| | | | | | | | Allow for future optimization by encapsulating the raw script data. Change-Id: I1863103e8e6d74ede60593cabb240e16f2ae657e Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Doc: Changed \qmlclass to \qmltype and added \instantiates.Jerome Pasion2012-07-301-2/+4
| | | | | | | | | | -To simplify QDoc, \qmlclass is now \qmltype. -'\instantiates <C+++ class>' is for the types that are defined in C++. Change-Id: I29242d33daf7b972d8b86a356b9689638866b950 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Change Quick docs to refer to "types" rather than "elements"Martin Jones2012-07-161-1/+1
| | | | | | Task-number: QTBUG-24785 Change-Id: I223479b879514abaacb123852323c1cfada7a5e1 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Remove dead code.Michael Brasser2012-06-291-50/+1
| | | | | Change-Id: I2e206d746cc48ff7bab29b2135d03b70f85e39d6 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Doc: Grouped Qt Quick types into several groupsJerome Pasion2012-06-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -created new groups and converted some overviews into group pages -edited type documentation and added \ingroup -articles still need title fixes and link fixes Groups: qtquick-visual-types qtquick-item-graphics qtquick-shaders qtquick-canvas qtquick-text qtquick-text-validator qtquick-interaction qtquick-positioners qtquick-transformations qtquick-states qtquick-animation-define qtquick-animation-properties qtquick-animation-control qtquick-animation-modifiers qtquick-images-sprites qtquick-images qtquick-models qtquick-containers qtquick-views qtquick-paths qtquick-utility Task: QTBUG-25685 Change-Id: I81d4df3320bf5daad5cabb5e42408013fb24f464 Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fix doc snippets paths and parsing errorsBea Lam2012-05-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtqml.qdocconf and qtquick.qdocconf now refer to the correct snippets and source directories. Snippet paths in .qdoc and .cpp files have been updated to refer to the new shortened path references, e.g. \snippet qml/file.cpp instead of \snippet doc/src/snippets/qml/file.cpp. This also deletes snippets from src/qml/doc/snippets that belonged under src/quick/doc/snippets (and were already duplicated there anyway) and restores some snippet files that shouldn't have been deleted. Also fixes some inline snippets to use \code .. \endcode instead of \qml .. \endqml as they contained javascript or partial QML snippets that were causing parsing errors from qdoc. There are still snippet errors arising from qmlintro.qdoc as the qmlintro snippets directory that it refers to cannot be located. There are also two references to a removed snippet identifier in examples/qml/cppextensions/plugins/plugin.cpp that need to be fixed in conjunction with the related docs in a later commit as the relevant code has changed and the docs are now invalid. Task-number: QTBUG-25721 Change-Id: I50c665245a74c140470c58a32546591d187dfe4b Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Doc: Sanitized QML typesNico Vertriest2012-05-241-2/+2
| | | | | | | | | | -modified \brief -checked QML modules -added qml directory to the qdocconf file -added particles directory to the qdocconf file Change-Id: I589e32d3106cda37c7fa4d55a941afd9876fc2b2 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Doc: Moving Qt Quick docs for new doc structureGeir Vattekar2012-05-091-2/+2
| | | | | | | | | | | | | | | -moved documentation from doc/src/qtquick2 doc/src/localstorage doc/src/particles to src/quick/doc/ -fixed qdocconf file -fixed snippets, images, and other qdoc errors related to the new directories -fixed links in the main Qt Quick page Change-Id: Ie3408c2624f623c17de07e5635d5c7284d02b973 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Document AnchorChanges and ParentChange for QtQuick 2.Michael Brasser2012-04-191-0/+105
| | | | | | | Copied documentation from QtQuick1 module. Change-Id: I871f313b1b24e8b66db04c423bef190274547dfa Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Remove binding dependency on QQmlExpressionAaron Kennedy2012-03-151-6/+6
| | | | | | | | This is the first step to creating much lighter weight bindings that are tuned for the specific scenario in which they're used. Change-Id: Ib985dcff25679b711b5c634bbc891aa7902bf405 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Merge master <-> api_changesMatthew Vogt2012-03-051-2/+1
|\ | | | | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
| * Update item position in parent change atomically.Andrew den Exter2012-03-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Changing x and y individually generates two geometry changed events, the first of which has an invalid position as the x coordinate is relative to the new parent and the y relative to the old parent. This in turn causes the Drag item to send move events with incorrect positions. Task-number: QTBUG-24534 Change-Id: If2636a968acc0fffce21d1a7e51510426ace38a0 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* | Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-179/+179
|/ | | | | | | | | | | | | 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>
* Use an enum rather than a string to represent state event types.Michael Brasser2012-02-201-6/+6
| | | | | Change-Id: Iad230b610f35b1c1faa6ce60615551f293d4745d Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Improve test coverage for AnchorChanges.Michael Brasser2012-02-201-7/+0
| | | | | Change-Id: If6d62febed093a07d75a6125a920aac628c35e54 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Update copyright year in Nokia copyright headers.Jason McDonald2012-01-171-1/+1
| | | | | | | | Update copyright headers from before 2011, and a couple of new ones that were merged after the previous change to copyright headers. Change-Id: Ia76e08e2734afa4ef3f1207dbcda5ff3bc81b366 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Don't access QDeclarativeProperty from bindings as oftenAaron Kennedy2011-12-121-12/+18
| | | | | | | | | Soon QDeclarativeBinding will store the property internally in its constituent parts and construct the QDeclarativeProperty only when it is requested. Change-Id: Id2d7573ffd49aac783737ea6d20aac4e157a9600 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Say hello to QtQuick moduleKent Hansen2011-12-021-0/+1346
This change moves the QtQuick 2 types and C++ API (including SceneGraph) to a new module (AKA library), QtQuick. 99% of this change is moving files from src/declarative to src/quick, and from tests/auto/declarative to tests/auto/qtquick2. The loading of QtQuick 2 ("import QtQuick 2.0") is now delegated to a plugin, src/imports/qtquick2, just like it's done for QtQuick 1. All tools, examples, and tests that use QtQuick C++ API have gotten "QT += quick" or "QT += quick-private" added to their .pro file. A few additional internal QtDeclarative classes had to be exported (via Q_DECLARATIVE_PRIVATE_EXPORT) since they're needed by the QtQuick 2 implementation. The old header locations (e.g. QtDeclarative/qquickitem.h) will still be supported for some time, but will produce compile-time warnings. (To avoid the QtQuick implementation using the compatibility headers (since QtDeclarative's includepath comes first), a few include statements were modified, e.g. from "#include <qsgnode.h>" to "#include <QtQuick/qsgnode.h>".) There's a change in qtbase that automatically adds QtQuick to the module list if QtDeclarative is used. Together with the compatibility headers, this should help reduce the migration pain for existing projects. In theory, simply getting an existing QtDeclarative-based project to compile and link shouldn't require any changes for now -- but porting to the new scheme is of course recommended, and will eventually become mandatory. Task-number: QTBUG-22889 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Change-Id: Ia52be9373172ba2f37e7623231ecb060316c96a7 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>