aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlmodels
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-241-5/+18
|\ | | | | | | Change-Id: I9f0d5adf1ba7d3246b1107a20d145e7aac2c7a77
| * PropertyUpdater: Do not crash on invalid contextFabian Kosmale2020-03-231-2/+5
| | | | | | | | | | | | | | | | | | | | | | If the context is gone, we assume that the object is currently torn down. Therefore we do not print an error message in that case. Fixes: QTBUG-82809 Change-Id: I74e5a4f41490ea9c13639c158a4d5fc0a52a38a4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * QQmlDelegateModel: Don't require a delegate to cancel an incubationUlf Hermann2020-03-231-1/+1
| | | | | | | | | | | | | | | | | | It is actually not needed, and declining to cancel the incubation leaks memory. Change-Id: I478ed2a4eef34bd27c716762a2fced1e9091607c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * QQmlDelegateModel: On deletion, cancel any remaining incubationsUlf Hermann2020-03-231-2/+12
| | | | | | | | | | | | | | | | This fixes the memory leaks from the "x items in the process of being created at engine destruction" situation. Change-Id: I65fe278ead3d4de0cbddc075972a6774b231814f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Encapsulate QQmlContextDataUlf Hermann2020-03-233-29/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Store a QV4::ReturnedValue in QJSValueUlf Hermann2020-03-182-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Being careful, we can now save primitive values inline. We use the heap pointer of QV4::Value as either QString* or QV4::Value* for complex types. We cannot store persistent managed QV4::Value without the double indirection as those need to be allocated in a special place. The generic QVariant case is not supported anymore. The only place where it was actually needed were the stream operators for QJSValue. Those were fundamentally broken: * A managed QJSValue saved and loaded from a stream was converted to a QVariant-type QJSValue * QVariant-type QJSValues were not callable, could not be objects or arrays, or any of the special types. * Cyclic references were forcibly broken when saving to a data stream. In general the support for saving and loading of managed types to/from a data stream was so abysmally bad that we don't lose much by dropping it. [ChangeLog][QML][Important Behavior Changes] When saving a QJSValue to a QDataStream only primitive values or strings will be retained. Support for objects and arrays was incomplete and unreliable already before. It cannot work correctly as we don't necessarily have a JavaScript heap when loading a QJSValue from a stream. Therefore, we don't have a proper place to keep any managed values. Using QVariant to keep them instead is a bad idea because QVariant cannot represent everything a QJSValue can contain. Fixes: QTBUG-75174 Change-Id: I75697670639bca8d4b1668763d7020c4cf871bda Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Merge remote-tracking branch 'origin/wip/cmake' into devAlexandru Croitor2020-03-122-0/+117
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: dependencies.yaml Change-Id: Ifff48b9d0e7962d481e63c49399e2d304e1011e5
| * | CMake: Regenerate and adapt to merge from devwip/cmakeAlexandru Croitor2020-03-121-2/+2
| | | | | | | | | | | | | | | | | | Change-Id: If8daa6152a563d4309d7342414780ef75b9f5589 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
| * | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-03-1222-76/+153
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: dependencies.yaml src/qml/qml/qqmlengine.cpp Change-Id: I6a73fd1064286f4a2232de85c2ce7f80452d4641
| * | | Regenerate qtdeclarativeAlexandru Croitor2020-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I48d7fd306f3d1b161a8e73029282ee591b1ef612 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
| * | | Regenerate projects to handle private deps correctlyAlexandru Croitor2020-02-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ifcbab0407e93dfc35d0459d7d29dee2cd3508a86 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | Post-merge fixesAlexandru Croitor2020-01-301-2/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: I2350df5368ee34d6c7072d456806e518ce533839 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-01-295-19/+21
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: dependencies.yaml Change-Id: Ie3e9dc62031a85e5e81cbdf04694b95159d49fca
| * | | | QML Type Registrar changesLeander Beernaert2020-01-241-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I36254a688f575e6c7f717ee4019e4d49f73a60f7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | Post merge fixesLeander Beernaert2020-01-242-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie8aca222809f35174fb6c6488832ec3ff5432272 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2020-01-1617-337/+430
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Change-Id: I0c5b939c70bdb91ccdf7068784308416dcaa5736
| * | | | | Post Merge FixesLeander Beernaert2019-11-251-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I13bc3aef318d8b497b01c61fcca7760abd96339a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | | | | Merge remote-tracking branch 'origin/dev' into wip/cmakeLeander Beernaert2019-11-2513-2092/+85
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Change-Id: I48b9c2e4f3a75c18470c55f73f2089dc1401de54
| * | | | | | Regenerate all projects with new CMake API versionAlexandru Croitor2019-11-151-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie0db35f674137c229eaf049616f38f8e818f7092 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | | Regenerate projectsAlexandru Croitor2019-11-141-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I38044c382e4d84b5865a19cdd04cc8922bd72a77 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | | Regenerate required projects after dev -> wip/cmake mergeAlexandru Croitor2019-10-142-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic5f1909731ec11b4fb6bc8823506d272c529ecfb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-1438-63/+1643
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed dependencies.yaml because we don't use it yet in wip/cmake. Fixed conflict in qmlcachegen.cpp. Change-Id: Ie1060c737bee1daa85779903598e5b6d5020d922
| * \ \ \ \ \ \ Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-10-112-2/+2
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I4a91928610f79c8e21a05781953ffa41508c828a
| * \ \ \ \ \ \ \ Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-08-153-2/+4
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6f2152aeecaeb8e63fdbc1cdf1444132a054b6f5
| * \ \ \ \ \ \ \ \ Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-07-246-48/+19
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I52b2d17d9334313e4b3d84b52432f2ebc77f7415
| * \ \ \ \ \ \ \ \ \ Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-07-112-3/+52
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2963c1209316fb6755f572969f368970450d7991
| * | | | | | | | | | | Initial CMake portAlexandru Croitor2019-06-032-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Crude port of QtQml, QtQmlModels, QtQuick and a few tests and a few examples. Task-number: QTBUG-74136 Change-Id: I5de4d8215b33d1a4a72c2c0e7951e4b384f27e3e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | | | | | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-112-6/+0
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|_|_|/ / |/| | | | | | | | | | / | | |_|_|_|_|_|_|_|_|/ | |/| | | | | | | | | Change-Id: I0d32fc5b99f8c9e4acb922fffe4dd5f3c5be553c
| * | | | | | | | | | Remove hard-coded notes for 'Corresponding handler' for QML signalsTopi Reinio2020-03-102-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDoc will generate these notes automatically. Task-number: QTBUG-37355 Change-Id: I8ed058ecbbcc630ad0351f6ce167c3fa61936f6f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | | | | | | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-095-7/+31
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmlirbuilder_p.h src/qml/qml/qqmlpropertycachecreator_p.h src/qmltyperegistrar/qmltypesclassdescription.cpp src/qmltyperegistrar/qmltypesclassdescription.h src/qmltyperegistrar/qmltypescreator.cpp src/quick/items/qquicktext_p.h src/quick/util/qquickvaluetypes_p.h Change-Id: Ic209741592e7b85820bf3845722023a190ebc1c5
| * | | | | | | | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-032-1/+21
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qmlmodels/qqmltableinstancemodel.cpp src/qmlmodels/qqmltableinstancemodel_p.h Change-Id: I89339b1cb41ba27fe30c79530859a1c2bfbecc69
| | * | | | | | | | | | QQuickTableView: Immediately delete delegates when possibleUlf Hermann2020-02-282-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the dtor we don't need to care about any side effects a direct delete may have. Rather, any deleteLater() may not take effect anymore as the event loop may be gone already. Task-number: QTBUG-82000 Change-Id: I97935dc47fbbfd0c050e80c333c36a05f685c45d Reviewed-by: Joni Poikelin <joni.poikelin@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * | | | | | | | | | QQmlTableInstanceModel: Fix refcounting of metatypesUlf Hermann2020-02-272-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reusable items pool should only hold unreferenced objects. Therefore, we can immediately delete them when draining. release() is not suitable here because it unconditionally decreases and therefore underflows the refcount. Furthermore, the metatype is also refcounted, which means we should keep it in a QQmlRefCounter in order to not leak references. Task-number: QTBUG-82000 Change-Id: Iefdaaecc34342eb2e3b1e5a3281f2e46ac472347 Reviewed-by: Joni Poikelin <joni.poikelin@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | | | | | | | QQmlDelegateModel: Avoid use-after-freeUlf Hermann2020-02-271-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The iterator may be invalidated by addCacheItem(). We can retrieve the relevant properties before, though. Change-Id: Ia3bbc50d16a7563097239177a75c9e2eab777a33 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | | | | | | | | | Revision properties and methods added in 5.15Ulf Hermann2020-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I00e3f9535e819d9d0d547c9d3cf50be469cf9339 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | | | | | | | | | | Move dependencies.json files into the right placesUlf Hermann2020-02-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The workerscript and models qmltypes are built from the library directory, the testlib qmltypes are built from the plugin directory. Change-Id: Ifc497aaf8204616ca817ee08ad86383ab2cbbdae Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | | | | | | | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-211-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquickmousearea/BLACKLIST Change-Id: I3de2c6377d57f5f9204d2cfc688d50a7a0b4150c
| * | | | | | | | | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-201-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I024445b3401a57040d7d67780ea32d2f8b02f41a
| | * | | | | | | | | | QQmlAdaptorModel: Don't const_cast to call release()Ulf Hermann2020-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | release() is const. Change-Id: I00171af75151741e725cd2ceaa80afcaac4f62a3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | | | | | | | | | | Fix all import versionsUlf Hermann2020-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump all the *.15 versions to QT_VERSION and use QML_IMPORT_VERSION rather than IMPORT_VERSION. Change-Id: I5bfbc960d119a7386bdcedb9bdbfdbfa4486a187 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | | | | | | | | | Add major version to all Q_REVISIONsUlf Hermann2020-02-199-16/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id72fbe10c16de61bd847773d0055d83cfe03f63c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | | | | | | | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-1711-19/+62
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/qtqml/plugin.cpp src/qml/qml/qqml.h src/qml/qml/qqmlmetatype.cpp src/qml/qml/qqmlmetatype_p.h src/qml/qml/qqmltypeloader.cpp src/qml/types/qqmlbind.cpp src/quick/items/qquickitemsmodule.cpp tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp Change-Id: I52548938a582cb6510271ed4bc3a9aa0c3c11df6
| * | | | | | | | | | | Fix QQmlObjectModel::destroyingItem emissionSimon Hausmann2020-02-101-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signal is used to tell the view that the item is definitely going away. For the "view" based QQmlObjectModel that is almost never really the case, except - oddly - for clear(). The view is typically a QQuickItemView, which casts the item to a QQuickItem and calls setParentItem(nullptr). That in turn is caught by QQuickContainer, which calls remove() on the QQmlObjectModel. That is why remove() can't emit destroyingItem(). Amends 6d0a453f41d304239285d64b06612c36922be701 Change-Id: I5d82def872550744b947b4b53447647327e03f67 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | | | | | | | | | | Use the extended QQmlListProperty interface in a few placesUlf Hermann2020-02-073-14/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-79263 Change-Id: If518f644b5b9eddbacfb1cb16fbb557127ffcfb2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | | | | | | | | | Models: Make sure we can use QList<QObject *> as required modelUlf Hermann2020-02-064-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can use it as model passed via a context property as shown in the objectlistmodel example. We should also be able to pass it directly then. Change-Id: I55db74df969d8024553d9470f1afe4710e61b1bf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | | | | | | | | | | QQmlInstanceModel: refactor recycling signals to base classRichard Moe Gustavsen2020-02-053-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that QQmlDelegateModel has an API that handles reusing delegate items (*), we should also move the related signals inside it to be consistent. This will also remove the need to cast the model type in the views before connecting. This patch will also remove warnings that stems from QQuickListView trying to connect to the reuse signals when the model is not a QQmlDelegateModel. *: E.g: virtual ReleaseFlags release(QObject *object, ReusableFlag reusableFlag = NotReusable) = 0; Fixes: QTBUG-81257 Change-Id: Ia8a8f0d68e6ef7edc6c45b414121aaa77632bcd3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | | | | | | | | | Synthetically reference type registration functionsUlf Hermann2020-02-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add unused volatile pointers to the type registration functions in each import plugin. We need to do this in order to prevent the linker from optimizing the registration away. There are two ways for this to happen: When linking statically, the linker will examine the referenced symbols on a per-object base and leave out all unreferenced objects. When linking dynamically, the linker may do the same on a per-library base and drop any unreferenced libraries from the dependencies. Forcing a reference to the type registration function prevents both. The volatile technique allows us to remove the previous qCDebug() hack. Having an unused volatile auto variable should only result in a single memory read as runtime overhead. The qCDebug() technique would generate a read and a block of mostly dead code (as no one would ever use that logging category). Fixes: QTBUG-81622 Change-Id: I255667276dfd355b19baa17b1aad3db406bf1954 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | | | | | | | | | | Use QTypeRevision for all versions and revisionsUlf Hermann2020-02-034-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In many places we carry major and minor versions or revisions that are loosely coupled to minor versions. As the Qt minor version resets now, we need to handle these things more systematically. In particular, we need to add a "major" part to revisions. QTypeRevision can express the current major/minor pairs more efficiently and can also be used to add a major version to revisions. This change does not change the semantics, yet, but only replaces the types. Change-Id: Ie58ba8114d7e4c6427f0f28716deee71995c0d24 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | | | | | | | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-307-27/+31
|\| | | | | | | | | | | | |_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | Change-Id: I1e1d9585d876a8eacd4c24afc894a33075f51a13
| * | | | | | | | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-291-3/+5
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp Change-Id: I133bfd4bd9dd6f704252c956c90f05e8a8a40d6a