Commit Graph

30700 Commits

Author SHA1 Message Date
Edward Welbourne d3a624fb26 XHR sendPropfind_data(): split some long lines
Use string concatenation for the long test names.
Split data rows are more << markers.

Change-Id: I502bcc615a53169a4175a09af08ae5f2c3133668
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-04-25 16:53:00 +02:00
Edward Welbourne fd63ac9f26 Split some long lines in XHR's getResponseHeader.qml test-case
Change-Id: I68acc7df09a99961f895c1763df2d6cecb292604
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-25 16:53:00 +02:00
Edward Welbourne 9f1c31f57d Split a long line in an XHR test using [].join()
This both makes the list of headers more readable and keeps the line
of code within our 100-column limit.

Change-Id: I7d53cca5beeeb9f6dd2b2a7c3311362750695d10
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-04-25 16:53:00 +02:00
Edward Welbourne 0ca564ed40 XHR WebDAV test: don't expect more than Keep-Alive in Connection: header
Only one XHR test expects Keep-Alive, Upgrade, HTTP2-Settings as the
Connection: header, which fails when I run it locally, and I can see
no reason why that test [0] would expect it, where all the others just
give "Keep-Alive{{Ignore}}" (or "close") in their .expect files, so do
the same for [0] as well.

[0] sendPropfind:Send PROPFIND "allprop" request for collection.

Pick-to: 6.5
Change-Id: I09cafcf282861b87693b5782f34e2fb84c888ff1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-04-25 16:53:00 +02:00
Ulf Hermann 365b781599 QmlCompiler: Implement ConvertThisToObject and basic DTZ
We know that 'this' is a QObject* since the metatypes stack frame
mandates it. Whenever you pass 'this' to anything it's loaded from the
special 'This' stack slot which then triggers a DTZ check. A DTZ check
is a noop if we can prove that the type is statically known, though.

In QmlCompiler, if we have a valid register content, then the register
has been set in all code paths that lead to the instruction in question.

Fixes: QTBUG-111439
Change-Id: I81d1cd140eea63f85628c3bef3a8f6db0a12096d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-25 16:53:00 +02:00
Topi Reinio d664cb4845 Doc: Exclude licensing header when including a .qdocinc
The \include command includes the source in its entirety when the
second parameter is omitted. This pulled in also the license header
which was visible in the generated documentation.

Add snippet tags and use them to extract only the content we need.

Pick-to: 6.5
Task-number: QTBUG-113138
Change-Id: Ie3fe2fede1e81d08201ec4353352ef069aebc388
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-04-25 08:07:20 +00:00
Jan Arve Sæther a0fb254915 Fix StackLayout to react to reordering siblings
When siblings in a StackLayout are reordered, we need to react, since
the sibling order corresponds to the "stack order"

Fixes: QTBUG-112691
Pick-to: 6.5
Change-Id: Ie768af34bf5ee9d15ca67d61a64115f3df31990f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-04-25 10:07:20 +02:00
Jan Arve Sæther b9524e4e8d Avoid rebuilding the layout before the component is complete
isReady() will only return true *after* componentComplete() and *before*
destruction is about to happen

There is no point in rebuilding the layout when an item is added or
removed before the component is ready, because there will be a full
layout rebuild as soon as the component is completed.

This is a preparation for fixing QTBUG-112691

Pick-to: 6.5
Change-Id: I6e19578d847c6d4518479bc00f21442333e0fb07
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-04-25 10:07:20 +02:00
David Edmundson 40889ffe52 qquickwindow: Clear hover when a window is hidden
This fixes a bug in the following sequence:
 - user opens a window
 - the window is hidden whilst under the mouse
 - later the window is reopened without the mouse being under the window
- with the lastMousePosition set an item underneath where the mouse
used to be gets activated.

On X11 we get a Leave event for the hidden window, this is not true for
wayland.

Pick-to: 6.5
Change-Id: Ib14e8dbe29f1ad9a71a488b671d226be1d017b8d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-04-25 08:07:19 +00:00
Andreas Eliasson 4f465236f2 Doc: Specify that class name must be fully qualified
To avoid confusion, all macros that take a class name as an argument should specify that the class name needs to be fully qualified, even
if you're already inside the namespace.

