Commit Graph

31143 Commits

Author SHA1 Message Date
Ulf Hermann 7318fadc42 QtQml: Clear context objects more thoroughly on destruction
The same object can be the context object of a hierarchy of contexts. So
far we would only clear one of them, leaving dangling pointers in the
others. Clear all the contexts.

Pick-to: 6.2 5.15
Fixes: QTBUG-119326
Change-Id: I509f257672813866e3736b51f430f1243a8577f0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 27ba69af2f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 833f4f6913)
(cherry picked from commit 477c3c3c25)
2024-02-03 19:24:46 +00:00
Santhosh Kumar 6a727f500d Fix polish issue in quick text edit
The text edit didn't polish even after there is change in position
offset, leading to alignment issues.

During geometry change, the QQuickTextEdit calculates implicit size
and base position offset, and then further requests a polish
immediately afterwards. This sequence of update happens only if we have
valid width or height set for text edit control. But in case we set
width or height to undefined, there is a chance that this update
would be missed.

This patch removes the checking of widthValid() in
QQuickTextEdit::geometryChange(), to allow those updates.
The validation of width or height is already handled internally
within updateSize(), so it shouldn't create an issue; and we still
try to avoid emitting cursorRectangleChanged() too often.

Amends 1770fa632f

Task-number: QTBUG-117667
Task-number: QTBUG-25489
Change-Id: Ia20cd06e78842f5edb0c395d6322a660f86f6b5e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit d84c130411)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3bff953242)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 4cf08f0757)
2024-02-02 13:40:28 +00:00
Fabian Kosmale 4bc9083a78 QQmlProperty: fix signal handler warning
It should only be emitted if we find a signal of that name.

Fixes: QTBUG-118710
Change-Id: I15cf92c03dd7b46805e5a69078ca2beb6c862293
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 9d10b79566)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6c0489e65f)
(cherry picked from commit e5d8daf821)
2024-02-01 18:30:23 +00:00
Ulf Hermann 16a0bea031 QtQuick: Do not crash on broken states
States can be nullptr these days. Ideally we'd warn about this, but for
picking back to 6.5 it's enough to restore the pre-6.5.3 behavior and
not crash.

Amends commit f905876d6c.

Fixes: QTBUG-120301
Change-Id: I87021eb2dcbe7fc49f37c5d949d79466ae341a1c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 7ce3ce41b8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 42a1ab50c5)
(cherry picked from commit 787e794af8)
2024-02-01 19:30:23 +01:00
Ulf Hermann c6416101b2 qmllint: Complain about "target" when complaining about PropertyChanges
You should remove the binding on the target property, too, after
rephrasing the binding.

Fixes: QTBUG-113695
Change-Id: I917f506c932605ae5851ae09f4383af59a3cae1e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 7bc52d660c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3dff3ce1bd)
(cherry picked from commit c753d52d8e)
2024-02-01 19:30:23 +01:00
Fabian Kosmale 912886afe4 setInternalClass: Correctly handle deleted properties
When an IC was rebuilt, we must not set members that were deleted,
otherwise we'll trigger an assertion. Since the nameMap has to match the
data we still allocate memory for such members and fill it with
undefined. This could be avoided with some deeper refactoring, but a
simple solution is to be preferred because this needs to be picked back
all the way to 6.2.

Pick-to: 6.2
Fixes: QTBUG-111729
Change-Id: I730d6b4634d989191434225600a08cf0208e72f8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 642d531e42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 308f785c78)
(cherry picked from commit f17168ef87)
2024-02-01 12:56:18 +00:00
Ulf Hermann 2311fc6a82 qmlprofiler: Fix data sorting
When analyzing a range with multiple child ranges, qmlprofiler would
create a rather random association between the start and end events.

Pick-to: 6.2
Change-Id: I564d2c74656dda1cb0963c75cd7b947a7f86d05e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit cc761e9c5a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 378de2f412)
(cherry picked from commit 06fc186371)
2024-02-01 08:23:58 +00:00
Robert Griebl 461d31d2d5 Workaround for crash on derefWindow on application shutdown
Ideally there shouldn't be nullptrs in the list. This fix will however
prevent crashes, until we find out why.

