66041 Commits

Author SHA1 Message Date
Marc Mutz
2581730d88 tst_QRestAccessManager: leak less on failure
Move some deleteLater() calls to before the first QCOMPARE/QVERIFY
macros, so they get executed even if the macros return on failure.

This isn't an all-encompassing solution, but I lack the time to port
all this to smart pointers, and this is some improvement.

As a drive-by, port QVERIFY(opt.has_value()) to QCOMPARE(opt, nullopt).

Task-number: QTBUG-120307
Change-Id: Ia5a2cabd273a779938b22badc91b109fcc545203
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit d4aaf61b3333b48b4e79ad60b63bb50dbea72617)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-18 19:11:20 +00:00
Volker Hilsheimer
eed30ff352 Replace expensive inherits with cheaper qobject_cast (1)
The accessibility implementations require the type to be fully
defined anyway in order to call type-specific APIs, so there's no
need to use inherits(). Use qobject_cast instead.

Change-Id: I5c013be57f48272a748451f4888911fe6aa6574e
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit 3973d6c529605fbce8457d7663d244ebadbe7160)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-18 19:11:20 +00:00
Marc Mutz
dca3837201 qrestreply_p.h: include what you need
QStringDecoder within std::optional needs QStringDecoder to be fully
defined ("in-size" (Lakos)).

QByteArray, used as a function parameter, can be forward-declard,
though ("in-name-only" (Lakos)).

This also makes the header comply with Qt's private symbol versioning,
which requires every private header to include some other private
header, or, eventually, qglobal_p.h.

Amends 4da14a67a6157c415f8228a8bae7d6b0f895df7c.

Change-Id: I35fed05955f1194299162b576834c1045672bcac
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 96f78cbdd9412e6043bb4eb0d0dd818c5d800151)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-18 19:11:20 +00:00
Santhosh Kumar
732962d604 Support rendering CSS 'border' property for html table
We supported CSS 'border-width', 'border-style' and 'border-color'
for HTML tables since 8a9bec35fb0c60a0e5990c1a12ffe6f39fdbf2d.
Now we also support the 'border' property, which is shorthand to
set all four borders' width, style and color.

Fixes: QTBUG-123167
Pick-to: 6.6
Change-Id: I5f29b94ab9facf412a9c230d554efb5c69368b6b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 26e75d452eeb2762fa3ece1c63e94d01587c6260)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-18 19:11:20 +00:00
Eirik Aavitsland
f02ccd86c7 Avoid overflows in gradient calculations
Avoid the optimized fixed-point function for vertical gradients if the
parameters are out of range for that. Fall back to the general
gradient function in that case.

Fixes: QTBUG-120331
Pick-to: 6.5 6.2
Change-Id: Idf116f0077403531d9ea414e3043fdc92b6fe4a9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit ade33a91442f8085a7ddeb8e6fdf33463103b119)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-18 19:11:20 +00:00
Ahmed El Khazari
d77e099200 Android: Fix crash when selecting text on a TextField
The crash is due to absence of the helper class that manages the
selection in QtInputDelegate.
As a fix, updateInputDelegate() is introduced when setView(), where the
instantiation and clearance of EditPopupMenu is made. On the other hand,
the nullity of EditPopupMenu in QTEmbeddedDelegate is handled.

Fixes: QTBUG-122740
Change-Id: Iac5cded7be7530dde8c739265fc9402670714d39
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit a87764789feaa0575b9f4f0957bb7ec3e3b9a4d1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-18 19:11:19 +00:00
Lorn Potter
5f7324b20e wasm: fix linux touchscreen keyboard input
Fixes: QTBUG-124366
Change-Id: I9bd83ecb75b94efbf12b13055e292a74e6e9edcd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit d374dd6f84c74e6e0adf441f19af31a31074f7ec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-18 19:11:19 +00:00
Piotr Wierciński
d40f29353e wasm: Abort network request on destruction of QNetworkReply
Deleting QNetworkReply is a common way to cancel pending request.
Wasm implementation was not treating it properly.

Task-number: QTBUG-124111
Change-Id: I46d8624e323fca0932411c575922415d9f9d7986
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 655b98482e8339b287fb040fd25013dc1232a43d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-18 19:11:19 +00:00
Volker Hilsheimer
5519bf0cf9 Baseline tests: improve focus setting and clearing
Set focus on the test window so that the tested widget doesn't have it.
Remove the "PublicWidget" hack, we have public QWidget APIs to find the
next widget in the focus chain that we can use to transfer focus
reliably. Use TabFocusReason to maintain existing behavior, and to
test that widgets that handle that specifically appear correctly. Clear
the focus on the test widget by setting it back to the window after
taking the "focused" snapshot.

