aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update dependencies on '6.6.1' in qt/qtdeclarativev6.6.16.6.1Qt Submodule Update Bot2023-11-201-5/+5
| | | | | Change-Id: I897599d8002d4ca3eba924c47e24dcc4d80521bb Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.6.1' in qt/qtdeclarativeQt Submodule Update Bot2023-11-161-5/+5
| | | | | Change-Id: I25baacde9c1f5f53345e0969f503e6dfe4acc252 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* QML: Before processing deep aliases, remove pending bindingsUlf Hermann2023-11-145-17/+41
| | | | | | | | | | | | | | | | | We may have additional bindings scheduled for the deep alias, but those are to be overridden by the alias. They should therefore be removed like bindings to target properties of shallow aliases. For QProperty bindings we have to apply a separate trick and set and clear the binding bit in the right places. We don't have access to the actual binding when writing the value, after all. Pick-to: 6.5 6.2 Fixes: QTBUG-115579 Change-Id: Ia915e59905d7e3185a17c5b6613926264ad9bc6b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 0fdf9042ce36c1dcfed64d1600f1526ac176768d)
* QtQml: Fix some problems with deep aliasesUlf Hermann2023-11-148-34/+139
| | | | | | | | | | | | | | | | | | | | | | We cannot get the property cache for an inline component the usual way during type compilation. We have to ask the compilation unit for it. This will usually not work in 6.6 or earlier since the compilation unit does not know the IC's metatypes. However, it shouldn't crash. Guard against still not being able to retrieve the property cache for any reason. Abort the compilation rather than crashing. Also, unify the setting of property attributes. Those should really work the same way everywhere. Finally, disallow writing aliases to value type properties where the property holding the value type itself is not writable. Pick-to: 6.5 6.2 Task-number: QTBUG-115579 Change-Id: I029eb56a9a390085d0c696a787a64c48acf0d620 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 3ea55bf398412d373daab9c92b1498f45de70e96)
* Fix crash issue in quick table view controlSanthosh Kumar2023-11-135-7/+57
| | | | | | | | | | | | | | | | | | | | | The quick table view can have both QAbstractItemModel and JS value as its model. The table view release and load the items (or rebuild) when its assigned with new model. The newmodel always be compared with existing model before rebuild via QQuickTableViewPrivate::syncModel. This comparison works with QAbstractItemModel but the same fails with JS model. This patch adds additional validation in QQuickTableViewPrivate::syncModel and QQuickTableViewPrivate::setModel for comparing JS model to avoid rebuild when existing model overwritten with same model again. Fixes: QTBUG-117917 Pick-to: 6.5 6.2 Change-Id: Ic15145c4b8998c68ae6471a2abf4aef727041eea Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 79b34126850c4235a1914e95f8e4235cfddba007) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* TableView: don't rebuild everything if row count changedRichard Moe Gustavsen2023-11-132-17/+23
| | | | | | | | | | | | | | | | | | | | | | | As it stood, TableView would rebuild the whole table if we got a call to forceLayout before a pending rowsInsertedCallback was delivered. This was far too harsh, as we a RebuildOption::All will throw away all existing delegates, and reset the contentItem back to zero. The correct thing to do, is to do the same that we already do in rowsInsertedCallback; just schedule RebuildOption::ViewportOnly. But since we don't know what else might have changed, we now also need to take the previous "else" case path in the function. Pick-to: 6.5 6.2 Task-number: QTBUG-118897 Change-Id: I23fe30c7d9e6abf32a6565c18bd9249de459636c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit a4ed13098d3995ab59e66d3ff5011e2b2014978f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc: Add note about platform support for window positionsLiang Qi2023-11-131-0/+5
| | | | | | | | | | | | | | | | This follows 5c7a3ea783b780bc5f924849091f1f3ffb4b892c in qtbase. On some platforms, such as Wayland (and also eglfs), manual window positioning is not supported. Since this has caused confusion in the past, we add a note to the documentation. Pick-to: 6.5 6.2 Task-number: QTBUG-86780 Fixes: QTBUG-119024 Change-Id: I4a81257dee1b80176bef9fa56b1bdaeee2069eee Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit bcd03432094e0b57f8d961278eb0e1a4c15971cc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QML SystemTrayIcon: Allow resetting tray icon menuVladimir Belyavsky2023-11-131-2/+7
| | | | | | | | | | | | | | Fix QQuickLabsPlatformSystemTrayIcon::setMenu() logic to allow resetting the tray icon menu. Now we correctly handle `nullptr` menu passed to the function, and update underlying QPlatformSystemTrayIcon instance accordingly. Fixes: QTBUG-119065 Pick-to: 6.5 Change-Id: Ief6445f4854ff2f59809be315f373e0c1755652b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 3ad1980ef5d07c23a00cb678ceab54a1d8ca1279) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Material: respect horizontalAlignment in placeholder textHatem ElKharashy2023-11-117-24/+79
| | | | | | | | | | | | | | | This allows placeholder text to follow the Alignment set to the TextField or TextArea components when using Material style. The placeholder text will float to the left, right, or center depending on the alignment set, and the arc will be drawn properly in case of Material.Outline container style. Fixes: QTBUG-118856 Pick-to: 6.5 Change-Id: Ic9cede806dc2f6109e7e2c4b2b2fc960d9c6a1b6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 7e678acbb6167218d349c49436499121b2025af5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* TextEditor example: open file as textSami Shalayel2023-11-111-1/+1
| | | | | | | | | | | | | | The texteditor is made to open text, and in this case it makes sense to pass the Text flag to the QFile::open call in the example code. Pick-to: 6.5 Task-number: QTBUG-118636 Change-Id: I936610945aa6e2f67b29ce6f5c559a2b942fc718 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 743065d7fe2337aa7229a9ea6d4f9b3c30fa1af0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* SignalSpy: manually disconnect from target signal when we're destroyedMitch Curtis2023-11-111-0/+10
| | | | | | | | | | | | | | | The SignalSpy is potentially destroyed before the target object, and since only the sender (target) being destroyed destroys a connection in QML, and not the receiver (SignalSpy), we need to manually disconnect. When QTBUG-118166 is implemented, we can remove this. Task-number: QTBUG-118163 Pick-to: 6.5 6.2 Change-Id: I76aaffba114a6db5b5aab6a2ff58541aa3b2e025 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit fd7459a60c3b396984c948f244ec0996fba56837) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Consider the major version when registering singletonsAlexey Edelev2023-11-114-1/+38
| | | | | | | | | | | | Amends 9225723a317b8c7e805416592b78aca0ed320049 Fixes: QTBUG-117958 Pick-to: 6.5 Change-Id: Ifbaa30d6f82e37d35d7d3be57fe562dae9d09c10 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit ad01abe1a62ea50d19cca2b4ccd799b9a01e3e12) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Update documentation for QML font.weight valuesTopi Reinio2023-11-111-12/+13
| | | | | | | | | | | The numerical values used in font.weight follow the ones used in CSS. Pick-to: 6.5 Fixes: QTBUG-118237 Change-Id: I654b614a73e30e3088d21093916bbca951d4b922 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 1c39eddbde185c2ef28c81366ecd556e83dddcf6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Always record original types for equality comparisonUlf Hermann2023-11-104-23/+75
| | | | | | | | | | | | | | | The shadow check may adjust the types later on and cause a different comparison to happen than what we've expected when propagating. We can only see this at code generation time. Pick-to: 6.5 6.2 Task-number: QTBUG-117795 Change-Id: I04f1dd9902385f87114e48b0994e0f243f0c2c84 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 674dc3f73d9d730e87483b86aa9d55186c57cd52) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.6' in qt/qtdeclarativeQt Submodule Update Bot2023-11-101-5/+5
| | | | | Change-Id: Id06894e041477b24a43819f5ae51232bd3b18304 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Popup: fix fading in and out of the dimmerVolker Hilsheimer2023-11-094-3/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | When showing and hiding the overlay we go through QQmlProperty to enable behaviors, e.g. for fading the dimmer in and out, but since we already set the opacity to 1.0 when creating the dimmer any fade-in behavior is ignored (as the property already has the target value). Fix this by creating the dimmer with opacity 0, and calling showOverlay to make it visible if the popup is already visible. In addition, store the target opacity of the dimmer component, and set opacity to that value instead of 1.0 to respect an explicitly set opacity on the modal or modeless item. Add a test to verify that we respect the opacity that is set on the attached modal or modeless dimmer item, and that we correctly trigger behaviors on the dimmer item. For that to work, the exit transition of the popup itself needs to be at least as long as the behavior's duration. Fixes: QTBUG-118461 Change-Id: I5259ea54f7e4a98bf671e8b52c26676d591a0176 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io> (cherry picked from commit ef8bde838ec708ff45ad68c5db899a86116b4e94) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make the resource_name more unique in qt_add_shaders callLaszlo Agocs2023-11-091-7/+7
| | | | | | | | | | | | | | | | It has been pointed out that platforms using static builds may end up in name collisions when the resource_name for qt_add_shaders (or qt_add_resources) clashes between a Qt library and the application. While qtdeclarative is not the worst offender among the Qt modules, we should still make some of the qt_add_shaders calls more uniform and better prefixed when it comes to the resource_name. Task-number: QTBUG-118624 Change-Id: I8fd7616f4329f652af0afa8253944d7018d9f8d1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 89552f6c440271778068a5872e61e3531fc11ef6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* TableView: don't emit rows and columns changed while rebuildingRichard Moe Gustavsen2023-11-095-16/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should be careful about emitting signals while we do a rebuild. The reason is that the application might listen to those signals and change Flickable properties (especially contentX/Y) behind TableView's back. A bug is seen from this if the application is setting a very large contentY upon receiving rowsChanged(). In that case TableView will not detect that it should do a "fast-flick" directly to the new contentY, but instead start to loadAndUnloadVisibleEdges() until it reaches the current viewport. And this can take a really long time, and therefore block the UI. This patch will wait to emit rows/columnsChanged until we're done rebuilding. At that point, it's safe to change properties such as contentX/Y from the application. The main usecase this patch is solving, is to be able to always position the viewport on the last row as new rows are added to the model. This can now be done by listening to onRowsChanged or onContentHeightChanged, and position the viewport at the end. The included auto test will therefore test this exact use case. Pick-to: 6.5 6.2 Fixes: QTBUG-118897 Change-Id: I6124fbd0e7097a2bbb89c887fe594c3028726aa7 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit bff7aca8695e4cacc252d0235dc70cf3a46c032e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Examples: fix Wearable on embedded linuxSamuli Piippo2023-11-094-3/+15
| | | | | | | | | | | | Build the extra QML modules without separate backend library, so that they load correctly when deployed to embedded device. Deploy also qmldir files. Pick-to: 6.5 Change-Id: I583798eb7841c8fd0520cfa049eaecbadaf50109 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 425c65a27b1c712226697bed8709705b9914cc8a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Destroy overlay in Popup destructorMatthias Rauter2023-11-083-8/+20
| | | | | | | | | | | Amends 434e19bede219c51af1213f2fc56bf2d6367e52e Fixes: QTBUG-117831 Pick-to: 6.5 Change-Id: Icc3cafdf83a5b772b7a227dd1954d8cb3210cb5b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 9ca4969307f312d2706eb63944a90b5d3e3b4f84) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.6' in qt/qtdeclarativeQt Submodule Update Bot2023-11-081-5/+5
| | | | | Change-Id: Ia1315435d2cbf37947db088146ee78d5da743d74 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Allow tapping to deselect in TextInput/TextField with pre-6.4 APIShawn Rutledge2023-11-082-1/+19
| | | | | | | | | | | Amends 650342de792e0ab37ce8bac8ccde21ab9b96b2c9 Fixes: QTBUG-116606 Pick-to: 6.5 Change-Id: I5c53559e0727c65a7d921a13f063ea2612cdcbca Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit ac3f1eace1102543008a0ceded541e40ff495368) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix missing paragraph containing object replacement charEskil Abrahamsen Blomfeldt2023-11-081-1/+1
| | | | | | | | | | | | | | | | If a user manually adds an object replacement char, it will not have a corresponding object, but we would still skip the paragraph in this case, causing the text to disappear. [ChangeLog][Text] Fixed an issue where a paragraph containing the Object Replacement Character (U+FFFC) would be invisible. Pick-to: 6.5 Fixes: QTBUG-78441 Change-Id: I04a20b8287895bbed5d1f22f1a449d6dbd9d448b Reviewed-by: Lars Knoll <lars@knoll.priv.no> (cherry picked from commit a927fcd4ac948b3439518d1b92a717e8d7e95fed) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickOverlay: don't reset rotation during resize if we don't have toVolker Hilsheimer2023-11-082-0/+21
| | | | | | | | | | | | | | | | | | Overlays on windows that have an explicit content orientation set need to reset their rotation value when the window's geometry changes, so that items on the overlay have the correct orientation as well. This was implemented in f1e139b9ac02313f541ed6749f05e265f4c8bf13. However, for windows that follow the default screen orientation (i.e. use Qt::PrimaryOrientation), we don't have to reset the rotation to 0 when the window resizes. Fixes: QTBUG-118460 Change-Id: I1a65f15000b1d8a6425773adeba127915b944581 Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit d51847e327d6d19c0e984ad65f66d8123d2e56ea) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* StackView: guard against destruction of previous item during transitionVolker Hilsheimer2023-11-072-1/+39
| | | | | | | | | | | | | | | | Since user code might get called during the transition when an item gets popped, the previous item might be destroyed already by the time the transition completes. Guard against that using a QPointer. Add a test case. Fixes: QTBUG-118525 Change-Id: If412f279a395a217a5b45352b11ae850e00ca58b Reviewed-by: Ed Cooke <ed.cooke@qt.io> Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 1bcf85bd38684ef4d993c56264a95b965ed936c7) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rewrite QuickTests's qWaitForSignalMårten Nordheim2023-11-061-12/+36
| | | | | | | | | | | | | | | | | | | | | | It doesn't use any of the features of QSignalSpy, so it hasn't done it any favors. On top of that QSignalSpy connects with DirectConnection which means that frequently emitted signals on another thread may end up trying to append another signal emission to its internal list during destruction of the signal spy, leading to use-after-free. The new implementation uses a small class with a slot that just sets a boolean. We use AutoConnection so it is thread safe, and pending emissions go away when the object is destroyed. Fixes: QTBUG-118744 Fixes: QTBUG-118163 Pick-to: 6.5 Change-Id: Ib2ccce2369a681bfe9a2e04d2c091f9690edee49 Reviewed-by: Dimitrios Apostolou <jimis@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 80532bcd26bd125763fe6b3f9ffd42e535e9b14c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Respect QQC2 style related featuresAlexey Edelev2023-11-042-12/+21
| | | | | | | | | | | | | Guard respective QML modules with feature-specific conditions. Move platform-specific conditions to the feature definitions. Fixes: QTBUG-118738 Pick-to: 6.5 6.2 Change-Id: I2ff45809982d7c39ecaaae2213f6d85084887b9d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit f2bb22b541b49e2a899062051f0774cc1151b66b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Extend shadow-checkingUlf Hermann2023-11-046-2/+81
| | | | | | | | | | | | | Method return values as well as whatever we hide behind "unknown" can contain shadowable properties. We need to check it. Pick-to: 6.5 6.2 Task-number: QTBUG-117800 Change-Id: I518bc11fd0c9c69340bf621198eeaf4c95d17dae Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> (cherry picked from commit 048c8f226ae09b79264e5dfc51f5d8fe7a8332a9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Warn about slowness of createQmlObject()Ulf Hermann2023-11-042-1/+12
| | | | | | | | | Pick-to: 6.5 Change-Id: Ie00d0df9bc8ad6106559ce0a66c91e0aaac81cfd Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 85885624446558c2bf9fa27cb5bded9433943312) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Fix error message on shadow checkingUlf Hermann2023-11-041-2/+1
| | | | | | | | | | | | The base type does not have to be the accumulator. The accumulator doesn't even have to exist, in which case this would crash. Pick-to: 6.5 6.2 Change-Id: I839d0a514fc1b628a829ced96dc3245e4c3eec22 Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit aa63c03b914e073df67fc35977062a3c5dcb1c60) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.6' in qt/qtdeclarativeQt Submodule Update Bot2023-11-031-5/+5
| | | | | Change-Id: I68e40a3c551d121f5b0c0dd18ff4704fc204cf05 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* QtQml: Clear the whole lookup in storeNameSloppy()Ulf Hermann2023-11-032-5/+1
| | | | | | | | | | | | The clear() method was only use by storeNameSloppy() for the temporary lookup. It only cleared part of the lookup. Drop it and do the memset() directly. Pick-to: 6.5 6.2 Change-Id: Ib31be1d6fba09d2c86f3c4cd64626ab1fd90eb7f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit bf0faf69e1e024118983a6763eb9bca2070564fc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add license headers to shader sourceEskil Abrahamsen Blomfeldt2023-11-0265-0/+195
| | | | | | | | Pick-to: 6.5 6.2 5.15 Change-Id: I007eaddf0a3a9e7e6242d4e02b487fa0806c96a7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 85e65e101bb7f4eecff0bdbbc6bde59ea8f6d73e) Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* QQuickTextArea: move accessibility handling into base QQuickTextEdit classVladimir Belyavsky2023-11-024-43/+60
| | | | | | | | | | | | | Move accessibility handling from QQuickTextArea into base QQuickTextEdit class. This fixes an issue where the virtual keyboard does not appear automatically when TextEdit initially gets focus on a Windows touch device such as the MS Surface Pro X. Fixes: QTBUG-108449 Change-Id: I37e0d197d4af04c832dfb5651bade9d39e079f2b Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit 12517742fcbd40b2311b94abe840532eae3d8914) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix build with -no-guiTasuku Suzuki2023-11-021-1/+1
| | | | | | | Task-number: QTBUG-118470 Change-Id: Ia8f7eb22944d44a04144ea6120919772fa449cd6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 6aea5da7c4fca5ce7d99bea3162f196d91f4343f)
* QQmlScriptString: Guard operator== against nullptrFabian Kosmale2023-11-022-1/+12
| | | | | | | | | | Amends 015a1ed8e06c92a8dc788ab71f42f1c247e99405. Fixes: QTBUG-118591 Change-Id: If6352d689f8c344e5e0c859caf0f52533c665251 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit ba6ddfab5bc08db3ae51896a3ec6d8a8d4199c5b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix crash when calling QQmlIncubator::abort()Jan Arve Sæther2023-11-022-3/+17
| | | | | | | | | | | | | | | | | | | | QQuickContainerPrivate::itemDestroyed did not properly clean up its internal data structures to have no references to the item that got destroyed. This was mainly because the call to q->isContent(item) in QQuickContainerPrivate::removeItem() would return false, so it would not continue doing the rest of the required cleanup that removeItem does, and it was therefore leaving dangling pointers to the destroyed item in QQuickContainers data structures. Pick-to: 6.5 Fixes: QTBUG-118397 Change-Id: I7f23b4f98df33d69b42455d20016adb7e132b510 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 47b4037ccca3d9d38c2d172bafdeb5dcce699eb7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qqmlprivate.h: Fix BC issueFabian Kosmale2023-11-022-0/+19
| | | | | | | | | | | | The old function might still be callde from code compiled against Qt < 6.6. Fix this by providing the old overload in removde_api: It is implemented by calling the new overload, and then converting the result to an int. Amends f10630aa035ae1ef4ad75be1107ab77fea0c7e29. Change-Id: I373460af2a66c069bfc0b57a9bb169d705d2a6b9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 34c4f8aa9ff90d6f614d0726ebf667ba0f435274) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.6' in qt/qtdeclarativeQt Submodule Update Bot2023-11-021-5/+5
| | | | | Change-Id: I68b8dc0ae3a23edf31bb5bd44c10a4cbbaf79635 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* File system explorer example: Improve shortcutsFriedemann Kleint2023-11-021-2/+3
| | | | | | | | | Use the standard keys for zoom and quit. Change-Id: I3659a5a84bc1e46938729710af31c834b8a50ed8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 4ba5c88d2d344052dae1f93a3a3e4f3e24654910) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Localize Flickable delayed release to scene, not to grabberShawn Rutledge2023-11-023-60/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When pressDelay > 0, if Flickable receives mouse or touch release before it has sent the delayed press, it needs to send the delayed press before allowing the release to be seen, in some sense. Further back in d02131e743597b9bd3070d986c61a1c91ea8317a the continuation of release event delivery after the delayed press seems to have been more limited in scope, to say the least. 8673ae8bb6d4bac01cc54638a7d617072299a808 added localPos = window()->mouseGrabberItem()->mapFromScene(...) QQuickWindowPrivate::cloneMouseEvent(event, localPos) window()->sendEvent(window()->mouseGrabberItem(), mouseEvent) where QQuickWindow::sendEvent() was _not_ the same as sending the event to the whole window (the grabber is the intended recipient, but sendEvent() was taking care of child event filtering back then). But over time we became convinced that sendEvent() should not exist, because it was used for non-standard forms of event delivery, could be hacked over time to do arbitrary things, and bypassed any old-school QObject event filters that users might expect to work. In bfde65a8180e3dbf811e757f6d95f9554f622475 though, it was assumed that since the delayed press got delivered to the whole scene, the release should be too. Now it looks a bit redundant: one can see in the debugger that the release gets an extra nested delivery to the whole scene again, after being partially delivered before the delayed press is sent. But that might be risky to change right now. So at the time of writing d7623d79ef4bc9533fced027bf1d173d68b4eba6, QQuickFlickable::mouseReleaseEvent() used an item-localized position (leftover code from 8673ae8bb6d4bac01cc54638a7d617072299a808) and it seemed reasonable to follow that precedent to handle delivery of a delayed touch press and then the release; but in retrospect, 1) we're sending the event to a window, so we don't expect the grabber-localized position to be retained; 2) in fact, QQuickDeliveryAgentPrivate::translateTouchEvent() treats the local position as scene position. QTBUG-118069 occurred because of this assumption being violated. 3) Even for mouse release, it no longer makes sense to localize to the grabber, now that we are sending the event to the window rather than just to the grabber (for quite a number of years already). It will get relocalized during delivery to each item and handler visited. 4) Maybe it doesn't even matter whether there is a grabber or not: we could resend the release to the whole scene regardless. But this patch is conservative; and now we optimize slightly by using QObject::isQuickItemType() rather than qmlobject_cast. tst_qquickflickable::pressDelay() tests the same old scenarios as before, but now with both mouse and touch, and gets a general revamping while we're at it. Pick-to: 6.5 Fixes: QTBUG-118069 Change-Id: I0f33d23ac1eae9fd697f2eca315107169619706c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> (cherry picked from commit 45d4ccc765b7fae86aca749f7b0aabc9c4671b23) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Explicitly un-specify order of binding evaluationUlf Hermann2023-11-012-3/+22
| | | | | | | | | | | | | You cannot rely on any binding to evaluate before or after beginCreate() returns or QQmlIncubater::setInitialState() is called. Pick-to: 6.5 Task-number: QTBUG-117968 Change-Id: Ib38ecf6bc8dbd8a82167cdc4b2527bf48da23c10 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andreas Aardal Hanssen <andrhans@cisco.com> (cherry picked from commit 92b107aed13a09c940a35e3d8d9b6cf22b9ea0f5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Generate jump code also when skipping an instructionUlf Hermann2023-11-014-1/+57
| | | | | | | | | | | | | | | | | | The next instruction may still need the type conversions even if we don't need to generate any code for the current instruction. Also, generate trace info for generate_DeadTemporalZoneCheck so that we can recognize it in the generated code. Amends commit 2c410317b6077fdcfb2cdeb4b730c1b0c544147e. Pick-to: 6.5 Fixes: QTBUG-118514 Change-Id: I70ad3691486176de2177e9d5f538f7c99d121bfa Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> (cherry picked from commit c662ae7cbf49bdfc9fd96d34301a86fe96550773) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Highlight some examples for the "Graphics & Multimedia"Kai Köhne2023-10-311-1/+5
| | | | | | | | | Pick-to: 6.5 Task-number: QTBUG-117211 Change-Id: I7db45e5644236ad4e5597943cb90e08f71675f1b Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 5759158d258e148becb0e0eafb883bfdb12057a2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Move some examples to User Interface Components categoryKai Köhne2023-10-313-3/+3
| | | | | | | | | Pick-to: 6.5 Task-number: QTBUG-117243 Change-Id: Id13a0d8e02e6fea7ae84dbee524d60fe2f3ad3b7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit dac7706e6129897b2957276e5e5b862a42f3962a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Highlight Contact List example for Mobile categoryKai Köhne2023-10-311-1/+2
| | | | | | | | | Pick-to: 6.5 Task-number: QTBUG-117209 Change-Id: Ia89ac7ff1c13333865a012248b0449ffd8c3de39 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 9343e06fc9c87437070ce9a7b2dfe079ad7ae07e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.6' in qt/qtdeclarativeQt Submodule Update Bot2023-10-301-5/+5
| | | | | Change-Id: I6d71a49c7ddb961042fa0c62bd4a7cf42e7f3a25 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Examples: Fix qmake version of qml-i18n exampleUlf Hermann2023-10-262-1/+2
| | | | | | | | | | | | | Now that we load the QML file from a different resource directory we have to adapt the resource paths in qmake, too. Amends commit 69fce1185f2ba3b474871e38b3b5b3161a9f72ee. Pick-to: 6.5 Change-Id: I25f3e0f1f77ad365426b859c5adc08b429976da3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 4dd7f9a10233c24ed35b7b1366ba5f8860096a6e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Skip some QQuickPopup tests on androidUlf Hermann2023-10-261-0/+8
| | | | | | | | | | | Since they crash, we cannot blacklist them. Pick-to: 6.5 Task-number: QTBUG-118532 Change-Id: I994e368a8bd6b1ed1a9729af873e2f03b8a86211 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit a45eceefa787698e3042a0f913927cbf9ac69768) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix some copy constructor signaturesGiuseppe D'Angelo2023-10-266-18/+18
| | | | | | | | | | | | | These constructors weren't copy constructors. The implicitly-generated ones copied the atomic refcount without resetting it to 1, causing memory leaks. Pick-to: 6.5 Change-Id: I9fd8f4b7f9012e21128f5afd3986dfcdb517afb7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit ff482815cf2876a1bc25fef2b5af298179ad1167) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>