Fixes: QTBUG-116426
Change-Id: I2c85ad73832ab4d8b9992b4d8e661758fae85ac7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 5d79b207c7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit fe0b983fc5)
(cherry picked from commit e6811c930e)
2024-01-31 20:18:13 +00:00
Antonio Napolitano 5c42f57e88 masm: Don't crash on failed MADV_DONTNEED on Linux
The application could call mlockall(MCL_CURRENT|MCL_FUTURE) to lock all
its memory for performance reasons, causing the madvise call to fail.
There's no need to crash. Instead, manually zero-out the memory when
decommitting.

Fixes: QTBUG-120450
Pick-to: 6.2 5.15
Change-Id: I6f1a8968853cc5e61561371bd2a435a686eaf0e4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 524d260c5c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 1ead022dfe)
(cherry picked from commit a2e0061317)
2024-01-31 18:19:31 +00:00
Qt Submodule Update Bot e52edaf1ba Update dependencies on 'tqtc/lts-6.5' in qt/tqtc-qtdeclarative
Change-Id: I6d7f67c208153e434898493663ca635d19051222
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-01-27 09:24:26 +00:00
Richard Moe Gustavsen f6a3f14147 DA: align delivery of mouse, touch, and synthesized mouse events to childMouseEventFilter
Currently the delivery of pointer events to childMouseEventFilters
differs depending on if the event is a mouse, touch, or synthesized
mouse event. If case of a mouse event, it will be sent to all the
filters up the parent chain, even if one of the filters along the
way returns true. If it's a touch event, propagation will stop as
soon as a filter returns true.

What does it mean that childMouseEventFilter returns true?
According to tst_QQuickWindow::testChildMouseEventFilter(), if
a childMouseEventFilter returns true, the event should be stopped
from being sent to the receiver, and only the receiver. It should
not be stopped from propagating to other childMouseEventFilters
up the parent chain. This is explicitly tested with data
row "r1 rejects and filters".

Therefore, in order to make testChildMouseEventFilter() pass, not
only for mouse events, but also for touch and synthesized mouse
events, this patch will make the following changes:

1) Remove the early 'return' statement after a touch event was
filtered by a childMouseEventFilter. This will make sure that the
touch event will continue to propagate to parent
childMouseEventFilters, equal to how it works for mouse and
synthesized mouse events.

2) For both touch-, and synthesized mouse events, we deliver a
(localized) copy of the original touch event to
childMouseEventFilter(). The filter can then choose to accept
or ignore this copy. But as it stood, we would never sync back
the accept state from the copy to the original event. The result
was that the original event would continue to propagate, regardless
of accepted state set by the filter. This patch will therefore
sync the accepted state from the copy back to the original event,
when the event is filtered. This will make sure that if a filter
e.g ignores the event, the receiver will not receive the event
(since it was filtered), and the event will propagate to the
parent (since it was ignored). Which is equal to how it works
for mouse events.

3) For both touch and synthesized mouse events, we used to always
set an exclusive grab on the affected event points if a
childMouseEventFilter filtered an event. This is different from
mouse event delivery, where we only set a grab when the event is
also accepted. And the latter is also (most likely) the correct thing
to do; If the event is ignored, it means that the filter says (on
behalf of the receiver) that it doesn't want the event. And it
doesn't make sense then (AFAICS) to still grab the event points.
This patch will therefore, equal to mouse event delivery, ensure
that we only give a filter an exclusive grab on the touch points
when the event was actually accepted.

With these changes applied, we then also change the
tst_qquickwindow::testChildMouseEventFilter() to run three times,
once for mouse event, touch events, and synthesized mouse events,
to verify that they're all aligned.

Fixes: QTBUG-115953
Change-Id: I8b5b1faadc907e804b7e21c667888db7cfe28872
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 571c407ea6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit a435f30017)
(cherry picked from commit 8e45afd0fa)
2024-01-25 14:25:36 +00:00
Vladimir Belyavsky 5c44cd5052 Fix debug build when FEATURE_qml_debug is OFF
This fixes a number of compiler errors, such us "only virtual
member functions can be marked 'final'"