Fixes: QTBUG-110718
Pick-to: 6.5
Change-Id: Icaed4be5df44e8d35ef382a918246ed03b0bb0c5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-04-25 07:26:56 +02:00
Ulf Hermann 6186bc05ca qmltyperegistrar: Pass on type of enums
Change-Id: I1ee1efe31985b24923c024658adb2968dd2dfae2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-24 22:22:14 +02:00
Ulf Hermann 653a6ff82a QmlCompiler: Recognize QStringList and QVariantList as special lists
They are equal to QList<QString> and QList<QVariant>, respectively. We
cannot express this fact in qmltypes, but since those are builtin, we
can just hardcode it.

Task-number: QTBUG-112227
Change-Id: Iebeb5f6a5350d1c7184b1d9e6a38647e048c3806
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-24 22:22:14 +02:00
Ulf Hermann fa259ed4ff QmlCompiler: Allow conversion from QQmlListProperty to QList
In the happy case this just retrieves the internal QList from the list
property. In the sad case it produces a deep copy. That's not worse than
what the interpreter does, though.

Fixes: QTBUG-112227
Change-Id: I8b2b0ac74c90b6dcee876e83a64502756733c1c5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-24 22:22:14 +02:00
Ulf Hermann a7c92814f0 qmlcachegen: Add a --verbose command line option
This replaces the logging category magic to determine whether we should
output warnings.

Change-Id: Ibc95ed70227e3438504e921693aa4af9a1d0376e
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-24 22:22:13 +02:00
Ulf Hermann a3586e800e tst_qjsengine: Further decrease the object count on QNX
It still tends to time out.

Task-number: QTBUG-99168
Change-Id: I6526dca0d991293918bddd90acbc4cf8de7e8525
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-24 22:22:13 +02:00
Amir Masoud Abdol c838419824 Refactor the usage of icutils::Node
In Unity Build, on OpenSUSE, for some reason compiler confuses
the Node with an `int`. This refactoring resolves the issue by moving
the type into the `icutils` namespace.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Id379b9aff21b29115d4503791debd658f034a0cd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-24 22:22:13 +02:00
Fabian Kosmale 59567e25f6 QQmlEngine: Introduce markCurrentFunctionAsTranslationBinding
The general recommendation to handle language changes in QML is to
handle the LanguageChange event. However, if one is willing to tie
themselves to the QQmlEngine, we can offer a way to ensure that calling
a function will result in a traslation binding.

This might also be helpful for anyone implementing a translation system
different from Qt's, e.g. KDE's i18n.

Fixes: QTBUG-102393
Change-Id: Id4d7a401e0be9d65e1769c8471b26689f44bf66a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-04-24 22:22:13 +02:00
Ulf Hermann 7a3bd96a24 builtins: Mark list types to be extended by JS Array
This is in line with what we do in the compiler when resolving implicit
list types of other types.

Change-Id: I49b9ab62d0c38228c7c755b8cf47a7a11e2e0984
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-24 16:03:42 +00:00
Volker Hilsheimer 4c895241bf Fix various compiler warnings in tests
Comparison of variables of different types (int or size_t and bool),
missing override, lossy conversion from double to float.

Pick-to: 6.5
Change-Id: Iad4b18450ab0a0a1cab01fa524777e1441986875
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-24 13:15:48 +02:00
Leena Miettinen 86937f9313 Doc: Fix typo in QT_QMLLINTER_TARGETS_FOLDER CMake QML property name
Task-number: QTBUG-113116
Pick-to: 6.5
Change-Id: I8d2c1c2e8e96b365b4bd2e6c9a321cdf1824272b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-24 13:03:29 +02:00
Qt Submodule Update Bot d675224e38 Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: Id1a3683380b0d7e6bc5130be19c63a14da2844a7
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-04-24 11:03:14 +00:00
Volker Hilsheimer e4a2a999ae Popup: Document how to scale a popup
Add a code snippet, as Item::transform is not a notifying property
so the Scale item has to be instantiated and bound to separately.

Fixes: QTBUG-70939
Pick-to: 6.5 6.2
Change-Id: Ie0ca672dc65f5a44fa2ac2c3f3ee897a6d663d80
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-22 12:51:05 +02:00
Mikolaj Boc 7656d4922c Only signal list variable assignment once
Lists are internally cleared and each element is pushed to the back
from the source list in QML. Use nonsignaling operations for clear
and push and activate manually having performed the operations.

Fixes: QTBUG-112208
Change-Id: I1a995905f3fa758e4cc8c39b8576db668d84a067
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-04-22 07:10:04 +00:00
Volker Hilsheimer 528807e80c Tests: Silence compiler warnings when checking bitfields
MSVC complains about us comparing a bool to a quint32, which is the
underlying type for the bitfields in QQuickItemPrivate. Fix that by
replacing QCOMPARE(A, true/false) with the corresponding QVERIFY.