Add QCOMPARE and QVERIFY to assert that the test is in the right state
before taking screenshots.

Change-Id: Icef6ce1bb1c63c9f6cde7d0ddca82e693cace420
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit bf2ed624091d0239bce91a84df59b7afc843298a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-18 19:11:19 +00:00
Marc Mutz
76807bdfb7 androiddeplyqt: fix more missing pclose() on early returns
Found by Coverity.

This code predates the move of androiddeployqt to qtbase.

Pick-to: 6.6 6.5 6.2 5.15
Coverity-Id: 378442
Change-Id: Icc24918159132c55a3817eaf19c96ea212dfa6dc
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
(cherry picked from commit db240d99cffbc3af2eb39a5f7d48e68e57b85271)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-18 15:55:31 +00:00
Marc Mutz
950123bfbc androiddeplyqt: fix missing pclose() on early return
Found by Coverity.

Amends 5bb178c479a247720fbc3fbb7f06a32b725193ac.

Pick-to: 6.6 6.5 6.2 5.15
Coverity-Id: 378357
Change-Id: I8839280ce15d8e7d9e1f4024ca796c2d8b4ed930
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
(cherry picked from commit c64b30129d7c6c7f99b6abc3f42d32fb61e27f76)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-18 15:55:26 +00:00
Marc Mutz
5b3143fce6 QEglFSKmsGbmScreen::framebufferForBufferObject: release() at the correct time
It's the gbm_bo_get_user_data() function that takes ownership of the
FrameBuffer object, not the caller of the function, so release() into
gbm_bo_set_user_data() not into the return. This threw Coverity off,
which complained about a leak of the return value in the caller.

Amends 2f0fa59d5903d4c9596ed42dcbaa9da0f77c78da, but not picking
through all the refactorings the code has since seen.

Pick-to: 6.6 6.5
Coverity-Id: 444117
Change-Id: I5f058e4a42942349193eecfd8c00ec9499ef4886
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 1cfe42235c4496f68195385507dbaa553d04aee5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-18 15:55:23 +00:00
Thiago Macieira
f84f752864 CBOR: Remove dead code: len[12] are not used with UTF-16
The lengths are only needed to check if one of the two strings is empty
and in the direct 8-bit comparisons with memcmp(). So we don't need this
division by 2, which was here since the initial commit.

Amends d4c7da9a07dc1434692fe08a61ba22c794574c4f.

Change-Id: Ie28eadac333c4bcd8c08fffd17c5ecbce564ccd1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit a7b9ec7f6f465ce0d90edfe7154a4837b1fb9c00)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 21:08:58 +00:00
Tor Arne Vestbø
3e3bfcc731 QWidget: Remove un-needed nullptr check for oldtlw
Added in 1bd755465efa27294362925f55306f88f1800936

We already access oldtlw and oldtlw->d_func() in other places,
and the source of oldtlw is a call to QWidget::window(),
which returns the widget itself if it doesn't have a parent.

This should also fix a CodeChecker issue where it thinks
that the other unchecked accesses to oldtlw are suspicious.

Add assert just in case, so we catch it explicitly if for
some reason this assumption doesn't hold in the future.

Pick-to: 6.5
Change-Id: Iefa9b2df6b25a993afe87e4ee90fe9d2075ebbd0
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 0533d1d5444c204c029ab8fbc2df1fb9f9fd6ec2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 21:08:58 +00:00
Edward Welbourne
ab712f226d Revise CLDR-generated data header files to use Unicode-3.0 for SPDX
This is the correct license for the data they contain. The types that
are used to package them can be made available under the same.

Pick-to: 6.5
Task-number: QTBUG-121653
Change-Id: I7fb5f332f9e7f4f6db0f1f0c3964a36ce03bccb2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 880d1aef99a6826c8dd690b13e1ca6ea5574f403)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 21:08:58 +00:00
Mårten Nordheim
acdef87d1c QSaveFile[win]: only use SetFileInformationByHandle when opened with DELETE
SetFileInformationByHandle only works when we have opened the file with
DELETE access. Since the code is shared with QTemporaryFile it is not
necessarily always a given. Since it was anyway falling back to the old
way of doing it it was not a problem, but it is cleaner to only use it
when we know it will work.