Change-Id: I0c40d0801e48b5f120e992651dea2219efb8a2dc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 65ffcb9550)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 907b0beea3)
(cherry picked from commit 5227649dcb)
2024-01-24 19:13:31 +00:00
Andreas Eliasson 6afbf84b7a Doc: Revise Qt Quick Text reference page
* Fix typos.
* Show rich text Markdown example.
* Be consistent with relative clauses (that vs which).
* Where it makes sense, use active voice instead of passive voice.

Fixes: QTBUG-119485
Pick-to: 6.2 5.15
Change-Id: I7843a3276f277172e25f5891f08e2a830d713c4e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit ec3b799824)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ce366ee66e)
(cherry picked from commit 1e58c05997)
2024-01-24 10:03:59 +01:00
Oliver Eftevaag 45479ae9ff FileDialog: set url schema when using the file name text field
When using the text field to choose a file name inside the non-native
file dialog, the selectedFile property would be updated based on the
currentFolder property and what the newly typed filename was.

However, the schema was ignored.

This patch fixes the issue by also setting the schema in
QQuickFileDialogImpl::setFileName(const QString &fileName).

Fixes: QTBUG-120065
Change-Id: I1860fbbc8209270d0bc6e34a4be6a91bad2253ab
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit 26d9634468)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit f839b0ae73)
(cherry picked from commit 53c60c2f94)
2024-01-23 13:26:15 +00:00
Mitch Curtis b13500e7ec Doc: add note about placeholder text to Material style documentation
Also update an old link.

Task-number: QTBUG-117654
Change-Id: Ib0c49052e15c7eca5dd6197ddbc081fb483a74d1
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 8f876c620c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 51c6cac7e4)
(cherry picked from commit 6986f1c26e)
2024-01-23 10:19:01 +00:00
Mitch Curtis c802707ac2 Doc: explain how Dialog's padding works
Task-number: QTBUG-120356
Change-Id: I10fa6ad71152a215d64eae1156827cbdf29b930d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit cccd21fc3c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 70d617909a)
(cherry picked from commit 7471e3b1a0)
2024-01-23 10:19:01 +00:00
Andreas Eliasson a6e63cf5cc Doc: Fix link to Material Design card component
Fixes: QTBUG-119903
Change-Id: Ice648ec4556b26160c4959dfc0af133afc864d9e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 4513eb4ec9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9580dd1854)
(cherry picked from commit f852292428)
2024-01-23 10:18:59 +00:00
Andreas Eliasson 3e3b4f9366 Doc: Describe correct case for styles
The current text says to use lowercase for styles, such as Material,
when, in fact, it is capitalized.

Fixes: QTBUG-119994
Change-Id: I2d473f8be525326318f325b05b75e01f8772d7ec
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit a00082f039)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ee0e6d9c26)
(cherry picked from commit 7dcc9a34af)
2024-01-23 10:18:59 +00:00
Andreas Eliasson f5d4d36378 Doc: Add CMake section about how to include .qrc files in a project
The current docs only describes how to do this in qmake. Let's use a tab
and add a CMake section.

Fixes: QTBUG-120568
Change-Id: I766e92818c3e20aad5498443aa107aa369089ad0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 37c2d3cda3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 16ebb44a5f)
(cherry picked from commit dcee08b4d4)
2024-01-23 10:18:58 +00:00
Alexey Edelev aef40493f7 Change the way tests and examples query the qmldir file from QML plugin targets
Use qt6_query_qml_module to get path to qmldir, but not TARGET_FILE_DIR.
This is more accurate way.

Fixes: QTBUG-120479
Change-Id: I4b7f7bf3b7f69c15871e400af3e7ae945a9bfdf0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit d276d025a8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 5e60f6d141)
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 7d26fdbe1c)
2024-01-23 05:12:39 +00:00
Shawn Rutledge 2aead33163 QQuickWidget: accept touchpoint even if it has a passive grab
In the test case from QTBUG-113558, a QQuickWidget's only event-handling
object is a TapHandler with its default gesturePolicy, so that on touch
press, it gets pressed; but it was missing the touch release and getting
stuck in pressed state.

