Commit Graph

30010 Commits

Author SHA1 Message Date
Ulf Hermann 4b7566ade2 Doc: Properly document the remaining matrix4x4 methods
The documentation format for QML methods is peculiar, but this should
do for now.

Pick-to: 6.5 6.2
Fixes: QTBUG-90480
Change-Id: I0fdbb7f4a704990de1356010c8b7d44764b7e41a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-16 23:03:56 +00:00
Ulf Hermann a5fad649c3 QJSEngine: fix typo
Amends commit 0925c51c59.

Pick-to: 6.5
Change-Id: Ia0a42cd32813659a6e3d431e83506e82fac188bd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-17 00:03:56 +01:00
Ulf Hermann bf4882a146 Fix documentation for qmlInfo, qmlDebug, qmlWarning
They don't actually relate to QQmlEngine, and QQmlInfo itself needs a
minimal piece of documentation.

Pick-to: 6.5
Fixes: QTBUG-109760
Change-Id: I59b7f8ab75ca038591f5bec17079f0f597455d6c
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2023-01-17 00:03:56 +01:00
Ulf Hermann d77169117f qmlls: Re-enable tests
The qmlls binary was moved back to bin.

Pick-to: 6.5
Change-Id: Ie14a8562df320b0b76902ce36f6228fda57d4b67
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-17 00:03:56 +01:00
Ulf Hermann b0907db9ea V4: Do not shift heap pointer bits on arm64 Android
Memory obtained via mmap() is not subject to heap pointer tagging. We
don't need to impose the overhead of shifting the bits around.

Amends commit c7722d4ed6.

Pick-to: 6.5
Task-number: QTBUG-101686
Task-number: QTBUG-91150
Change-Id: I45dc291c5a1208dd747199f00f819e475d5c0aec
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-17 00:03:56 +01:00
Ulf Hermann 96f2d57fd6 QQmlJSScope: Restrict disabling of bogus gcc warning to gcc 12 and 13
Earlier versions of gcc don't seem to know this warning.

Amends commit 1d72f21415.

Pick-to: 6.5
Change-Id: If7e78b84b0c3cd2190c33591f0fdc9e677489d66
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-01-17 00:03:56 +01:00
Ulf Hermann 51089b3389 QML: Fix write back of Date values
A JavaScript Date object can be backed by QDate, QTime or QDateTime.
Allow those to be written back.

Pick-to: 6.5
Fixes: QTBUG-28981
Change-Id: Ic46b5c4daf75453f03e99470933cf179820e63ef
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2023-01-17 00:03:56 +01:00
Amir Masoud Abdol b5eecccec8 Slow Deprecation of FILENAME_VARIABLE, replacement by OUTPUT_SCRIPT
As discussed in the latest CMake API Review, we are deprecating the
FILENAME_VARIABLE variable name everywhere, and replacing it with
OUTPUT_SCRIPT.

[ChangeLog][CMake] The FILENAME_VARIABLE option of
qt6_generate_deploy_qml_app_script is now deprecated, use OUTPUT_SCRIPT
option instead.

Change-Id: Idd5795f660d2b713be8cdb5246f5725eca575085
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-16 21:12:55 +01:00
Tasuku Suzuki 74b9c2a96f Fix build with -no-feature-cursor
Pick-to: 6.5
Change-Id: Ibb89885c6cde3e49fffbc02f9c83880f2f2dda5d
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-01-17 00:36:26 +09:00
Oliver Eftevaag 7409c217e8 Quick examples: Modernize cmake files according to our guidelines
The following changes are made to the CMakeLists.txt files in all
quick examples:

- Use PRIVATE linkage when possible.
- Use qt_standard_project_setup()
- Set WIN32 and MACOSX_BUNDLE in qt_add_executable() instead of
  set_target_properties()

Pick-to: 6.5
Change-Id: I18217585aec56794b327f103d6959879df59d68a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-16 16:16:47 +01:00
Ulf Hermann 7b0b09d87c qmlls, qmllint: Avoid memory leaks
Pick-to: 6.5
Fixes: QTBUG-104643
Change-Id: I5ca0fea2ef6f822b70c08bc6e49f0d07a732b299
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2023-01-16 09:49:17 +01:00
Ulf Hermann aae67e762d qmlls: Output warnings as-is in tests
qmlls is quite chatty. To figure out what is going on, just pass the
warnings through rather than stringifying them all together.