Change-Id: I3c744734d45272c41e49bb6971adf4f82213d97d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit b26ec1f5dde6ee77fbf6b96d3ec54cf93d18197e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 21:08:58 +00:00
Mårten Nordheim
c52120b7fb QSslConfiguration: add documentation for HTTP/2 alpn variable
It was missing for a long time

Pick-to: 6.5
Change-Id: I209838a3c7b45c8c2e8da21efea306fafddea891
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
(cherry picked from commit fad8d7126260b30bd9437f2e19b5460dcf14b46a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 21:08:58 +00:00
Ahmad Samir
3f0bc3c52a QCompilerDetection: move qsystemdetection.h to inside the include guard
Pick-to: 6.6
Task-number: QTBUG-124120
Change-Id: Ia3ca4392945a793289fb9c75f50fba1bca1c691c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 785a4a7149f08fb32107e478588aeab6666d2a29)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 21:08:58 +00:00
Mårten Nordheim
d3ed6f02bb QSaveFile[win]: remove const from nativeRenameOverwrite
I accidentally copied const from another signature.
It's not changing any members so it's technically fine,
but it leaves a bad feeling and we will change members soon.

Change-Id: Ib0236d7e7dda84834ba35907d75c52cf77fb3843
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 171ac8aa4ef107a7c06163aaeba9a37abffccb09)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 21:08:57 +00:00
Milla Pohjanheimo
4931ee6e00 Add binary compatibility file for 6.7.0
Binary compatibility file added.

Task-number: QTBUG-123281
Change-Id: I9fa0f828edc810d1523eb75e242590253c7d7d35
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
(cherry picked from commit 067e3ec1bf3f18a1ca79f7241241d3cf021c3715)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 18:01:51 +00:00
Christian Ehrlicher
67372f31ae Doc: don't use deprecated function in QMenu snippets
QMouseEvent::globalPos() is deprecated - replace it with
QMouseEvent::globalPosition().toPoint()

Pick-to: 6.6 6.5
Fixes: QTBUG-124343
Change-Id: I6f862a9a640da11d756dae58ffae8c6d7fc24e02
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
(cherry picked from commit 001d88ae38435a2d108178c5d396839986985bc4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 18:01:51 +00:00
Christian Ehrlicher
74563f95ae SQLite: Update SQLite to v3.45.3
[ChangeLog][Third-Party Code] Updated SQLite to v3.45.3

Pick-to: 6.5 6.2 5.15
Change-Id: I8a58699f10cada8b33d47c3032861fa6ef1b6cc9
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit b6624877c61e8eef45956d62ee9229dc52ffa89a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 18:01:50 +00:00
Volker Hilsheimer
a4b55f66c9 Baseline testing: use a full screen background behind the test window
Some tests are flaky on macOS because the background desktop shows
through the rounded corner of the test window. We cannot reliably
control this on each platform, so instead make the test window a
secondary window with a second, fullscreen and frameless window as the
transient parent. This way, we have full control over the background
pixels that might show through (semi-)transparent parts of the test
window.

Change-Id: I44b7e834797b46fa8b44d776f6b91c99536a6cc9
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit a623293a13c9a0c80ae4a5111b92f00ba70d1edf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 18:01:50 +00:00
Even Oscar Andersen
5869e4b024 :wasm Fix not possible to type tab character in TextEdit
qinputcontrol refused to accept the character since
text part of key was empty

This caused the tabkey to always switch focus instead

Fixes: QTBUG-124232
Change-Id: I9ea7f02831cc88479b4e15d25eac278547f6f711
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit e794894ece0bcfc78fa4155cb01d825791ea102b)
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2024-04-17 18:01:50 +00:00
Volker Hilsheimer
980cd76e65 QTableView: fix infinite loop when resizing rows/columns on model reset
When a slot is connected to the modelReset signal before the model is
set on the view, then such a slot might try to resize the columns or
rows to fit the contents before the view had a chance to perform layout
work.

In that case, the while-loop that calculated the size hint of a rows
(or column) by checking the size hint of each cell might not exit, as
cached information about visual indexes would be invalid.

To prevent this, don't loop over the cells if the actual last row/column
of the model (after the reset) is less than the first (cached) visible
row/column. Also, make sure we increase the counter for number of
rows/columns processed with each iteration.

Add a test (that loops infinitely without the fix, resulting in the
test being killed by the framework), and make the 'actual' variables
constant for clarity.