As explained in dc8f44b145, widgets don't
care about (exclusive or passive) grabbers, and rely on points being
accepted to make the widget that received the TouchBegin an implicit
grabber. If the only thing that happened in the Qt Quick scene in the
QQuickWidget is that the touchpoint got a passive grab, it's still a
kind of interaction, and we want to ensure that the TapHandler will see
the release too, to avoid getting stuck. (This means that passive grabs
are not passive from the perspective of widget event delivery: the
TapHandler ends up excluding delivery of the touchpoint to other
widgets, even though it didn't mean to. But hopefully nobody expects
cooperation with touch-handling widgets underneath the Quick scene.)

Fixes: QTBUG-113558
Change-Id: Ided6247b43a2405dbfdf9d195bb45ceae4cf58fd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 59b0b59090)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 9f85654f7d)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 0c5a04ee78)
2024-01-22 22:41:59 +00:00
Ulf Hermann 1245fb8cad QmlCompiler: Use a hash set for the list of conversions
There can be a lot of them and we don't want quadratic behavior. It might be possible to further improve on this using e.g. sorted lists
and algorithms provided by the STL. However, such an implementation
would be more complicated and would require weighing several trade-offs.

Fixes: QTBUG-121139
Change-Id: I717b49bd4af97abcaae9ae78d1e1b31d5d462952
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit af212e5e4e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 2108e416ea)
(cherry picked from commit 2c460deadc)
2024-01-22 11:23:36 +01:00
Qt Submodule Update Bot 4989638222 Update dependencies on 'tqtc/lts-6.5' in qt/tqtc-qtdeclarative
Change-Id: Ia26f4ce12e388bfc31915b9b588086e95689cd14
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-01-22 10:23:35 +00:00
Vladimir Belyavsky 43faa0e521 tst_dial: fix warnings
Fix warnings "tst_dial.qml: Setting initial properties failed:
Dial does not have a property called orientation" by removing
use of non-existent property.

Change-Id: I586cbfde0b7d1aef718ec696f3b47f2c75bd64a8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 3935b05ba0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit f499f63758)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-01-22 07:43:26 +00:00
Vladimir Belyavsky 76c5fb6039 tst_action: fail on warnings
Enable fail on warnings for all tests in init() method.
Also, as a drive-by change, replace 'var' with 'let'

Task-number: QTBUG-98718
Change-Id: I24d1488220dc2ef60c32cc3e5e5637f620bbbad9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 1717695187)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 94a0e7416f)
2024-01-22 07:43:08 +00:00
Alexandru Croitor ed55007697 CMake: Fix NO_LINT option to work properly
Even if NO_LINT was passed to qt_add_qml_module, qt_target_qml_sources
would read the property set by qt_add_qml_module too late, and would
still create a lint target.

Make sure we read the property earlier.

Fixes: QTBUG-121206
Change-Id: I409b37cab6dc0583458142ff00447d4191b4ff61
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 3fb693d7da)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 48a5ebd140)
(cherry picked from commit 8b0409d800)
2024-01-19 02:13:23 +00:00
Shawn Rutledge 3005b22457 Make PieMenu in pointer handlers example work with mouse right-click
It opens instantly with right-click; whereas it animates open with
a finger or stylus, to avoid accidental activation, as before.

Change-Id: I6f530fb6da67c735fe3aae4545c8040f49e8dc05
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit 86081091f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 08b00cf7e3)
(cherry picked from commit 4465415de1)
2024-01-19 02:13:23 +00:00
Andreas Eliasson 76b72cb1c7 Doc: Replace Qt 5 QtGraphicalEffects code snippet with Qt 6 MultiEffect
Qt Graphical Effects was deprecated in Qt 6 and replaced with the
MultiEffect type. Fix code snippets in Qt 6 documentation to use the
MultiEffect QML type instead of the deprecated Qt Graphical Effects
type.

Fixes: QTBUG-119992
Change-Id: I27c11ed013880978656f86b6322bf3e4bfa18812
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit a95df6a234)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 134261baf9)
(cherry picked from commit 22b81f1bb8)
2024-01-19 02:13:23 +00:00
Qt Submodule Update Bot bc6bc514f0 Update dependencies on 'tqtc/lts-6.5' in qt/tqtc-qtdeclarative
Change-Id: I27ac15ed3d7498ebbd1ebcd4927c753fe9f9fbdd
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-01-18 20:18:55 +00:00
Santhosh Kumar 693bcdf04d Correct merge reorder issue with the revert patch
This is a follow-up patch to revert the complete change made in patch
9ad9d05f26 and
d85de8da60.

