Rather, print an error in the impossible case that tests run
interleaved.
Fixes: QTBUG-115951
Change-Id: I168ba88fef2d9c181db3b975317cb3a99dc05083
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: André Klitzing <aklitzing@gmail.com>
(cherry picked from commit 5fd2223d44)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qmlformat was erroneously adding an extra space in target bindings like
"Behavior on opacity {". The extra space is removed, and the tests are
updated to prevent regression for this behavior.
Fixes: QTBUG-114801
Change-Id: I79f563e40c75a325ab13f1fbffd73daa71fe1ec9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 08667fa4af)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
None of these tests care about Accept-Language, which
QHttpNetworkConnection sets automatically based on the system locale,
so testing for it (by including a line for it in .expect files),
setting it and skipping tests due to its "locale-dependence" were all
unnecessary. Just tell the test-server to {{Ignore}} the value of the
header.
This failed on Android due to one of the data files being unfound, so
fix access to that file. At 6.5, the responseURL test hadn't yet been
added, so exclude its change from the pick.
Change-Id: I560ead8b3ace6a5df173d96aea10f8dac3ed1124
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit d0a2f511f3)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
When using a standard key for the sequence property, the key may resolve
to multiple sequences, depending on the platform. This results in a
warning, which tells us that only the first sequence gets assigned
to the shortcut and that one should use the sequences property
instead. Add a note about this in the documentation as well.
Also, change the top-most example to use sequences instead sequence.
Fixes: QTBUG-115947
Change-Id: I9f65e0e9ac9473f536616fc3979965bc4702f6b8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 5c402af75f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
7a5bbc2315 repositioned items upon
startup, but didn't account for items added afterwards. Do that here
so that semi-transparent pages don't show pages beneath them.
Fixes: QTBUG-115468
Change-Id: If5ca587a6c14ddae5108c0a45d13fa2d290d1865
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 2cf897f2a1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Taking the translucentPages component from
SwipeView::test_initialPositions into a Qt Quick app and running it
showed that the Text items weren't actually filling the SwipeView. The
documentation states:
"SwipeView is populated with a set of pages. One page is visible at a
time."
The implication here being that each item fills the SwipeView, hence only
one being visible at a time.
It also states that SwipeView manages the geometry of items:
"Note: SwipeView takes over the geometry management of items added to
the view. Using anchors on the items is not supported, and any width or
height assignment will be overridden by the view. Notice that this only
applies to the root of the item. Specifying width and height, or using
anchors for its children works as expected."
So, this patch corrects the behavior and updates the test.
Change-Id: I3425d4d028743f440f003e86ba009a2da7cca9cb
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 08b2302310)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The current documentation leads the reader to think
that all items are always pooled as soon as they
are flicked out the viewport. Add a small note that
explains that this is not always the case.
Task-number: QTBUG-115317
Change-Id: I31bc7920ae7fa2477764f1f2ce33a29ef6825a3f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit c0ab315b85)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The overlay filters wheel event for the popup item as part of patch set
caca7d7d4f. These events are consumed by
modal popup when the top level item is not its child. In a case, where
top level item is a child of overlay and stacked higher than popup, the
wheel event should be delivered to the top level item.
This patch set validates item at the top is child of overlay or popup
item and deliver wheel events accordingly.
Fixes: QTBUG-113842
Change-Id: I2d27c09738742ef5ae25e42eca3747f1631baa6c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 5ebed8ff9e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There's no harm in customizing these, and especially the contentItem
and footer need to be customizable, as that's where the content and
any customized OK/Cancel/etc. buttons go.
This fixes warnings in the testbench manual test.
Currently only the macOS styles has implementations of these
controls.
Change-Id: I09678c777088786961583724d68dc2c3f6d90895
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 15894c3ca7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On this line group->currentTime() defaults to 0 if animationInstance of
group is null. This happens to be the value the condition is checking
for and leads to a failed Q_ASSERT(animationInstance) in
animGroupPriv->restartFromCurrentLoop(). Add a check for nullptr to
cover this case.
Amends 0e69268b49
Task-number: QTBUG-68404
Change-Id: I12236be3b42fc6bd2d185943f9e0474655d8a4c9
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Inho Lee <inho.lee@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 07ca60dcc5)
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Since QByteArray is sequentially iterable and we allow any sequentially
iterable type to be constructed from a JS array, we also need to allow
this.
Fixes: QTBUG-115733
Change-Id: I6ffd5eaad0e587ea1cafbe0c1b0179202f3f28cf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 9599f4c553)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Currently, GridView.isCurrentItem example is located under the
GridView.view : GridView header. Moved this example to the
GridView.view : GridView header.
Task-number: QTBUG-61646
Change-Id: I45c95e13afac6c95d621cee9643868f7da38cb8a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 0a9bcd8951)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some properties of one of the member animations in a group
animation can be changed after the group animation initialized.
1. If the group animation is already proceeding, they will
affect the next loop.
2. If the group animation started but does not proceed, they
will affect the current loop
Fixes: QTBUG-110589
Fixes: QTBUG-61282
Fixes: QTBUG-95840
Change-Id: I018105bdd75dd5bd7c24e9126853cd79c8f0123b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 0e69268b49)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The common theme amongst these is that this author detected in split
seconds that fixing the loop was easier than performing the #undef
QT_NO_FOREACH dance.
Naturally, all these fall into the category "loop over (readily made)
const local variables", which cannot possibly require the safety copy
that Q_FOREACH unconditionally performs.
Task-number: QTBUG-115808
Change-Id: I652562711ae43e8bb36493ea990114d91c5b7d5d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 49e5532463)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Swipe items that are direct visual child of SwipeDelegate control can
consume mouse events. But, if its configured within non-visual item
(such as row or column layout), the mouse events are not being
propagated.
This patch set fixes this issue by identifying visual child that can
consume mouse events at the event position through
QQuickSwipeDelegatePrivate::getPressedItem() and propagate it
accordingly.
Fixes: QTBUG-104904
Change-Id: Ie7458db26d0d5fe1dd767326bb84605d06ba2ae8
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 85633bb9fe)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Whenever a \table follows a \value, the contents of the two commands
merge, which breaks the table formatting. Fix this by adding a \br
before the \table.
Fixes: QTBUG-115537
Change-Id: I8e5836a8fc82dc9e59eb5fe210da9996d4f66d95
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit e80921b01f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This happens because the generated code contains
class X {
~~~~
private:
friend class X; // warning here
};
Says GCC13 (e.g.):
tests/auto/qml/qmltc/QmltcTests/.qmltc/qmltc_test_module/inlinecomponents.h:421:18: warning: class ‘QmltcTests::inlineComponents_IC0’ is implicitly friends with itself
421 | friend class inlineComponents_IC0;
| ^~~~~~~~~~~~~~~~~~~~
It seems the intended check for documentRoot doesn't work in all
cases, so do the check on the class-name level.
There appears to be no -W flag to control this warning, therefore no
apparent way to suppress it, so we need to fix it.
Amends either b89a92053e or
0990b892ca. I didn't dig into it
further.
Change-Id: I3fe653a398ea5b7a3e045fd3ea8dfb5d5c0f2e5c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit a5377f32e1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-cherry-pick to 6.5: only the first point was kept. QQmlSA didn't exist
yet in 6.5 and the other change would require changes to the public API.
Here are the sorts of things that were found:
- Uninitialized variables containing garbage.
- Calling member function through nullptr (where this is not actually
used inside the function because that would trigger a segfault).
- static_cast'ing double to int where the double is either +/-infinity
or is outside the range of min and max values for int.
Additionally, the uses of QJSNumberCoercion::isInteger() in the code
generator have been replaced by QJSNumberCoercion::isArrayIndex() and
the former was deprecated as it is no longer being used.
Change-Id: I9318671ccbda37e5519f4fcb84a1537585c2103f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 9df4293adf)
As mentioned in the comments of QTBUG-68434, popups always inherit
their attributes from the parent window (unless they are explicitly
bound like in ComboBox). However, ComboBox was made an exception,
because the popup is an integral part of the control.
This means that although the following snippet shouldn't change the
background color of a Popup, it should do so for ComboBox's popup:
Rectangle {
Material.theme: Material.Dark
ComboBox {
model: 5
}
}
However, this didn't work.
Before 3ec6d04d97, material/ComboBox.qml
had the following binding in the popup's background Rectangle:
color: control.popup.Material.dialogColor
That patch changed it in order to get deferred execution working:
color: parent.Material.dialogColor
This causes the color to come from the window rather than the popup.
This would have almost been caught in test_comboBox, had we checked the
actual color when setting the theme.
To fix the bug without reverting to the previous QML and breaking
deferred execution, we modify findAttachedParent to return the popup's
attached object if the item passed to it is a QQuickPopupItem.
Doing this causes test_inheritance_popup to fail, so we fix that by
passing the attached object target (which can be a popup) to
findAttachedParent, rather than the item whose parent or window changed
(which is coincidentally what was already being done in initialize()).
The patch also adds categorised logging to help debug such issues in
the future. Conveniently, this will also help users who want to debug
their own QQuickAttachedPropertyPropagator subclasses, without them
needing to modify Qt itself.
Fixes: QTBUG-115322
Change-Id: Idc0495023a058bcb033c4002fb6ad233bae9feae
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit c6b401a31a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Follow the qtbase change that, for now, makes the Metal backend of
QRhi never initialize an MTLBinaryArchive, meaning the pipeline
cache will be completely empty. (from Qt's perspective, the OS
will likely do its own persistent caching regardless)
Task-number: QTBUG-114338
Change-Id: Ic2c2488029d77c23f1183b36248aaaa15dd275ad
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit ea63dbfa19)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Not setting DirtyGeometry leads to subtle update problems in
scenes where the value is dynamically toggled. Most commonly the
changed mirroring value does not always take effect, but rather
only when something else triggers something geometry-related.
Change-Id: I6a00e1399ebeec3120b0f695cf0e10507f0ad807
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 45baa640b9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The logic in our IdentifierHash assumes that every entry is a
StringOrSymbol; however, IdentifierTable::asProperyKey will convert keys
that look like numbers to ArrayIndex instead.
This is noramlly what we want, and not an issue, except for
setContextPropery where the user can pass an arbitrary string that is
not necessarily a valid identifier. In an ideal world, we would just
disallow such identifiers, but for backward compatibility change the
code to handle this case (avoiding a Qt internal assert).
We only need to modify the QString overloads, as those are the only ones
that interact with unsanitized user input.
A later commit will modify setContextPropery to warn if the key is
numeric.
Fixes: QTBUG-115319
Change-Id: Ifc4e4d2bc99321836e6976c4cbd0c5ff687b430c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit b2b90c7cf5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Calling both setObservers and prependObservers doesn't make sense:
setObservers is for the case where we don't have a binding, but
obviously we do have one here.
Note that the test case still passes even without the fix - it will
however cause a memory leak which can be detected by ASAN. The leak is
fixed by this patch.
Fixes: QTBUG-115251
Change-Id: I4b420e05f49acf764da6a05af522390005276f49
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 366fee74fc)
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Counter-intuitively, this is done by setting the timestamp. Every time
you construct a new mouse event, you always need to call setTimestamp()
for the obvious reason: the timestamp is not a ctor argument, but it's
important for some event receivers. But the non-obvious reason is that
QMutableEventPoint::setTimestamp() has other useful side effects:
the velocity calculation is done there, sensibly enough. But to make
that possible, it also looks up the persistent QEventPoint with the same
ID as the one in the QMouseEvent, and that's the most important to fix
QTBUG-114258 specifically.
QQuickFlickablePrivate::handleMoveEvent() calculates delta as
QEventPoint::position() - mapFromGlobal(globalPressPosition())
and then QQuickFlickablePrivate::drag() does the drag threshold check.
If globalPressPosition() is 0,0 because the persistent QEventPoint
was not passed along in the mapped QMouseEvent, that delta is nearly
always over the drag threshold. So Flickable took the exclusive grab
at the first possible opportunity: the second move after press.
Fixes: QTBUG-114258
Change-Id: Icaf7fb8fde0ef01b486ccf16852ef0f6cfb6a64c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 7ae07f49c1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QQuickAbstractButtonPrivate::pressPoint may not be set correctly,
and we don't need it for this purpose anyway in Qt 6, since every
QEventPoint is supposed to remember its own press position.
Task-number: QTBUG-61783
Change-Id: Idd82f3d79b1167a40f28669d15b5974c7d240a9c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 0f4eb2320c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
While we shouldn't convert to QVariantMap if only QVariant is requested,
we should convert if QVariantMap is explicitly requested. QVariant can
hold QJSValue which is a better fit for objects with properties.
QVariantMap cannot hold QJSValue. A best effort conversion is still
better than an empty map.
Amends commit 47678c682f.
Fixes: QTBUG-115523
Change-Id: Iaa96809ee411dc0db95311c641c4e3f1f51a6026
Reviewed-by: Amanda Hamblin-Trué <amanda.hamblin-true@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit afe96c4d63)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In the presence of incomplete type information we may otherwise conclude
that the value type is QJSValue and generate broken code.
Change-Id: I533f704a422d0efe8b7b5bb0a170966e9f290b1f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 81bab13560)
Amends a432970b25
As a drive-by, remove redundant categorized logging output, which
wrongly implied that starting scale could be set from the target scale.
Task-number: QTBUG-76739
Task-number: QTBUG-94168
Change-Id: I1fad79b58fa20e165fd21bc593a27cff8378b7ea
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 442eeba672)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Otherwise the const wrapper will be swept while the object should still
be alive (and vice versa).
Amends commit d3b3fef5a8.
Fixes: QTBUG-114596
Change-Id: Ib4d8e9f805a229a471ca72f5ff357e3a4c9999a5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit ffa15d0e21)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We cannot just sort the raw values. We have to take the offset into
account. If the array wraps around the end of the allocation, we have to
move it around to be contiguous.
Fixes: QTBUG-58718
Change-Id: I1866b3f271d97352e250d687955af3fc54340334
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit f0b2fbcf47)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the CLASS_NAME is not specified and the BACKING_LIBRARY exists
we should get the plugin CLASS_NAME from the backing library, but
not from the non-existing plugin target.
Change-Id: I51ba2290f8f9cb8bcf4217f535c6aa4e676f7293
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit e97f1631c1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We don't need nested hashes there. A single hash is enough, and we also
don't need to key it by pointers. Keying it by internalName instead
makes the ordering deterministic. We also don't need to duplicate-track
the variable names when outputting the declarations anymore.
Verify that qmlcachegen's output is actually stable by compiling the
entire test data for tst_qmlcppcodegen twice, packaging the generated
code into the resource file system, and comparing it in a separate test.
Fixes: QTBUG-115159
Change-Id: I659661e58a52ed9ff308c83d6c821cf016f2e94e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit fb4cc245e0)
A method can belong to a QObjectWrapper, a QQmlValueTypeWrapper, or a
QQmlTypeWrapper. store only one wrapper pointer and allow for all
variants. Furthermore, keep a reference to the wrapper so that it
doesn't get garbage collected. We still need it to retrieve the
metaobject, even if we're calling the method on a different instance.
Fixes: QTBUG-115115
Change-Id: I1759fb687918ff79829fef776e0a93d29373b30f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 63b622d590)
If you have many arguments, the argument ranges can overlap. In that
case memcpy is UB.
Fixes: QTBUG-115320
Change-Id: I54dd4d7762e7278502954b8ac2cb4af1197ce88c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit d4a6673d2e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Also, changed one of the example pages to a tutorial
page.
Task-number: QTBUG-115297
Change-Id: Ife1b740523039b9287008a1c5243edfc4c1349d1
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 2983a38c1d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Exclude TUs that cause problems in a build where all of QtQuick's .cpp
files end up in a single unity_0_cxx.cxx. This should ensure that the
build will forthwith not fail because someone added a new .cpp file in
the "wrong" position.
Of course, this is just a snapshot, with my configuration: Clang 15,
Ubuntu 20.04, -developer-build, C++23, -sctp, libc++, ...
Task-number: QTBUG-115140
Change-Id: Iea1fd344541b966add097a7e0c144a427edabd94
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 174e3fd026)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>