Pick-to: 6.5
Change-Id: I7f50e6276b592c9abe8ceaea95c9283a0c431c78
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
2023-04-21 16:43:23 +02:00
Volker Hilsheimer 3c08d08ae2 Accessibility: respect value in attached Accessible in controls
QQuickItemPrivate::accessibleRole is virtual and called by the framework
to determine the role of an item. The default implementation checks and
respects a possible Accessible attached object. However, subclasses that
override the virtual don't, so the attached properties are ignored, and
the class-specific implementation wins. This makes it impossible to
change the role of e.g. a checkable button.

To fix that, move the code respecting the attached object into a non-
virtual function that the framework calls instead, and only call the
virtual member if there is no attached object, or if that object is not
initialized with a role. Replace calls to the virtual from the
framework with calls to the non-virtual wrapper.

Do this for both QQuickItem and for QQuickPopup, and adjust the logic
in QQuickControl types that create an attached object and initialize
it's role when accessibility becomes active. Use the non-overridable
effective role value for that as well.

Add a test case, and to avoid any new framework calls to the virtual,
make it private.

Fixes: QTBUG-110114
Pick-to: 6.5 6.2
Change-Id: Ia709cecbd181b6d8ee3297a4af60c1e7db9a2c51
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-04-21 16:42:56 +02:00
Matthias Rauter 30c3a65b7b Fix button handling in MouseFeedbackSprite of pointerhandler example
HoverHandler does not react to button presses. Images to indicate button
presses are loaded but never shown because of this. This patch adds an
additional PointHandler which reacts to button presses.

Pick-to: 6.5
Change-Id: I60c1daef5144d7431605b0dc7dbedc0723a17fe0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-20 22:23:16 +00:00
Matthias Rauter 3b12b19847 Change hierarchy level of MouseFeedbackSprite in pointerhandler example
Hover events are no longer propagated to siblings when they have been
accepted by an item, at least for the time being. This patch changes
the hierarchy such that it works either way.

Fixes: QTBUG-111322
Pick-to: 6.5
Change-Id: Ied953a423954342c02e613af618be0784d6397ee
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-21 00:23:15 +02:00
Volker Hilsheimer c39f407a5a MenuBar: Clean up and stabilize test case
The test case fails frequently and flakily locally with the Material
style, because the exit transition of the static menu interferes with
the opening of the dynamic menu. Wait for the static menu to be
completely done with the exit transition before continuing.

As a drive-by, replace all QCOMPARE(actual, true/false) patterns with
QVERIFY.

Task-number: QTBUG-104323
Pick-to: 6.5
Change-Id: Ide90f0094b05d628a0eb047248a72c35bcb7cdc3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
2023-04-21 00:23:15 +02:00
Thiago Macieira 7c33b6e957 ACTION_IF: suppress GCC 13 warning about leaked dangling pointer
GCC 13 says:
In member function ‘void QAbstractAnimationJob::setState(State)’,
    inlined from ‘void QAbstractAnimationJob::setState(State)’ at animations/qabstractanimationjob.cpp:295:6,
    inlined from ‘void QAbstractAnimationJob::complete()’ at animations/qabstractanimationjob.cpp:528:13:
animations/qanimationjobutil_p.h:41:39: error: storing the address of local variable ‘wasDeleted’ in ‘*this.QAbstractAnimationJob::m_selfDeletable.SelfDeletable::m_wasDeleted’ [-Werror=dangling-pointer=]

This warning is produced when the action is "return" (used by the
RETURN_IF_DELETED macro) because we'd leave m_wasDeleted with the
dangling pointer. However, it's not really dangling because it was
deleted, but GCC doesn't know that.

Pick-to: 5.15 6.2 6.5
Change-Id: I3b169860d8bd41e9be6bfffd1757115520a67972
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-20 15:23:15 -07:00
Oliver Eftevaag b65c0ce133 Particle system example: qmllint and qsTr()
User facing strings are being translated, and all qmllint warnings are
gone. JavaScript statments no longer end with semi-colon, and some
whitespace changes have been made.

Pick-to: 6.5
Change-Id: I2a6792800ef3b8a0dc596632dcd3b7d76aa08fe3
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-04-20 22:02:39 +02:00
Edward Welbourne 66f167aedc XMLHttpRequest: Implement XHR.overrideMimeType()
It was missing from QQmlXMLHttpRequestCtor, making life painful for
XHR users.

It's a method that has existed in every XHR specification, and is
required, if the goal is to be compliant with any XHR web standard.