There are separate patches made to revert these changes but the order in
which these revert patches merged (in 6.7 branch) was incorrect. This
further triggers issue in other branches. This patch fixes the issue
happened due to merge reordering.

Its to be noted that patch d85de8da60 not
been merged to 6.6 and 6.5 branches but still this patch is required to
revert the complete change in those branches.

Change-Id: I875b13741bccc36c4a4892e5d71b6c7aa7e3b031
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 2b925eb9b9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit cddf2b0b4c)
2024-01-18 12:48:16 +00:00
Alexey Edelev 01b55816d5 Put the QML plugins to the non-config directory
The generated qmldir files that are used by QML engine specify the
relative path to the QML plugins that are build within modules. So
it's usually expected that plugins are located on the same level as
the qmldir files. In Multi-Config builds all libraries are located in
the build-specific directories by default. In this case QML engine is
unable to locate the plugin and the application cannot be run without
extra manual steps. This fixes this issue, by using the top-level
plugin OUTPUT_DIRECTORY for the "default"(first) config as
RUNTIME/LIBRARY_OUTPUT_DIRECTORY.

In Windows platforms we need to make the same for non-static backing
libraries, since we cannot rely on RPATH there.

Task-number: QTBUG-99061
Pick-to: 6.2
Change-Id: I51a8864743b87fd6ec4ba7179e13f311c5bee403
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 2dbae968e7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 91a25a8e3c)
(cherry picked from commit dc1a163452)
2024-01-18 07:01:11 +00:00
Mitch Curtis 449a5c3165 Doc: explain how to ensure the TestCase's window is active
Change-Id: I0d2e8a8ffdabba9cd6f0aee7dad8e79728c0261b
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit c9b32cf8e8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 15ca6b69b7)
(cherry picked from commit 4f3a722e3f)
2024-01-17 05:22:02 +00:00
Ulf Hermann 27506c2ccf Fix documentation for QML_ATTACHED and QML_FOREIGN
They can in fact not be combined.

Pick-to: 6.2
Change-Id: Ic01edf9328d7235511f305ed15114360b79d0a36
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 5a8663664e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 8bd24a76b6)
(cherry picked from commit f48bc1291f)
2024-01-16 19:20:16 +00:00
Tor Arne Vestbø b26b2be7cc QQuickWidget: Clean up if RHI goes away under our feet
The QQuickWidget doesn't normally own the RHI; the QWidgetRepaintManager
does, via QBackingStoreRhiSupport. If the top level widget is destroyed,
so is its QBackingStore, and the corresponding RHI. But the QQuickWidget
may outlive its top level parent, in which case it needs to update its
cached reference to the RHI, and do proper cleanup before it goes away.

QRhiWidget already does the same thing, for the same use-case.

This was observed when recreating the top level QWidget via destroy/create
as part of the RHI widget compositor logic.

Fixes: QTBUG-119760
Change-Id: Ic44449abcfe4271660a3ac4e132d0c4a71a21b65
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0d342e8312)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit df2314d708)
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit e34b15f0b7)
2024-01-16 19:20:16 +00:00
Tor Arne Vestbø 4344e89062 Clarify QQuickItem::map{To,From}Item when passed a nullptr
Passing nullptr when mapping to/from an item results in mapping
relative to the scene's coordinate system, and this is also what
the "Scene Coordinates" section of "Concepts - Visual Coordinates
in Qt Quick" documents.

Avoid the ambiguous term "root QML view", which may be mistaken for
the top level window in a child-window scenario.

Change-Id: Ibd386ec8248f5e398b04248d15c7cf48bd46c090
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 2ea08a9918)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b0cc7939b8)
(cherry picked from commit 8ed9f545b9)
2024-01-15 16:22:56 +00:00
Qt Submodule Update Bot 5308558432 Update dependencies on 'tqtc/lts-6.5' in qt/tqtc-qtdeclarative
Change-Id: I3d332644f0aa51bd32791b87d55deae7d6997eea
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-01-13 20:41:55 +00:00
Jani Heikkinen b9e77dca2e Revert "Fix binding loop and polish issue in quick layout"
This reverts commit 9ad9d05f26.