Fixes: QTBUG-124301
Change-Id: I0adb2f1e8a1e78760ef7c19e9686c9572eca8be6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 960867566a75931c338f67cfe429c0756f41ad89)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 18:01:50 +00:00
Fabian Kosmale
1a1b1669fa moc: Treat number + characters as Identifier, not Number
While <DIGIT>+<Character> is not a valid identifier by itself in the C++
language, it might become one when using it with the token pasting
operator.

This risks confusing some number literals with suffix as Identifiers,
but those are currently not supported anyway, so this shouldn't break
anything that is currently working.

Fixes: QTBUG-87219
Fixes: QTBUG-124288
Change-Id: If73255cc0e6649bc90c52b1d177aac8ff975ae69
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 62d02c1d509780eca7d3a4c35ac64a0d475d0fe7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 18:01:50 +00:00
Laszlo Agocs
4553b20f58 Correct the internal signatures in the GL 4.5 func wrappers
There are 9 functions in the 4.5 API that were initially specified
to use GLsizei, but later "magically" became GLsizeiptr (i.e.
64-bit or 32-bit depending on the arch).

The current gl.xml, unlike old ones, uses GLsizeiptr, as do the
extension headers and most of the online docs, except some that of the
reference pages are stuck with GLsizei.

Assuming that today's OpenGL implementations expect GLsizeiptr, fix
the the internal signatures, so that calling into the GL implementation
is done using the correct argument sizes.

In addition, add GLsizeiptr signatures in the public API guarded with
>= QT_VERSION(7, 0, 0).

Pick-to: 6.6 6.5
Fixes: QTBUG-67807
Change-Id: Ifc7e97b0479a186000a56709c37ba7f77b6f1ff2
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
(cherry picked from commit 7aaa6a60448f5be05373367abaa37a1fa56ab5c7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 12:15:42 +00:00
Samuli Piippo
b70745bc8b Revert "Always destroy OpenGL context when the window is destroyed"
This reverts commit 220afb358f6056a6fc091b48a38878fb98aba979.

The change caused segfault after menus or dialogs were closed.
The global raster compositing context is still being used by root
window and cannot be deleted from child window.

Fixes: QTBUG-123962
Change-Id: Ie88925052f0f424617382388c587ae47570d13a7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit a030795bc956ce4274e3562e963d59e74f2e6fd7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 05:42:04 +00:00
Thiago Macieira
f88091c190 tst_QVariant: fix stringification of char16_t and char32_t
QVariant::toUInt() cannot convert from those two, so we always ended up
with 0, producing lots of duplicated test rows.

Fixes: QTBUG-124349
Change-Id: Ie28eadac333c4bcd8c08fffd17c5a3e39a2cc3f6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 8381a4b44fbd9528035af5e6d7458a2d5b9b7e7a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 00:50:13 +00:00
Thiago Macieira
29213f2546 tst_QVariant: remove duplicate rows from compareNumerics
Task-number: QTBUG-124349
Change-Id: Ie28eadac333c4bcd8c08fffd17c5a3d824fe76ec
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 848451095bb81647c750417f156888778f8bd988)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 00:50:12 +00:00
Thiago Macieira
4e7f906b03 tst_QVariant: fix copy & paste error in double-float comparisons
We wanted to test the (min,max) of each of the two types, but one of the
four combinations wasn't correctly done.

Task-number: QTBUG-124349
Change-Id: Ie28eadac333c4bcd8c08fffd17c5a3ccb4205139
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit d204ea98730baeeb55d2da229f2ce743df8c583e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-17 00:50:11 +00:00
Ivan Solovev
c5759c962d Skip tst_qcomparehelpers_cpp23 on Linux arm
Because it causes issues in the CI
As a drive-by, also backport the NOT VXWORKS check.

Change-Id: I8cd232abf1c4ee1d9417a8bff9aa3bcf5f893e8f
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 4f6600ee6554f04ac5dac0e547488432c13630a6)
2024-04-16 20:41:55 +00:00
Volker Hilsheimer
771cfca2ab Android: don't call JNI_OnLoad for libraries opened with QLibrary
JNI_OnLoad gets called automatically by the JVM when it loads a shared
library. A native library that is loaded by native code shouldn't have
it's JNI_OnLoad entry point function called, as that would indicate
that the plugin is loaded by the JVM, which it is not.

If framework or application code requires that function to be called
(and wants to perform error handling, such as closing the library again
if the function returns JNI_ERR), then that can and should be done
explicitly.

[ChangeLog][Android][QLibrary] Loading a shared library with QLibrary
no longer implicily calls a JNI_OnLoad implementation.