Change-Id: If01bc75975b0d7b31c41c77529c3a5ccf87caefc
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2023-01-16 09:49:05 +01:00
Ulf Hermann e4b2ed4d41 tst_qqmlengine: Avoid some CMake warnings
Pick-to: 6.5
Change-Id: Iae9a5419634061dbaaa59127320eb59c8ef042b2
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2023-01-16 09:48:51 +01:00
Tasuku Suzuki e2c2b4633b Fix build with -no-features-draganddrop
Pick-to: 6.5
Change-Id: Ic7f3cb189cc7253907f1768e38b1e9f392b837d8
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
2023-01-16 15:21:23 +09:00
Morten Sørvig 9a1256fa5e wasm: implement stackProperties()
Implement stackProperties() for Q_OS_WASM using the
API provided by emscripten/stack.h, which is in practice
more reliable than pthread_attr_getstack().

This API returns the logical stack region, which can be
forwarded directly to createStackProperties().

Task-number: QTBUG-109942
Pick-to: 6.5
Change-Id: I123667ca76d51aeb89feac62feab73b72681f1a8
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-01-16 01:03:46 +00:00
Giuseppe D'Angelo 1d72f21415 Ignore a spurious -Wuse-after-free by GCC
GCC 13 seems to have a false positive here:

    In copy constructor 'QSharedPointer<T>::QSharedPointer(const QSharedPointer<T>&) [with T = const QQmlJSScope]',
        inlined from 'QDeferredSharedPointer<T>::QDeferredSharedPointer(QSharedPointer<T>) [with T = const QQmlJSScope]' at QQmlJSScope.cpp:33:11,
        inlined from 'Data::ConstPtr Data::get() const' at QQmlJSScope.cpp:244:37:
    /home/peppe/p/src/qt5/qtbase/build/include/QtCore/../../../src/corelib/tools/qsharedpointer_impl.h:296:80: warning: pointer used after 'void operator delete(void*)' [-Wuse-after-free]
    In static member function 'static void QtSharedPointer::ExternalRefCountData::operator delete(void*)',
        inlined from 'QWeakPointer<T>::~QWeakPointer() [with T = const QQmlJSScope]' at /home/peppe/p/src/qt5/qtbase/build/include/QtCore/../../../src/corelib/tools/qsharedpointer_impl.h:543:60,
        inlined from 'QWeakPointer<T>::~QWeakPointer() [with T = const QQmlJSScope]' at /home/peppe/p/src/qt5/qtbase/build/include/QtCore/../../../src/corelib/tools/qsharedpointer_impl.h:543:12,
        inlined from 'QSharedPointer<T> QDeferredWeakPointer<T>::toStrongRef() const [with T = const QQmlJSScope]' at QQmlJSScope.cpp:186:16,
        inlined from 'Data::ConstPtr Data::get() const' at QQmlJSScope.cpp:244:36:
    /home/peppe/p/src/qt5/qtbase/build/include/QtCore/../../../src/corelib/tools/qsharedpointer_impl.h:130:67: note: call to 'void operator delete(void*)' here

This makes qtdeclarative FTBFS in release builds.

Pick-to: 6.5
Change-Id: If7a7565a68a7eaa0770c41e4e7ad1288b460e7ef
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-01-13 15:55:41 +01:00
Richard Moe Gustavsen 55da2e6c99 HeaderView: Use Label instead of Text in the delegates
The Text item will not follow the application font.
So rather than using Text inside the delegates, use Label.

HeaderView doesn't currently have a font property that
can be set by the application, but using Label will at
least ensure that it ends up using the same font set on a
parent control (e.g ApplicationWindow, at the very least).

Pick-to: 6.5 6.4
Change-Id: I9b10a7b9ac74e6f67f0644f3a2376f13e3da2c8d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-01-13 09:37:35 +01:00
Axel Spoerl b139070654 Fix compile error in tst_qqmlpropertycache
The qt_meta_data_* names generated by moc have changed.

Pick-to: 6.5
Change-Id: I972774f33dab6ba8481dc335a6e04e64c658959a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-01-12 13:32:01 +00:00
Qt Submodule Update Bot 268eefddea Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: I3593ff71242fcf02560e70c01b42263414f77ba3
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-01-12 13:31:59 +00:00
Thomas Senyk 0359381bc7 Fix Animators in case of node recreate
Those node recreations happen when the RHI backend is recreated.
One such case is GLX_NV_robustness_video_memory_purge

In such cases QQuickTransformAnimatorJob::invalidate()
will be called, however the node will never be re-set