Reason for revert: QTBUG-120592

Change-Id: I6cba9e88832ac0d78280fd9d6f96b319748545be
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit cd5471fcd6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 1b6285429f)
(cherry picked from commit ab41e88e8e)
2024-01-13 15:27:22 +00:00
Qt Submodule Update Bot 02370fbc76 Update dependencies on 'tqtc/lts-6.5' in qt/tqtc-qtdeclarative
Change-Id: Ia77d18688583b317b19bc68e7086956ed8ca608d
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2024-01-12 05:41:51 +00:00
Tarja Sundqvist 9cc4eaf647 Bump version to 6.5.5
Change-Id: I19a5a9dff44a4fb1b8f6c60564657fb5d1191286
Reviewed-by: Tarja Sundqvist <tarja.sundqvist@qt.io>
2024-01-12 07:41:49 +02:00
Vladimir Belyavsky 0a94758a8d tst_textarea: fix warnings
Fix all warnings encountered in test run:

- in test_alignment()
QWARN Could not set initial property horizontalAlignment

- in test_flickable():
QWARN Setting initial properties failed: QQuickFlickable does not have a
property called selectByMouse
QWARN Setting initial properties failed: QQuickFlickable does not have a
property called text

- in test_font_explicit_attributes(family)
QWARN qt.qpa.fonts: Populating font family aliases took 130 ms. Replace
uses of missing font family "Courier" with one that exists to avoid this
cost.

Fixes: QTBUG-119645
Task-number: QTBUG-99231
Change-Id: I9939286c46eebc188610ee0b09350be8dda833b3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit ea3d7ec08b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 476adce4a7)
(cherry picked from commit 37533c8b7a)
2024-01-12 03:19:32 +00:00
Alexey Edelev 890a22aa32 Extend the Q_IMPORT_QML_PLUGIN documentation
Add the explanation what is PluginName and how it's computed when using
the modern QML API.

Fixes: QTBUG-119372
Pick-to: 6.2
Change-Id: I7346f7b7f82c717ee79b07f4dcec0c0d1dc733b2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit 48241a49d9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit db9171d0c3)
(cherry picked from commit ab160d2cb4)
2024-01-12 03:19:32 +00:00
Vladimir Belyavsky ad77d0f6af tst_textfield: fix warnings
Fix all warnings encountered in test run:

- in test_alignment()
QWARN Could not set initial property horizontalAlignment

- in test_font_explicit_attributes(family)
QWARN qt.qpa.fonts: Populating font family aliases took 130 ms. Replace
uses of missing font family "Courier" with one that exists to avoid this
cost.

Fixes: QTBUG-119646
Change-Id: I34edb8a8c85ad134f3a8844463722f71bd30bc1b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 26effad71e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 722763e9d6)
(cherry picked from commit b6e483af9d)
2024-01-12 03:19:32 +00:00
Vladimir Belyavsky ffbcbec9e5 TextArea/TextField: properly update placeholder text alignment
Placeholder text alignment depends on actual alignment of a parent
control, e.g. TextArea or TextField. Thus, if the horizontal text
alignment of the parent control is set explicitly, the placeholder
text must have the same alignment. Otherwise, the placeholder text
alignment should respect to the natural alignment of the text.

In order to do this QQuickPlaceholderText is connected to
effectiveHorizontalAlignmentChanged() signal of the parent control.

The problem is that the signal may not be emitted when alignment
is set explicitly after the component creation, so the placeholder
text alignment will not be updated respectively. To solve this we
need to make sure that the signal is forcibly emitted every time
when the alignment is set explicitly.

Fixes: QTBUG-120052
Change-Id: Ib66a7a46d523777cc54ca6b6883d3fecc800dfb2
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 694a677535)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 8b12eb7ed5)
(cherry picked from commit 8903bb3d64)
2024-01-11 19:17:32 +00:00
Lars Schmertmann 5347bff2ad Amend 9ad9d05f26 to fix wrong whitespaces
Task-number: QTBUG-117899
Change-Id: I3726e0cdc743eb6c10a78d826b993cf71834663e
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit 7b9f69a69e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 2ad42e1f27)
(cherry picked from commit a631caf282)
2024-01-11 16:24:44 +00:00
Oliver Eftevaag a976130b71 Only update the filename text field when the user selects a file
Apparently, it's normal for file dialogs to not update the text field
that represents the filename of the currently selected file, if the
selected file is a directory.