Fixes: QTBUG-92007
Change-Id: I9aa71ec73b950029e0ae1be7d54e1c8576f356ab
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 359df32300f5472f2fddbc83c3fe0851b5547ff6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-16 20:41:45 +00:00
Joerg Bornemann
169f53535a Revert "CMake: Fix *-metatypes.json creation, take III"
This reverts commit 654f3c5634ac9efc2257177351c8dea7c8d8875a.

That commit enabled a work-around for CMake upstream issue #19005 for
Visual Studio project generators. It turns out that this is not actually
needed, and that the work-around causes unnecessary rebuilds.

Fixes: QTBUG-121046
Pick-to: 6.6 6.5
Change-Id: Ie502e2df999a204ab09d28322017be3c7ed8ebc5
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit aeaaff1d5c3e3246d9cbf02499f1b952e9af8450)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-16 19:28:57 +00:00
Vladimir Belyavsky
363878499c QTextLayout: keep strong reference on font engine in a layout loop
This is speculative fix for the crashes in QTextLine::layout_helper()
we're observing on users side.

The possible reason is in that fontEngine and previousGlyphFontEngine,
which are stored in LBH, became invalid during the layout cycle
(destroyed by trimming font cache?).

To prevent this we need to handle font engine's ref-counter
gracefully, so just wrap them into QExplicitlySharedDataPointer.

As a drive-by change, use in-class initialization for LBH members.

Task-number: QTBUG-117500
Pick-to: 6.5 6.2 5.15
Change-Id: I6987a2b5618bb4ba8762f2ef01b4ce0dd60cb232
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit d914c58c7ee07f0d7598cee3491b815bd8d8bc23)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-16 19:28:56 +00:00
Tim Blechmann
2955a25f01 CMake: qt_internal_add_test - fix BLACKLIST file handling
Not all tests have targets that we can attach the BLACKLIST files to.

Change-Id: Ie0a2d72859877a8803802a4f7dc996944f002656
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit edc2d414562ece8b139b1cd1fcf77df245d0573f)
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-16 08:49:01 +08:00
Tim Blechmann
b686cae50c CMake: qt_internal_add_test - add BLACKLIST files to IDE projects
Tests can be blacklisted via BLACKLIST files. This patch adds these
files to the generated IDE projects automatically when available.

Change-Id: Icef2c397ada823e7b1c380dbb224694f059891ff
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 191dbbdea7151ca7177174f2de74b8279a7b12d4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-16 00:48:56 +00:00
Jaishree Vyas
29a7560041 Doc: Qt Data Types Documentation
Updated the list

Fixes: QTBUG-73386
Pick-to: 6.6
Change-Id: If913a26d32a39c71fb7fba815bdafa924da69457
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit a3fae5faa01f9591f445890b63b9db3a6a2a71b5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-14 10:08:22 +00:00
Eskil Abrahamsen Blomfeldt
b62b6094dd Implement aliased text rendering with DirectWrite
This creates aliased glyphs using the DirectWrite engine when
requested.

Note: There was previously a fallback to GDI to support aliased
text, which ignored the hinting settings. This patch also removes
that fallback.

[ChangeLog][Windows] Support QFont::NoAntialias with the DirectWrite
font engine.

Pick-to: 6.6 6.5
Fixes: QTBUG-97645
Change-Id: I587f56ace468cfdd57debe7bc8492a96587a4e05
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 421e7621faa50bf9007076d6be4e0da9514edc59)
2024-04-14 12:08:22 +02:00
Axel Spoerl
a225fb5d89 XCB: Suppress leave event, when mouse leaves with button pressed
Fixes: QTBUG-124003
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I232f731b4b5f9e332b1297e5fdae2cadbdf2db1a
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Błażej Szczygieł <mumei6102@gmail.com>
(cherry picked from commit 80bfeb4e793c673d540bd7641fc159338f64af1b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-14 07:46:07 +00:00
Laszlo Agocs
cce7f89532 rhi: d3d: metal: Improve docs for importing existing resources
The struct members were not described. Add something for each in the
docs.

Change-Id: I75d0a5a6efee4d7b4a415b5282a9e44950ed3894
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit e12791b05759819708d2b466362dc4a1df75b686)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-14 07:45:57 +00:00
Lauri Pohjanheimo
793a568ebc Android: runAction can now be run past queue
On vulkan implementation it was possible that when going background
destroySurface was queued and then run when coming back foreground
that caused vulkan not being able to draw.

