aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types/qqmlbind_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Restructure builtins and QtQml.BaseUlf Hermann12 days1-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QtQml library should hold the builtins and provide no plugin. Move the types currently exposed in QtQml.Base to QtQml where it makes sense. Anonymous object types as well as sequence types and value types can well be exposed as builtins. This makes everybody's life easier since you now can universally depend on their availability. The Qt object, despite being a named object type, also becomes a builtin because you always have the "Qt" member of the JavaScript global object which holds the same thing. So, formally exposing "Qt" as builtin doesn't really add anything new. QQmlLoggingCategory is split up into two classes, not only because we need the base class when printing to the console from QtQml, but also because this paves the way for compile time identification of logging categories as first argument to the console methods. For QQmlLocale we have to refer to a different trick. The value type and the QQmlLocale "namespace" have to be builtins, but the "Locale" name, due to being uppercase and versioned, has to be part of QtQml. We transform QQmlLocale into a struct so that we can inherit the enums from QLocale and extend a namespace with it in QtQml. Pick-to: 6.8 Fixes: QTBUG-119473 Fixes: QTBUG-125765 Change-Id: Ica59390e54c473e33b4315f4384b724c870c1062 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove the use of Q_QML_PRIVATE_EXPORTAlexey Edelev2024-01-111-1/+1
| | | | | | Task-number: QTBUG-117983 Change-Id: I5790f01d614cd70c7fcc9bd817ec6ace3f3e3730 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove all QML_DECLARE_TYPE from src and toolsUlf Hermann2023-11-181-2/+0
| | | | | | | | They are generally not useful for anything. Change-Id: I12e959ce9338e6eb7465633496c7921fa09a3fe8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@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>
* Allow Generalized group properties in BindingUlf Hermann2021-11-091-0/+1
| | | | | Change-Id: Ib3f663859be84aced383581c0874e7f7f1c0d2f7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make QQmlBind::value a QVariant againUlf Hermann2021-10-221-3/+3
| | | | | | | | | | | This partially reverts commit 00f903f3b4cd46ddf8361876401e5405030f97f1. We don't need the QJSValue to protect against magic conversions anymore since magic conversions have been removed in commit 1b7a098803a43355abf62e099267d4a122645e07. Change-Id: I3e60d8562d409144cdb921060c2736b1f8278e2b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Fix life cycle methods for some QML-exposed typesUlf Hermann2021-07-141-1/+0
| | | | | | | | | Follow the rule of 5: Drop empty dtors, and add Q_DISABLE_COPY_MOVE where we do need an explicit dtor. Change-Id: Icbb9d87e1087c69b1cf1f18062a496c148935783 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Re-order some includesUlf Hermann2021-07-131-1/+1
| | | | | | | | | | The semi-private headers of QML-exposed types should follow our conventions regarding include formatting. Change-Id: I224603d37ea5debcfad258b1e14907b40328c8f6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Privately export all QML-exposed typesUlf Hermann2021-07-131-1/+2
| | | | | | | | We need to be able to access them from C++. Pick-to: 6.2 Change-Id: I2b7b823cbb36866240d194e877a3dd49f5d2f350 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add major version to all Q_REVISIONsUlf Hermann2020-02-191-2/+3
| | | | | Change-Id: Id72fbe10c16de61bd847773d0055d83cfe03f63c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-101-0/+3
|\ | | | | | | Change-Id: I2835748c27616103f275849141fbe5a93e3dfd8c
| * Output a message when changing the target of a Binding from elsewhereUlf Hermann2019-10-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly created Binding elements should not be silently disabled when writing their target property. That would be rather confusing. Instead, the binding stays active and updates the target property again on the next change. This behavior is still somewhat confusing. Therefore, if the qt.qml.binding.removal logging category is enabled, output a helpful message. Fixes: QTBUG-78566 Change-Id: Idcd8e51e1cd7eaf78d70b15f065fd9159521ff20 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-081-3/+3
|\| | | | | | | Change-Id: Ib381f350ada365747ce20b989bfdc368d75f2219
| * QML Binding: do not convert stringsFabian Kosmale2019-10-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The root cause for the issue is that QQmlObjectCreator::setPropertyValue calls QQmlStringConverters::variantFromString on strings if the property is of type QVariant. Unfortunately, this cannot be changed easily as the current behavior is explicitly documented and tested in tst_qqmllanguage, thus making it a breaking change. As a workaround, QML Binding does now take a QJSValue instead of a QVariant (making value a var property), which does not trigger the conversion path. Fixes: QTBUG-78943 Change-Id: I0b64dffdb6b84b2bab2bb85a8cb263e530c18570 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Specify parameters of type registration in class declarationsUlf Hermann2019-09-261-0/+1
|/ | | | | | | | | | | | | | | | | | | | | Using this technique we can automatically register all necessary revisions and minor versions of a type, using the metaobject system. This greatly reduces the potential for mistakes and resulting incompatibilities between versions of imports. We assume that for each type we need to register all revisions of its super types and its attached type, and that the revisions match. That is, if you import version X of type A, you will also get version X of its attached type and of any super types. As we previously didn't take these dependencies into account when manually registering the types, a number of extra revisions are now registered for some types. Potentially, we can now generate the qmltypes files at compile time, using moc. Change-Id: I7abb8a5c39f5e63ad1a0cb41a783f2c91909491b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Restore value bindings when disabling a Binding elementErik Verbruggen2019-05-171-0/+18
| | | | | | | | | | | | | | We previously only restored script bindings that were replaced by a Binding. Now we handle both. [ChangeLog] QML Binding elements now support restoring previous values of the bound property when the binding is disabled. This will be the default behavior in Qt 5.15. Reliance on the old behavior of only restoring binding, not literal values results in a warning now. Fixes: QTBUG-33444 Change-Id: I833403b0645c08eee486fbd4acf5d3c7de2ef73a Reviewed-by: Michael Brasser <michael.brasser@live.com>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-1/+1
| | | | | | | | | | | | | 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>
* Qml: add missing 'override'Anton Kudryavtsev2016-10-071-3/+3
| | | | | | | ... and drop redundant 'virtual' Change-Id: Ib1f68c1ebd0468cb4a77eecc986bbf718f6bf789 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add delayed property to Binding.Michael Brasser2016-04-081-0/+5
| | | | | | | | | | Provide a way to avoid potentially expensive or unexpected intermediate values. [ChangeLog][Binding] Add delayed property to Binding as a way to avoid potentially expensive or unexpected intermediate values. Change-Id: I6aaca570859cc1344eeb9c9f19f32660e8c0b4e0 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* 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>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-061-0/+11
| | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.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>
* Move QML types to types folderAlan Alpert2013-03-141-0/+92
The QtQml module has gain a bunch of QML types cluttering up the qml folder. Moving them to types organizes them a bit better. Change-Id: I570884c00f4abc48f4f1aea048bf002bc70223f3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>