To achieve that behavior, I'm removing the binding on the text property,
and instead call setText() to update the text field when either the user
selects another file in the file dialog list view, or when the
selectedFile is changed externally. But only if the selectedFile is an
actual real file, and not a directory.

Fixes: QTBUG-119917
Change-Id: I8dbf41ba403d09419a2d66130bdad59e66c9d1cf
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit 8e734b2fc0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ddee70ac8c)
(cherry picked from commit 000e0ec516)
2024-01-11 14:21:00 +00:00
Tim Angus 5a7fb4296e Fix BusyIndicator invisibility under Fusion style
When an initially invisible BusyIndicator is first made visible under
the Fusion style, it does not in actuality become visible. This is
because the QQuickFusionBusyIndicator::itemChange() function ignores
ItemVisibleHasChanged, so the appropriate actions don't take place. The
fix is a partial copy and paste of
QQuickMaterialBusyIndicator::itemChange's implementation which has
identical logic except for calling the appropriate ::itemChange() super
function.

Task-number: QTBUG-108808
Change-Id: Id92c62a1eef4fc278ab91097f04db5b41a5d2c8a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 3211100411)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 8f2aa4de88)
(cherry picked from commit 147ecd467d)
2024-01-11 14:20:59 +00:00
Shawn Rutledge fadb14a8d9 Avoid crashing in the quickwidgets example after closing the subwindow
Closing the window deletes m_quickWidget; so we disable the menu items
for grabbing from it, because those cannot work. Also add asserts.

Fixes: QTBUG-120296
Pick-to: 6.2 5.15
Change-Id: I68154c2d1e4553c771815e29cbe3b095d85893f1
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit f719ee6408)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit a49d309b4a)
(cherry picked from commit 08c01f6259)
2024-01-07 12:30:27 +00:00
Santhosh Kumar e3022f58fd Fix binding loop and polish issue in quick layout
The quick layout item cause binding loop issue when layout item size
were updated in-between polish. This has been fixed by not updating
layout size hint during rearrange.

But there is polish issue due to child item not being invalidated
and this skips corresponding item box size calculation. This patch
invalidate all the items in the rearrange list of the layout and
finally, invalidate engine and layout.

Fixes: QTBUG-117899
Fixes: QTBUG-118511
Change-Id: I1e318335ce8b5268d878b48a02a089d703bb90ad
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 9ad9d05f26)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit a1d5514289)
(cherry picked from commit 1570bd5f8e)
2024-01-05 22:14:16 +00:00
Shawn Rutledge 2e3e3adf0f Ensure that HoverHandler reacts if a touchpoint moves out of bounds
We rely on QQuickDeliveryAgentPrivate::flushFrameSynchronousEvents()
mostly, but it doesn't get invoked without a window update request.
So there is a special case when a touchpoint moves _out_ of an item
that has a HoverHandler but is not reacting to touch in other ways:
we just need to send another artificial hover event for each touchpoint
to each hovered item to inform handlers about the new hover position.

Fixes: QTBUG-120346
Pick-to: 6.2
Change-Id: I479362a2663943eb495fe0be418009165c7134bd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit ff4c2c311f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 7ef31a5763)
(cherry picked from commit 4a7ff2b6ad)
2023-12-30 04:10:03 +00:00
Topi Reinio 085a0e3f61 Doc: Add an example customization for an indeterminate ProgressBar
The indeterminate state for a ProgressBar control was not mentioned
in the customization documentation. Adapt an animation from the old
Qt Quick Controls 1 customization and link to the indeterminate
property documentation.

Fixes: QTBUG-116306
Change-Id: I56d2c7fe4b326637806edd85d40be040b7fdb3f6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 57f5f462fc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 38f167d3c6)
(cherry picked from commit 682518e18b)
2023-12-29 16:17:30 +00:00