[ChangeLog][Qml][XMLHttpRequest] Added missing overrideMimeType(mime)
method. This function can be used to force the XHR object to parse the
data in HTTP responses differently than what the server suggests.

Done-with: Oliver Eftevaag <oliver.eftevaag@qt.io>
Task-number: QTBUG-53709
Change-Id: I9f8ff37e1604b95306a85fc7e64db6d111b9e069
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-04-20 22:00:44 +02:00
Sami Shalayel d7fac6923a QQuickItem: item stays pressed after DoubleClicks
Amends 72651a50f8.
This commit decided to ignore double clicks in the virtual
QQuickItem::mouseDoubleClickEvent().
If a subclass inheriting from QQuickItem wants to not ignore
a double click, it should override mouseDoubleClickEvent()
and handle the double click event accordingly.

Fix QQuickMouseArea::mouseDoubleClickEvent(QMouseEvent *event) to *not*
call the base implementation in QQuickItem after handling a double
click, because QQuickItem sets that double-click MouseEvent back to
the ignored state.

This was leading to weird behavior on platforms with touch
screens like Android or IOS where buttons "got stuck" after
a double click.

Fixes: QTBUG-112434
Fixes: QTBUG-109393
Pick-to: 6.5
Change-Id: I774189fbcb356b07336f35f053e05a12c34ce602
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-04-20 17:28:28 +00:00
Matthias Rauter 8d902def13 Remove reference to QQuickPointerScrollEvent in documentation
It does not exist in Qt6 and was apparently replaced by WheelEvent.

Pick-to: 6.5
Change-Id: I6b833e664d8e5e5d6e2bd23ed90695d43073decd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-20 15:59:21 +02:00
Fabian Kosmale 37c25c6e74 QQuickItemView: Skip instantiating delegates if size is 0
If the area of a (List|Grid)View is 0, then instantiating delegates is
pointless, as they couldn't be shown anyway. However, our current logic
could not handle this case well, and would end up instantiating a
delegate for every delegate entry if their size also ended up being 0 -
you can after all fit infinitely many 0 sized items into a zero sized
container.
Detect this situation in QQuickItemViewPrivate::refill and the
applyInsertionChange implementations. Note that we only exit early if
there are no visible items and the view is zero-sized; if there are
visible items, we still want to ensure that they are removed after all.

We also need to adjust a few tests which had zero sized views to no
longer be zero sized; otherwise they wouldn't have created their
delegates in time.

[ChangeLog][QtQuick][ListView][Important Behavior Change] If a ListView
has size zero, it won't instantiate any delegates until its size becomes
non-zero.

Pick-to: 6.5
Fixes: QTBUG-110625
Fixes: QTBUG-89568
Fixes: QTBUG-51773
Change-Id: Ibe0e6fa5f01784016882522c120d2fee38df285b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-04-20 09:26:38 +02:00
Sze Howe Koh db04cfb2d0 Doc: Re-phrase descriptions around read-only properties
The current text sounds a bit like it's describing a const value.

Change-Id: Idf9b8ae14ce032af7ac073419aba6250b26f5847
Pick-to: 6.5 6.2 5.15
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-04-20 15:26:38 +08:00
Qt Submodule Update Bot 409c2f5fdb Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: I628be320e1a19b30220f14ea818a3658abba7226
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-04-20 07:26:38 +00:00
Eskil Abrahamsen Blomfeldt ee017bd9cf doc: Expand module docs for Qt Quick Shapes
Give an overview of the module and some handy links and tips. This
also adds a note on how to get anti-aliasing with the shapes, as well
as a link to PathText as one of the supported element types.

Pick-to: 6.5
Fixes: QTBUG-106529
Task-number: QTBUG-112463
Change-Id: I137d25e2ca138454f913e92158d9286977457227
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-04-20 07:24:47 +02:00
Ulf Hermann 239ad232d0 Qml: Fix QQmlScriptString::isEmpty()
A QQmlScriptString without a d pointer is indeed empty.

Task-number: QTBUG-112859
Change-Id: Ic3aea676403bd815e73d26733392c7f6ac8b84b8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-19 20:01:09 +02:00
Ulf Hermann 7c2e31c34f QmlCompiler: Don't crash on bad list type in signature
Pick-to: 6.5
Change-Id: I2c4a4ffa810258134a29b87aff46e8eb544b6a55
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-19 20:01:09 +02:00
Ulf Hermann 1ceaeab982 QmlCompiler: Don't crash when checking for enum problems
When checking for CallProperty we want the call base, not the
accumulator.