Fixes: QTBUG-118985
Fixes: QTBUG-118840
Change-Id: I5957b74b89384ea84fc09d9b55afcccf5c82e390
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit b2c648c57261550474308aee09bfc1054818fb60)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-14 07:45:40 +00:00
Axel Spoerl
69c68571db Revert "QStyleSheetStyle: Propagate CE_ItemViewItem drawing to baseStyle"
This reverts commit f39f2bfe0b216252980c082b1771540dd00e6bd6.

Reason for revert: Breaks styling of treeview indicators.

Pick-to: 6.6 6.5
Task-number: QTBUG-123632
Change-Id: I7922f58a9a1ace40ba788571a297443c1900baf2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3e049f06557d0e3483b7fa40ecf8c9a918d8ac3a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-14 07:45:25 +00:00
Volker Hilsheimer
a49960be79 macOS: support shortcut for Ctrl-modified Tab
Ctrl+(Shift/Option/Cmd)+Tab presses are not handled as a regular key
events, and are not seen by our NSView.keyDown implementation. But
they are delivered to a performKeyEquivalent implementation, so if we
see a Tab key being pressed with the Ctrl modifier down, then send
a shortcut event and stop processing if that event got accepted by Qt.

Fixes: QTBUG-113492
Task-number: QTBUG-8596
Change-Id: Id3aa7021a689b94d97eb881b19ddf7cb039e1bd2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 285294b684ac973efcf2c8ff92b427db3fb75948)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-14 07:45:12 +00:00
Tim Blechmann
418827f7cb CMake: split _extra_files targets
Separate config.tests, coin, cmake, licenses and changelogs into
independent targets to keep the IDE projects more organized.

Change-Id: Ie33d45799621c2d7ec6f022ffcfac132ac4c7b94
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit bd2dc0c3ed750eca9a3b87f1f99069a2d4e954f8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-14 04:03:19 +00:00
Tim Blechmann
2939e22570 cmake: add _extra_files IDE target from heuristics
Lots of files in the repos are not included into the generated IDE
projects. Therefore we add utility targets (custom targets), which are
populated by glob patterns, which should fit most files that are found
in qt's subprojects.

Change-Id: I1b731e65f8db319d3cec817eea5c23a1eeaefb22
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 003a19115279e44bf8af96e0f588f5cc34725353)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-14 04:03:19 +00:00
Christian Ehrlicher
35450cde82 QTableView: fix cornerWidget connection
A click on the corner widget should select all items, not reset the
selection. This was accidentally added with
3e144bdc7484968dcccbda8f35ad802c7fd7a42e.

Fixes: QTBUG-124267
Change-Id: Ie20b7cf0ff730214dca80116ad888f42c2b7a670
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 56ec0f94b3f9db19d5fe78d78dc7597a92a5c52f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-13 19:21:28 +00:00
Axel Spoerl
2425bce76d Stabilize tst_QComboBox:popupPositionAfterStyleChange()
Wait 2x double click interval, to make sure a double click is safely
avoided.

Use QTRY_COMPARE at the end of the function, to cover cases where a
synchronously delivered mouse click causes posted events.

Wrap the test implementation in #ifndef QT_NO_STYLE_FUSION, as is the
declaration.

Skip the test on QNX.

Fixes: QTBUG-123798
Pick-to: 6.6 6.5
Change-Id: I73f4acb241a8c77a542152288c65f3d07582e075
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit f7a809ab73182ef25578eb8fd200c223fa3eb0f5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-13 11:02:36 +00:00
Thiago Macieira
2cd1cd1541 QCborValue: fix sorting of UTF8-to-UTF16 strings
We must compare the raw string length in UTF-8, not the UTF-16 one.

[ChangeLog][QtCore][QCborValue] Fixed a bug that caused certain
non-US-ASCII string comparisons to produce results not in line with the
CBOR specifications.

Pick-to: 6.6 6.5
Change-Id: I5f663c2f9f4149af84fefffd17c05d1c0f1bbc3a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 394788c68efacdec2676988b4b4ff207b20557f2)
2024-04-12 17:16:41 -07:00
Gary Wang
ba37ed8e8d WindowsIconEngine: Use the correct icon for document-properties
Currently the icon used by document-properties is a gear icon, on
Windows, the actual icon used by explorer's context menu for the
properties menu option is the wrench icon. This patch change the icon to
the wrench icon.

Fixes: QTBUG-124085
Change-Id: Ife49ad64d23b73b7676bc39330887e2cb320dcf9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 5a775fc5f73ec3a39d17c261e4ea7e715eff44d1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-04-12 22:43:10 +00:00