Pick-to: 6.5 6.4 6.2
Change-Id: I3136c220f41781689f4a271caf0543a3b659447c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-01-12 10:49:10 +01:00
Ulf Hermann c7722d4ed6 Change value encoding scheme to make space for larger pointers
On android and on some other platforms, the upper bits of a pointer are
significant. We need to store them in our JS value encoding. Shift the
bits around to make this happen.

We now can store pointers of up to 57 bits. That's enough for everything
we've seen so far.

Fixes: QTBUG-101686
Fixes: QTBUG-91150
Pick-to: 6.5
Change-Id: I72e0fe63b27fca94840f82963e4d3936b3581b28
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2023-01-12 10:49:10 +01:00
Terry Meacham c333d4108d Clamp zorder calculation to [0.0, 1.0]
On the Apple M1 chipset with clang 14 and above, the optimizer
will replace fmul/fsub with fmsub, which frequently produces near-zero
negative values. The viewport z clipping space is [0.0, 1.0], which can
result in the top-most layer being clipped.

Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-109739
Change-Id: I22b6c49f066444a102d8bbc2237e4aa9e8c89d8c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-01-12 03:49:10 -06:00
Richard Moe Gustavsen ebefb583c8 QQuickTableView: don't load any delegates if viewport has zero size
When TableView has a zero size, the viewport will have zero
size as well, and there is no reason to load any delegates.

This patch will ensure that we return early from
loadInitialTable() when we detect that this is the case.

This will also stop a warning from being printed when
the delegate has it's implicitWidth bound to
tableView.width, and tableView.width == 0.

Pick-to: 6.5
Change-Id: I659eb098f7c5c25c8359876f7664499381f94b98
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-01-12 08:28:55 +01:00
Richard Moe Gustavsen c5317b4b59 HeaderView: ensure that the implicit size is greater than zero
HorizontalHeaderView should have the same implicit height as the
delegate items it contains. And this height is reflected by
contentHeight. The problem is that the content height is zero at
start-up, before the view gets populated with delegate items.
The result is that the height of the view will then be zero at
start-up, which can lead to TableView not loading any
items at all.

This patch will therefore ensure that the implicit height of
HeaderView is 1 at start-up, so that the delegate items will be
loaded. Once loaded, the implicit height of the view will be
adjusted to the correct value.

Pick-to: 6.5
Change-Id: I5181840665f648275e28dd8fe943e759797388fa
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-01-12 08:28:35 +01:00
Shawn Rutledge 84d69e4695 Get flickThreshold, flickMaxVel and flickDeceleration from platform
Now they are slightly more configurable instead of obscure hard-coded
constants.

As a drive-by, remove unused header includes.

Task-number: QTBUG-35608
Task-number: QTBUG-35609
Task-number: QTBUG-97055
Change-Id: I092009477f5f58ad5952cf4650353bf8b05521ed
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-01-11 20:13:18 +01:00
Shawn Rutledge 41a43a9dfb tst_QQuickListView2::flickDuringFlicking: allow flicking less
The dynamic behavior of Flickable's animation will not stay fixed:
we want to make deceleration platform-dependent; and it turns out that
this test was expecting it to flick quite far after a series of touch
events, whereas if it decelerates faster, it does not get quite so far.
The exact amount doesn't really matter.

Pick-to: 6.5
Change-Id: I6b3507faf21aaaea72c5bed6b2b89d5530264310
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-01-11 20:13:18 +01:00
Shawn Rutledge 14321d2736 tst_QQuickListView::QTBUG_38209: QTRY_COMPARE_GE instead of QTRY_VERIFY
We need to see the values when it fails. It turns out that the movement
can be exactly 100 on macOS, and that's also "more than just a couple
pixels" so it should be ok.

Pick-to: 6.5
Change-Id: I4dcdf647886dd5dcc7267a32b1dd9858fdccf64d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-01-11 20:13:18 +01:00
Thiago Macieira 8f895ea26d QQuickListView: suppress GCC13 warning about maybe-uninitialized pos
It is initialized in all possible branches, except in case the
switch (headerPositioning) didn't match anything. We could fix that by
making that switch an IILE, but it doesn't cost us much to simply
initialize pos.

In function ‘constexpr const T& qMin(const T&, const T&) [with T = double]’,
    inlined from ‘constexpr const T& qBound(const T&, const T&, const T&) [with T = double]’
    inlined from ‘virtual void QQuickListViewPrivate::fixup(QQuickFlickablePrivate::AxisData&, qreal, qreal)’
