aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcontext.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused QQmlRefCount forward declarationsMarc Mutz2023-06-231-1/+0
| | | | | | | | It's a private class, there's no point in fwd-declaring it in public headers. Pick-to: 6.6 6.5 Change-Id: I1908d900e629df945dc23203fe0037a06ec40bfb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlContext: Don't redeclare metatype for QList<QObject *>Ievgenii Meshcheriakov2022-06-181-2/+0
| | | | | | | | | | | Metatypes for QList's of registered types are automatically declared by Qt already. Redeclaring such metatypes may cause problems when building source core that uses such metatypes in headers processed by moc. Fixes: QTBUG-102965 Pick-to: 6.2 6.3 6.4 Change-Id: I2b29792b949cd3d6fefd3d9a916c8a800208e722 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>
* Provide an objectForName() function in QQmlContextUlf Hermann2021-04-161-0/+1
| | | | | | | | This is the reverse of nameForObject(). We don't need to wrap id'd objects in QVariant just to unwrap them again at the call site. Change-Id: Ie1c5382af33b5c05b0b931fcc5bcf8d232d27c21 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Allow retrieving an imported script from a QML contextUlf Hermann2020-11-251-0/+2
| | | | | | | | | This way you can access the properties or call functions provided by the imported script from C++. Previously there was no way to get to them via public API from outside of QML/JS. Change-Id: Ia7813ef6fbec81898c302809118c31f9dcf0f95e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use QList instead of QVectorJarek Kobus2020-06-251-1/+1
| | | | | | Task-number: QTBUG-84469 Change-Id: I4c3353c00a566023503fbc178ba8454391dc334c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix QQmlContext::nameForObject Qt 6 todoFabian Kosmale2020-06-201-2/+1
| | | | | Change-Id: I41949ea39a84c58ab261688b431f62ce864f49e2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Make QQmlContext::resolveUrl() constUlf Hermann2020-06-161-1/+1
| | | | | | | It doesn't modify anything. Change-Id: If289873415eb5a0483ca49b34abfac6be9a9e2e5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Encapsulate QQmlContextDataUlf Hermann2020-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class is not a private detail of QQmlContext. And it is incredibly hard to see who owns what in there. Let's add some civilization ... We enforce refcounting for QQmlContextData across the code base, with two exceptions: 1. QQmlContextPrivate may or may not own its QQmlContextData. 2. We may request a QQmlContextData owned by its parent QQmlContextData. For these two cases we keep flags in QQmlContextData and when the respective field (m_parent or m_publicContext) is reset, we release() once. Furthermore, QQmlContextData and QQmlGuardedContextData are moved to their own files, in order to de-spaghettify qqmlcontext_p.h and qqmlcontext.cpp. When the QQmlEngine is deleted, any QQmlComponents drop their object creators now, in order to release any context data held by those. Before, the context data would be deleted, but the object creators would retain the dangling pointer. [ChangeLog][QML][Important Behavior Changes] QQmlContext::baseUrl() does what the documentation says now: It prefers explicitly set baseUrls over compilation unit URLs. Only if no baseUrl is set, the CU's URL is returned. It used to prefer the CU's URL. Change-Id: Ieeb5dcb07b45d891526191321386d5443b8f5738 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* use the override keyword consistently and correctly (clang-tidy)Shawn Rutledge2018-02-271-1/+1
| | | | | Change-Id: If9e28d143f8cba3df3c757476b4f2265e2eb8b2a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Add setContextProperties()Thomas Hartmann2018-01-121-0/+5
| | | | | | | | | | | | | | Setting all properties in one batch avoids unnecessary refreshing of expressions and is therefore a lot faster if there are many expressions in the context. In an example I created it takes 500ms to set 10 context properties using setContextProperty() and it takes about 150ms to set the context properties using setContextProperties. Change-Id: Ic7cf03cda292b316198f37f963b61a2388a288c9 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Replace Q_NULLPTR with nullptrKevin Funk2017-09-271-2/+2
| | | | | Change-Id: I0c01862dbb475494c84e39c695cb563df8cbcfa8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-071-2/+2
|\ | | | | | | Change-Id: Icfa1d61fcc286c3418d4a625de11d2191336fa60
| * Make public headers compile with -Wzero-as-null-pointer-constantMarc Mutz2016-03-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | ... or equivalent. QtBase 5.6 headers already compile that way, so let the other modules follow suit. Task-number: QTBUG-45291 Change-Id: Ied526fb2d7adc3a68946d6843a6bd6f475ebf864 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | 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>
* Document API bug for QQmlContext::nameForObject()Mathias Hasselmann2015-06-051-0/+1
| | | | | | | | QQmlContext::nameForObject() doesn't need a mutable QObject, therefore the QObject argument should be marked as const. Change-Id: Ib3cfe197cb4a615850771ccc303796a6c205873e Reviewed-by: Simon Hausmann <simon.hausmann@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>
* Cleanupsv5.3.0-beta1Simon Hausmann2014-03-211-1/+0
| | | | | | | | | * Get rid of members in QQmlCompiledData that were used by the VME and are now unused * Get rid of QQmlVME friend declarations that are not needed anymore Change-Id: I11b4b6f0b4b0b60edf92a1256be3d0d44d76bbc9 Reviewed-by: Lars Knoll <lars.knoll@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>
* 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>
* Use QQmlAbstractBoundSignal where appropriate.Michael Brasser2012-03-261-1/+0
| | | | | | | Prepare for the addition of another subclass. Change-Id: I340f735503e661d9d735f3316a065f807294921b Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-0/+113
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>