Keep them in a special generated struct with virtual method that gets
called from the GC for each frame.
Pick-to: 6.10 6.9 6.8
Fixes: QTBUG-139059
Change-Id: I81bcbeab6531e174a5207d03f57d241461ae9ba3
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
While the Sequence is detached it is subject to the GC or
unrelated C++ code deleting objects from its internals. Since it's then
not the owning object's responsibility to track this anymore, we need to
track it ourselves. The way to do it is to use the existing V4 objects.
We don't have to store the sequence on the JS heap if it cannot store a
QObject. Only lists of variants or pointers are affected.
This independently fixes QTBUG-129972 for 6.8 where
VariantAssociationObject does not exist, yet. This is because the
detached sequence shown in that bug won't need to be written back to
anymore in order to stay up to date.
Pick-to: 6.10 6.9 6.8
Fixes: QTBUG-129972
Task-number: QTBUG-139025
Change-Id: Ib469c6c65f2f96041e2ad2fd106f8cd60a182e13
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Prepare for QTBUG-119163 that will require some kind of "force update"
to reconstruct the DomItem once the CMake build in the background
finishes.
Extract the version-testing logic into static methods, one to test the
version of the "normal" document, one for the valid document, and one
that acts on the results of the two first methods.
This will allow to pass a "force" flag in the future that skips the
version checks.
Also add capitalization to the warnings and correct typos.
Task-number: QTBUG-119163
Change-Id: Ia72be615b527a571332640ceb6c7f6085f03ded9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
m_state is never read and m_lastOpenDocumentUpdated is never written to,
so remove them.
Change-Id: I1ec093fee06d0852a2759e539295279575f361ac
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit adds an API to QtQuickView and QtQuickViewContent which
allows users to call QML functions, with the following limitations:
* The function parameters must have type information
* The function parameters must be supported types: real, double, int,
boolean or string.
* The function cannot return a value
In the case of functions in QtQuickViewContent descendant classes,
these limitations are enforced by the code generation in
androiddeployqt.
To continue the journey of a function call from Java to QML, this
commit provides a JNI function which takes the view memory address,
the function name and a list of parameters, which may be empty.
When called, the JNI functions will look for a function with the given
name and parameter count, and if found, will convert the data from JNI
types into the expected QML types.
After converting the data, the data and QMetaMethod are passed to
QMetaMethodInvoker::invokeImpl which actually invokes the QML function.
Task-number: QTBUG-137112
Change-Id: I6617e3f5e1ebfcec7e44887d4e01b5137245ac0d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
All other qsizetype <-> uint range violations are only warnings.
Change-Id: I611e423c115483e3f72b4cc542b3154478c347ca
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
We want generally want to throw an exception. Except in virtualMetaCall,
since that would lead to cascading exceptions. There, just return 0 to
notify the caller about the metaCall failure.
Change-Id: Ie3970d01a5b433100f9722a2f12843abfe8d512a
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
There is no way we can have produced an exception in
Sequence::virtualPut().
Change-Id: I1f6f4d933b34b9f86c3a9093929815e9071eb61e
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
We will get a different kind of storage in addition.
The unification of the different init() methods uncovers a bug: The
storage can indeed be nullptr when querying the size later. If you
construct a detached sequence from a null container, there is no reason
to create the internal storage. The size is evidently 0 in that case.
Fix sizeInline() to tell us as much.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-129972
Task-number: QTBUG-139025
Change-Id: I33347805fc79f81c69c3191a76ff9167186b43f0
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Each of those incurs a null check.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-129972
Task-number: QTBUG-139025
Change-Id: I7bc96755629d57e1a8f0bf69e0db8de8df737665
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
In order to determine whether we need to write back, conceptually we
need to know whether the sequence is a reference. That happens to be the
case if there is an object to write back to, but that's not how object()
was meant to be used.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-129972
Task-number: QTBUG-139025
Change-Id: Ie3e0e0318ecabd6f25d545d1198c07a0037b68fe
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
It gets in the way if kept seperate.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-129972
Task-number: QTBUG-139025
Change-Id: I105ee78e89ce561ec27e8badc27aa94a717ace39
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
It only operates on the heap object anyway.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-129972
Task-number: QTBUG-139025
Change-Id: I7e6c232fd68893429533e1b10363ef9922a33ae7
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
We want to encapsulate the container as much as possible.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-129972
Task-number: QTBUG-139025
Change-Id: I7cf991ea7a3a879584066e7121c49e102ebadf08
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
We don't want to expose it from Sequence's interface.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-129972
Task-number: QTBUG-139025
Change-Id: Iae144bb8a66a24660dd8da490edb0b4bd7cdc81e
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
We don't want to expose it from Sequence's interface.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-129972
Task-number: QTBUG-139025
Change-Id: I35c37ea1da675a83a1a8d3a4af08e4301c8cd60c
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
We don't want to expose it from Sequence's interface.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-129972
Task-number: QTBUG-139025
Change-Id: I12453fed0143e5e75dfc749b87b197ec328085f7
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
We don't want to expose it from Sequence's interface.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-129972
Task-number: QTBUG-139025
Change-Id: Ic001925c7fc1ae3be623e2fd7451f99d17899471
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Inline at() into its only caller, move size() further up to be visible
from all callers, and make them all static functions taking a
Heap::Sequence. This prevents them from being called from elsewhere and
improves encapsulation.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-129972
Task-number: QTBUG-139025
Change-Id: I65c724119c0df95f2d26116b3ff6ab0a4218d91f
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
It's fine to call them from Sequence and its helper classes, but it
shouldn't be called from outside.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-129972
Task-number: QTBUG-139025
Change-Id: I0bfe5d813ec8fdee6c814269df069935fe304ccd
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
We will need to befriend them.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-129972
Task-number: QTBUG-139025
Change-Id: I0d877627f2b838f2bf06a7049cd51927e13bd24d
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
We want to use it in other places.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-129972
Task-number: QTBUG-139025
Change-Id: I720c4a71144ab634d70a1ec0115ca81b8030d083
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
We want to encapsulate the container as well as possible.
Pick-to: 6.10 6.9 6.8
Task-number: QTBUG-129972
Task-number: QTBUG-139025
Change-Id: I87841fbe9a9c9f1756eddc979b82ec8b90eec8e2
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
tst_QQuickTextEdit::inFlickableTouch is flaky due to the view being
repositioned after initialization, which shifts the window downwards.
This new position causes the flick gesture to fail.
Unblacklist tst_QQuickTextEdit::inFlickableTouch on openSuSE 15.6
Fixes: QTBUG-118066
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I0d85d756594aa1976fff1f06f21b54a909474150
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Without this, it tries to resolve the metaObject of QVariantMap, which
crashes.
Fixes: QTBUG-139626
Pick-to: 6.10 6.9 6.8
Change-Id: I9248f57c428810024f9983df959f475e6557576c
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
"valueType" is ambiguous. The prevailing meaning is a type that's passed
by value in QML. We mean the type of the list contents (or elements)
here.
Change-Id: Iaf4c0efe272dc6ec7511d2361e7e5ce475936fba
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
e7b90cfc31 changed the default to 1
second, which results in a failure:
FAIL! : tst_qquickanimatedimage::playingAndPausedChanges() QTestLib: This test case check ("!obj->isPlaying()") failed because the requested timeout (1000 ms) was too short, 1050 ms would have been sufficient this time.
Bump it to 2 seconds.
Task-number: QTBUG-138662
Change-Id: I3ccbc5c6a13ac45752b252263e925ceb9edc6a5c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
e7b90cfc31 changed the default to 1
second, which results in a failure:
FAIL! : tst_TouchMouse::pinchOnFlickable() QTestLib: This test case check ("(flickable->isFlicking()) == (false)") failed because the requested timeout (1000 ms) was too short, 1200 ms would have been sufficient this time.
Bump it to 2 seconds.
Task-number: QTBUG-138662
Change-Id: I3e9b0e600bac879c506d23255e8587197e171d21
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The ScrollBar's handle would either use palette.dark or palette.mid.
Using the outline colors instead should create more contrast between the
background and the ScrollBar's handle, which is what we want for high
contrast mode.
Task-number: QTBUG-134971
Pick-to: 6.10
Change-Id: I3527f57f498415463016e3c8ec42b6081922a688
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
The fusion styled File and FolderDialog's FolderBreadcrumbBar would grow
in width as the number of nested directories in the currentFolder path
would grow. The other styles would give it a maximum size, which would
limit how much it could grow, but not the fusion style.
The FolderBreadcrumbBar's width also affects the entire FileDialog
default (implicit) width, which would cause the entire dialog to expand
as you'd enter more directores. This was unintuitive, and not something
that any other file dialogs do.
Let's make the fusion style FileDialog behave like the other
FileDialogs.
Pick-to: 6.10
Change-Id: Icd67803b6e205ac9224b2561417667b4893a4e87
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
The test case tst_qquickmenu::loadMenuAsynchronously is getting flaky,
w.r.t warning message, sometimes depending on the platform, and so it's
required to extend the regex to consider that case.
Amends patch: 28553473cf
Task-number: QTBUG-139552
Change-Id: I4766c7ac52a586dcf5b470ce5a676a51e2503cb5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
It's causing a lot of flaky failures, so blacklist it until it can be
fixed.
Task-number: QTBUG-131695
Change-Id: I81835fe1af677899abcc26534c5fd95dc69004cb
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
The test was still not account for safe margins in few places,
it seems it didn't account for the fact that Android apps will
have the margins set from the start.
Fixes: QTBUG-139583
Pick-to: 6.9 6.10
Change-Id: Ia04a0ca2e7ad96a1e72a0d7fe9416634fb24e116
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The RadioButton's indicator would not use the same colors as the WinUI3
RadioButton for users that had enabled a high contrast theme.
The indicator background is normally a ColorImage. But for high contrast
themes we prefer to keep things simple, and draw simple colors on top of
the image. It is possible to change the binding on the ColorImage to use
desired high contrast theme colors from the palette, but doing so will
slightly alter the colors used, due to blending with the pixel values
from the underlying png image used by ColorImage. Thus we put a
rectangle on top, so that high contrast themes become independent from
it.
Task-number: QTBUG-129088
Pick-to: 6.10
Change-Id: I57ef286584f7df2c26bacbc0bc9f3bcb7a1a64cd
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
The CheckBox indicator uses a ColorImage to blend the pixels of a
png image file together with a QColor, in order to determine the colors
that the indicator should use in any given state (e.g, checked,
unchecked, hovered, etc).
Unfortunately, blending the ColorImage with a color has its limitations
when enabling a high contrast theme on Windows 11, such as when the
checkbox is in the pressed and unchecked state, where the color image
background will typically be mostly black, and this make the color
bound on the color property much darker, or in this case, completely
black.
To get around this issue, we now have a Rectangle on top of the
ColorImage, which is normally transparent, except for when high contrast
is enabled. In that case, it will be rendered on top, and use the exact
desired colors.
Pick-to: 6.10
Task-number: QTBUG-129088
Change-Id: Ic65218d3759495611772f010c86a85109faaaadd
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
_qt_internal_android_get_target_deployment_dir no considers
QT_USE_ANDROID_MODERN_BUNDLE and produces correct target deployment
path even if the flag is disabled. In this case path matches to
the top-level Android target build directory.
Change-Id: Ia5817bf02dc7a8844fb8671d1945f1592af6b675
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
The test case added as part of patch
36216db956 shows up warning
"There are still \"n\" items in the process of being created at engine
in destruction.\". This patch allow this test case to pass if fail
on warning enabled for the quick menu auto test.
Task-number: QTBUG-137160
Task-number: QTBUG-139552
Change-Id: I7f31ffd096cc10b514542092a85f346e413b40dd
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
We were only testing the non-native file dialog under the Basic style
previously, but we have 4 other styles (Fusion, Imagine, Material,
Universal) that were never tested.
This unfortunately caused recent regressions in both the FileDialog and
FolderDialog.
By running each test once for more styles, we should be better
protected against future regressions in individual styles.
In this patch, we enable all tests for Basic, Fusion, Material and
Universal. The Imagine style is intentionally omitted due to a bug,
which causes the tst_qquickfiledialogimpl::defaults() test to fail.
This will be fixed later.
Change-Id: I9b4ab722c5ad3052122024ad3a7a2f0a99de77e6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Interacting with Popups in async Loaders caused a crash because the
popup's window was null:
1 QScopedPointer<QObjectData, QScopedPointerDeleter<QObje qscopedpointer.h 112 0x7fffe8effafe
2 qGetPtrHelper<QScopedPointer<QObjectData, QScopedPointe qtclasshelpermacros.h 137 0x7fffe8efd9c3
3 QQuickOverlay::d_func qquickoverlay_p.h 76 0x7fffe8f729d4
4 QQuickOverlayPrivate::get qquickoverlay_p_p.h 37 0x7fffe8f8c392
5 QQuickPopup::overlayEvent qquickpopup.cpp 3214 0x7fffe8f879c2
6 QQuickOverlayPrivate::handleHoverEvent qquickoverlay.cpp 192 0x7fffe8f6ee88
7 QQuickOverlay::childMouseEventFilter qquickoverlay.cpp 478 0x7fffe8f701e4
8 QQuickDeliveryAgentPrivate::sendFilteredMouseEvent qquickdeliveryagent.cpp 2897 0x7fffeb1bce04
9 QQuickDeliveryAgentPrivate::sendHoverEvent qquickdeliveryagent.cpp 1090 0x7fffeb1b25af
10 QQuickDeliveryAgentPrivate::deliverHoverEventToItem qquickdeliveryagent.cpp 1272 0x7fffeb1b2fd0
[...]
We can avoid this by unparenting the popupItem, which removes it from
stackingOrderPopups and hence excludes it from receiving events.
The fix causes a crash in QQuickDeliveryAgentPrivate::clearFocusInScope
after tst_QQuickPopup::closePolicy() finishes, because it tries to
access the now null window. Add checks for that.
Task-number: QTBUG-139306
Pick-to: 6.5 6.8 6.9 6.10
Change-Id: Id507e39497af3cacc832db4b23a2c27a0788dc74
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
In release builds, we don't want to generate code that indicate wrong
usage of the model, so 313e271c730f18e9a1afc05f754b5cba86013783 in
qtbase made the emission of stderr messages conditional.
Pick-to: 6.10
Change-Id: I51f773943387f099b943d7b7980b6b2485e189bd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The DialogButtonBox lacked an outline, which it should probably have,
when a high contrast setting is enabled. The Dialog had a subtle
outline, which we can make stronger.
Task-number: QTBUG-134971
Pick-to: 6.10
Change-Id: I56a9032161c6fe7d21d0e1d4ccdd1edbdc8bfb70
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Without \c{} '--' is rendered as a dash instead of 2 hyphens
Pick-to: 6.10
Change-Id: I8b78d8feaa2d1f20fdb9ecceb6b20c862d9da2d4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>