qminmax.h:40:73: error: ‘pos’ may be used uninitialized [-Werror=maybe-uninitialized]
qquicklistview.cpp:1690:15: note: ‘pos’ was declared here

Pick-to: 6.5
Change-Id: Ide4dbd0777a44ed0870efffd1739193e2c1df40c
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-01-11 11:13:18 -08:00
Santhosh Kumar f043a3d0ff Make the Controls Fusion theme use the platform palette by default
The Fusion theme used a custom palette, which doesn't
work for all scenarios, such as palette changes in windows. This
patch modifies the Fusion theme to use platform palettes instead,
ensuring that runtime theme (light vs dark) and accent color changes
in Windows (for example) are picked up.

Any palette roles that the user has set via qtquickcontrols2.conf
will still be respected, as that palette is resolved against the
platform palette.

Fixes: QTBUG-106931
Pick-to: 6.5
Change-Id: Ia78df5eb9b4752e044d252c19f16f7f52483466c
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-01-11 20:13:18 +01:00
Thiago Macieira 89ee6026ff Remove redundant std::move() detected by GCC 13
QQmlJSScope::ContextualTypes::types() returns a QHash by const-
reference, which can't be made rvalue.

qqmljsimporter.cpp:581:71: warning: redundant move in initialization [-Wredundant-move]

Pick-to: 6.5
Change-Id: Ide4dbd0777a44ed0870efffd17394924871c28c6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-01-11 08:21:17 -08:00
Laszlo Agocs 1d4c34f091 sg: Ensure the layer is queried on the gui thread with Metal
...by using the new, portable swapchain proxy data abstraction.

Eliminates one Main Thread Checker warning in Xcode.

Pick-to: 6.5
Task-number: QTBUG-97518
Change-Id: Iea87fd3fd8ecf39807c2a203bf88e5baca55fa47
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-01-11 13:44:35 +01:00
Vladimir Belyavsky 5d082dc9b8 Fix positioning of text decoration with some fonts
Actually it just reverts 4db31cbd4e.
When calculating a position for a decoration, we should just apply the
decoration's offset to the line's baseline (line.y + line.ascent).
The regression was introduced by 54b5287adf4f5b004fcf47840c7f2e1e561a90c1
in Qt 5.6, when we switched from prepending leading to the baseline
of text and started appending it instead.

Pick-to: 5.15 6.2 6.4 6.5
Fixes: QTBUG-96700
Fixes: QTBUG-97594
Change-Id: I7f816b71859ffcb6b1c641f0c8b8e1d810bfc525
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-01-11 12:44:35 +00:00
Santhosh Kumar 6b4939df5c Fix connection leak in header proxy model
In header view, the header proxy model which acts as proxy for table
model, connects headerDataChanged() signal to a slot with both sender
and receiver as table model object. This connection happens each time
header view instantiates or model in the header view need to be reset.

In a case, where header view reinstantiated (released and loaded) and
table model not released, the newly instantiated header proxy model
creates a connection to the existing table model for headerDataChanged()
signal and this creates a connection leak.

This can be avoided by making header proxy model as receiver
similar to other slots within the proxy model.

Fixes: QTBUG-108610
Pick-to: 6.2 6.4 6.5
Change-Id: I1b250f98310e16743f7fc2c4cc11cbfb3d9fff45
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-01-11 13:44:35 +01:00
Oliver Eftevaag ae4a0c34c0 Remove spurious qDebug() statement
The qDebug() doesn't add any value to the example.

Fixes: 6.5
Change-Id: I73c1af251f342e3ed542f683dd0b3d71d92a3f58
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-01-11 13:44:35 +01:00
Oliver Eftevaag a62da4b06e Fix layouts and localstorage examples
The layouts and localstorage examples wouldn't work properly, since the
path to the initial qml file given to the engine didn't start with
"qrc:/qt/qml"

Pick-to: 6.5
Change-Id: I26b5bbf3f6e7078c4f4aba6bab6fc06451b49082
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-01-11 13:44:35 +01:00
Oliver Eftevaag 267da2e7a9 Make quick examples that rely on the shared files build with qmake again
In d270c51f81 the DECLARATIVE_EXAMPLE_MAIN
macro was modified to prepend the "qrc:/qt/qml" prefix to file paths that
should be loaded by the engine. But the patch forgot to update the
shared.qrc prefix, which means that the examples that relied on the
shared module, would no longer build out-of-the-box with qmake.