Pick-to: 6.5
Change-Id: I24ac066dd440bde459e20b3cf962af04ca531629
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-19 20:01:09 +02:00
Fabian Kosmale 82f2ee8027 Binding: Reevaluate when before the target changes
...and do not warn about missing properties if when is disabled. Besides
avoiding spurious warnings, this also avoids modifying a property only
to restore its binding/value directly afterwards.

Note that when the binding gets re-enabled, we still trigger the
warning.

Fixes: QTBUG-112860
Pick-to: 6.5
Change-Id: I5ddd32f2de2dec9da372b08ab4bb5bdb88873e51
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-19 20:01:09 +02:00
Thiago Macieira 3bd201c4da CMake: use the output dir's .generated dir
It doesn't exist in the source dir because the files are, as the name
says, generated.

Pick-to: 6.5
Change-Id: I3b169860d8bd41e9be6bfffd1757127c90e0a6aa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-04-19 11:01:08 -07:00
Oliver Eftevaag 8b856a7d08 Remove qmllint warnings in particle emitters example
Pick-to: 6.5
Change-Id: Ibdf9bb196454bcfa4c46d237aa69928d3bc9a7a4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-04-19 20:01:08 +02:00
Oliver Eftevaag 482d6035a4 fix qmllint warnings in particle attractors example
Pick-to: 6.5
Change-Id: Ic3df17364aacd7aa02e843fd971470aa861df036
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-04-19 20:01:08 +02:00
Michal Klocek dac453a5eb Fix crashes after 645aaa25b1
WebEngine during page setup can create and delete
accessibility interface with QAccessible::deleteAccessibleInterface,
which will later on tear down end with a crash as lambda function
is called on non existing object.

In case accessibility interface is deleted do not try to call
repair window.

Pick-to: 6.5
Task-number: QTBUG-108226
Change-Id: Ic052d1b6c9c60168fb32f81134263fc484ee654b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-04-19 15:54:18 +00:00
Wang Chuan b994c7ffaf QQuickListView: relayout when section geometry changes
Section delegate items will now notify the ListView when their geometry
changes. Enabling the ListView to call layoutVisibleItems to rearrange
the delegate items based on the geometric changes made to the section
delegate.

The listener is added when the item is created or fetched from the
cache.

The listener is removed when the item is hidden or removed from the
scene.

Fixes: QTBUG-101985
Fixes: QTBUG-100002
Pick-to: 6.2 6.3 6.4 6.5
Change-Id: Ia7617424a8447ba82f62629d93b6a000a72bfc02
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-04-19 14:05:36 +02:00
Ulf Hermann b3281f123e Fix content pointer check for QObject*
It can actually be null rather than undefined. We need to generate a
separate check for that and output the correct error messages.

Amends commit 05f56d7c78

Change-Id: Ia795e31805181640cd5be19359af51067d3fc8d6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-19 09:30:58 +02:00
Mitch Curtis 50f4ed0e44 Material: fix floating placeholder text color
It should use the accent color when the control has active focus.

Pick-to: 6.5
Task-number: QTBUG-112650
Change-Id: Iab389ac4f7fa11e705f85b6a7d3c08e42aec6cd8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-04-19 10:57:44 +08:00
Mitch Curtis 2d99c70f98 Material: fix TextArea decorations when in a Flickable
This patch fixes the following issues when the Material TextArea is
attached to a Flickable:
- Floating placeholder text scrolls with the Flickable.
- When text is cleared without the control having focus:
  - Floating placeholder text is positioned incorrectly.
  - The floating text background outline gap is still open.
- The background outline color is incorrect when the control has focus
  (used primaryTextColor instead of accentColor).

Pick-to: 6.5
Task-number: QTBUG-112650
Change-Id: Icfa3517e4abcb1209ea2291dabdec225011f19ef
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-04-19 10:57:41 +08:00
Richard Moe Gustavsen fd489252a7 TableInstanceModel: handle roleName invalidation
roleNames are generally guaranteed to be stable (given that QAIM has no
change signal for them), except that resetting the model is allowed to
invalidate them. TableInstanceModel did so far not take this into account.

Handle this case correctly by snapshotting the current roleNames before
the model is reset. Afterwards, if we detect that roleNames has changed,
we throw the current model set up away and rebuild everything from
scratch – it is unlikely that a more efficient implementation would be
worth it.

Fixes: QTBUG-111987
Pick-to: 6.5 6.2
Change-Id: Id1e3b8e4f983c0f00fc7b30bd4897f1f7fcc3792
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-18 18:50:02 +02:00