aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlproperty.h
Commit message (Collapse)AuthorAgeFilesLines
* qml: silence -Wextra-semiTim Blechmann2022-11-161-1/+1
| | | | | | | | | silence gcc's -Wextra-semi. the private headers are pulled in via the type compiler Pick-to: 6.4 Change-Id: I5291d007c379f522c2dae9d814c4f4cc6a7d118a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-111-38/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QtDeclarative: replace qSwap with std::swap/member-swap where possibleMarc Mutz2022-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | qSwap() is a monster that looks for ADL overloads of swap() and also detects the noexcept of the wrapped swap() function, so it should only be used when the argument type is unknown. In the vast majority of cases, the type is known to be efficiently std::swap()able or to have a member-swap. Call either of these. For the common case of pointer types, circumvent the expensive trait checks on std::swap() by using our hand-rolled qt_ptr_swap() template, the advantage being that it can be unconditionally noexcept, removing all type traits instantiations. In QQmlPropertyCacheAliasCreator, replace the qSwap() with std::move(). Task-number: QTBUG-97601 Pick-to: 6.3 6.2 5.15 Change-Id: I8b78a3ad287ce8565ca258ff38261e4d2cf0be63 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* qqmlproperty: avoid reliance on transitive includesFabian Kosmale2022-02-141-0/+2
| | | | | Change-Id: I81bc3c0ba714635fada67fec3769af1dcb736a5d Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Fix life cycle methods of various types related to QQmlBindUlf Hermann2021-11-121-1/+5
| | | | | | | | | | | Code checker complains about the absence of move ctors and operators. While we're at it, make ctors default where possible, do not use const rvalue refs, add noexcept where possible, properly disable moving and copying of QQmlBindEntryContent, and inline the null check of QV4::PersistentValueStorage::free(). Change-Id: I11b6511f39f3d84479dbacee7f3e3552a5fb2b5a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Un-special case QQmlPropertyValueTypeFabian Kosmale2021-03-311-0/+7
| | | | | Change-Id: I5123f72fea4198505c27678dbaaea26313b2327c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlProperty: add method to query bindabilityFabian Kosmale2021-03-041-0/+1
| | | | | | | | | Internal for now. Task-number: QTBUG-91000 Change-Id: I744277426d5038de9266ca0adf7d281230fb4a7c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPEAndreas Buhr2020-12-161-1/+1
| | | | | | | | | | | | | Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with move semantics, its name is misleading. Q_RELOCATABLE_TYPE was introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE in QtDeclarative. As the two are synonymous, this patch should have no impact on users. Task-number: QTBUG-86829 Change-Id: I5bb418483a3b06619abb4ff62cf0290a7b3bcd4f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Use QMetaType instead of metatype-id, take 2Fabian Kosmale2020-12-031-0/+1
| | | | | | | | | This time, the ValueTypeFactory gets converted. As a consequence, many callers get touched again. Task-number: QTBUG-88766 Change-Id: I3a8b7d5cfeb7fac85daf1702febba205971d4256 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlPropery: Add seed to qHashFabian Kosmale2020-11-111-2/+2
| | | | | | | | As a driveby, enhance the hash function's properties by using qHashMulti. Change-Id: Id8add6047530f07ed44f50f46ffe68bb563fdd6b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Change qHash return value to size_tFabian Kosmale2020-04-161-1/+1
| | | | | | | | Else on Windows there's a warning: conversion from 'size_t' to 'uint', possible loss of data Change-Id: Ifed4899409a13fed31c206ae1e0f195280ee2925 Reviewed-by: Mitch Curtis <mitch.curtis@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>
* 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>
* 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>
* fix whitespaceOswald Buddenhagen2014-01-221-1/+1
| | | | | | | remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-281-4/+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-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Make static QQmlProperty::read() take a const QObject pointer.Andreas Hartmetz2012-11-301-3/+3
| | | | | | | | | | | It uses the QObject in a non-const, but still logically const, way internally. Given that the compiler disregards const for code generation and that the QObject won't change in any way observable from the outside, that should not be a problem. Task-number: QTBUG-28258 Change-Id: I1a852a2597eb2ff05b421e8024e70e7ac5299627 Reviewed-by: Alan Alpert <aalpert@rim.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>
* Declare QQmlError and QQmlProperty as movable types.Andrew den Exter2012-03-131-0/+2
| | | | | | | | | Allows QList among others to use a more optimal allocation strategy for these types. Change-Id: I0a27291cae6d79d9dfc3548da7b3d4e5bc84cce8 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-0/+143
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>