This patch solve the issue, so that the examples work with qmake
once again.

Pick-to: 6.5
Change-Id: I677c1e61423cf98c6a1030ce591707888456ef19
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-01-11 13:44:35 +01:00
Ulf Hermann 34331019c2 TextEditor example: Avoid deprecation warning
What we want there is intercept the URL through the QML engine. No need
to dig out the specific QQmlFileSelector for that.

Pick-to: 6.5
Fixes: QTBUG-102777
Change-Id: I5ca59316a2434013f91afdf92d3e397ea2711128
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2023-01-11 10:14:00 +01:00
Ulf Hermann e9e315da06 QML: Document that internal contexts are read-only
Pick-to: 6.5
Fixes: QTBUG-69075
Change-Id: Ia671a74ede08f71e73344e2a4fe135cda6a95a64
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2023-01-11 10:13:39 +01:00
Ulf Hermann ed8618a82d Allow building the JIT on solaris
It's not really supported but we can add this one clause if it helps.

Pick-to: 6.5
Fixes: QTBUG-100010
Change-Id: Ibdc54b9da0ca9b4e92851dd9bbe2abf1a9b693c7
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
2023-01-11 10:13:30 +01:00
Richard Moe Gustavsen df4b108480 QQuickSelectionRectangle: disable tapping through the selection handles
We need to create a dummy TapHandler on top of the selection
handle to stop the user from able to trigger a TapHandler
on an item underneath it.

The default gesture policy will stop a TapHandler underneath
from triggering, but it will not stop it from emitting
"pressed". We therefore also need to set a policy on the
handler that let's it take an exclusive grab.

Pick-to: 6.5 6.4
Change-Id: Ia49a4632b25b6c31a9c258f92880b95ad343e020
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-01-11 10:09:06 +01:00
Eskil Abrahamsen Blomfeldt 3352746b27 doc: Make sure QtQuick.Effects module shows in docs
This was missing some infrastructure to be generated.

Change-Id: I669193af2550bb6274b9f69fc3c852cf59e54f6d
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2023-01-10 21:12:58 +01:00
Semih Yavuz afc7928d1a QmlCachegen: Equality comparison ability to QObject *
We should be able to compare QObject * with QObject * or a
nullptr.

Pick-to: 6.5
Fixes: QTBUG-109377
Change-Id: I0e9d6fdc89cbb471774d6382316dfb4813310e1d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-01-10 15:09:23 +03:00
Peter Varga 1609f8628d Ignore DPR for image providers if the requested size is not set
If the requested size is not set, the QQuickImageBasePrivate::sourcesize
is -1. Multiplying it with devicePixelRatio is useless because it will
be still an invalid size and it will be ignored. Nonetheless,
QQuickImageBase::pixmapChange() will still divide the size with
devicePixelRatio resulting smaller images.

The issue is reproducible with the tst_qquickimageprovider auto test if
ran with QT_SCALE_FACTOR=2 set.

Pick-to: 6.2 6.4 6.5
Fixes: QTBUG-109854
Change-Id: I9fea39c34144e5eae7e421bccc8dc65388dd5b32
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-01-10 08:02:57 +00:00
Janne Juntunen 134e8e174c tst_qquickmenu: skip menuItem->isHovered() check on webOS
Opening a sub-menu by mouse hover is not a supported feature
on webOS, so that check caused a test failure.

Fixes: QTBUG-106491
Pick-to: 6.5 6.4
Change-Id: Ib5fc2013498d189df05be9399b5861197c4ed662
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-01-10 08:09:49 +02:00
Shawn Rutledge 19b94b05f9 Improve DragHandler tests for easier troubleshooting
- Sometimes you just need to see the touchpoints and centroids
- Delay long enough to see them
- Avoid QTRY_COMPARE when we're sure the event was already flushed
- Fix indentation

Pick-to: 6.5
Change-Id: I307963378c29fb285190657e7a0693888ad7c48c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-01-09 18:47:23 +01:00
Thomas Hartmann d77e96074a QmlDesigner: Update tooltips for item library
Pick-to: 6.2 6.4 6.5
Task-number: QDS-8314
Change-Id: I84da8724b1c7bb7eeb359ccec2213881610aeead
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-01-09 17:47:23 +00:00
Mikolaj Boc 84375e582c Drop the stackBase != (void*)0 constraint in qv4stacklimits
The assumption is incorrect on e.g. WASM where a 0 stack base address
may appear. Moreover, there is no mention of 0 not being a viable
address in pthread_attr_getstack's man page.

Task-number: QTBUG-109942
Change-Id: I37a8dc28735881a9c3d4a0bef1fc3a6de707e0aa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-01-09 17:47:23 +00:00
Richard Moe Gustavsen 9435b15498 TreeViewDelegate: add missing __ignoreNotCustomizable
Amends 0cd146b4b0.

Change-Id: I6aed2672e0ce1322bc045a8a931274a8bf2b97b8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-01-09 18:47:23 +01:00
Laszlo Agocs c204b2205c Prevent mixing up ShaderEffect materials
In 6.5 we tried to eliminate the unlikely, but possible case of a
forever-growing QSGMaterialType cache for ShaderEffects: in the
unlikely event a ShaderEffect continuously assigns new,
not-yet-encountered shaders as its vertex and/or fragment shaders, the
internal per-window data structure that holds a unique QSGMaterialType
value for each QSGMaterial(Shader) grows continuously.

Before 6.5 this table was only cleared when shutting
down. (simplified) To remedy this, 6.5 adds a simple reference
counting system that allows dropping QSGMaterialShader keys that are
not needed anymore, i.e. when all ShaderEffect materials with a given
set of vertex+fragment shaders are destroyed. But this ignored the
fact that 'new' is not a monotonic unique value generator: it is
perfectly possible that a previously encountered pointer is handed out
again after the previous QSGMaterialType with that same address was
deleted, thus the active renderers get confused when looking up their
caches based on the material type due to getting a hit if a given type
value is reused.

So we have no choice now but to make the type cache hold on any unused
(zero ref) QSGMaterialType to prevent key clashes. This reintroduces
the potential memory usage growth in the uncommon cases, but that
cannot be solved as things stand now.

However, as a small remedy, make QQuickWindow::releaseResources()
release this unused data. (this was not the case before 6.5, that
could not do this due to not knowing which QSGMaterialType was really
in use)

This is safe to do only because all renderers on the same render
thread share the same internal ShaderManager object (which in turn
contains all material and shader related caches), so when the
QQuickWindow's main renderer drops its cached resources, the
ShaderManager is emptied, affecting all renderers in the same window
(render thread) (so e.g. all QSGLayers in the same QQuickWindow),
meaning if a QSGMaterialType value pops up again later on, it won't
accidentally generate a hit in the ShaderManager's tables for any
renderers in that window since they all use the same
ShaderManager. See ShaderManager in qsgbatchrenderer_p.h. and in
particular its ShaderKey-based hash tables for more insight.

So long story short, in the unlikely case of materials that
continuously vary their shaders and so their type, the continuous
memory growth can now be controlled as usual by calling
QQuickWindow::releaseResources(). It is not automatic, as the original
patch intended, but better than what was there before 6.5.

Amends c5fb2c10a1

Also restores the cleanupMaterialTypeCache (now called
resetMaterialTypeCache) approach from before the above patch.
Leaving things to the destructor is a bad idea when it comes
to the global static object.

Thinking long term, perhaps Qt 7 and beyond, QSGMaterial::type()
should be removed (relying on a pointer as a unique key is a mistake,
even though it makes creating simple materials convenient), and
instead the generation of unique keys and such for materials should be
performed internally in the scenegraph. But this then may also need a
revamp of the material APIs and system altogether, because while the
dynamic behavior a QSGMaterialShader can exhibit is massively reduced
in Qt 6 (it cannot randomly change GL state for instance), there is
still some, e.g. there is no telling what exactly the code in an
updateGraphicsPipelineState() reimplementation alters, or if two
material instances with the same set of shaders but a different
updateSampledImage() implementation are meant to be the same or not,
which in turn means the upfront unique key (type) generation cannot be
done by the framework but must be under the material writer's
control. Therefore it remains to be seen if this is
realistic/sensible. In the meantime we just have to continue juggling
QSGMaterialType pointers as needed.

Pick-to: 6.5
Fixes: QTBUG-109726
Change-Id: I0d3edf17d093773d858f6b796c60e128972142fe
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
2023-01-09 18:47:23 +01:00
Doris Verria 62ddf58c26 iOS style: Add ComboBox
Pick-to: 6.5
Change-Id: Ic688a2929bb7b38788b06468a5abccba8cd1f78c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2023-01-09 18:47:23 +01:00