65025 Commits

Author SHA1 Message Date
Wladimir Leuschner
da28d17eaf Fix ItemView editing look and custom background color on QWindows11Style
Disable text painting, when current item in ItemView is in editing mode.
Respect custom set background colors for items in ItemView.

Fixes: QTBUG-119501
Change-Id: I0cc80459e67765b2e648aa438aabc7dc18bef4a9
Reviewed-by: Chris René Lerner <chris.lerner@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 5d590a38d96206bcf5ad6ffe2b156223dc909fd7)
2024-01-12 11:06:00 +00:00
Ivan Solovev
41a605e0f2 Fix QThreadPool::maxThreadCount() usage
The docs claim that QThreadPool always creates at least one thread.
However, the user can (usually by mistake) request zero or a negative
number of threads.
The maxThreadCount() function is simply returning the value, that was
requested by the user.
Since it's a public API, it is used in several places in QtConcurrent,
where it is assumed that the value is always positive. This can lead
to a crash if the user sets zero as a maxThreadCount.

Update all such places with std::max(maxThreadCount(), 1).
Prefer this approach over changing the return value of
maxThreadCount(), because its behavior is documented and tested.

Amends 885eff053797d56f2e295558d0a71b030fbb1a69.

Fixes: QTBUG-120335
Pick-to: 6.6 6.5 6.2
Change-Id: Id3b2087cec7fbc7a2d42febca6586f2dacffe444
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 936e72d18075b79c8d29353618dfbd052ae59dae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:06:00 +00:00
Ivan Solovev
7f6b62f3fc QFuture: immediately delete watcher after the context is destroyed
We used deleteLater(), which was triggering ASAN use-after-free error.
Apparently, what could happen is that after the context was destroyed,
we called deleteLater(), but if at this point the previous future got
finished, we still tried to emit watcher->run() to execute the
continuation. And then the watcher got deleted.

This patch replaces deleteLater() with a plain delete call. This looks
safe, because the watcher is only accessed while holding the lock.

Amends 59e21a536f7f81625216dc7a621e7be59919da33.

Fixes: QTBUG-120302
Pick-to: 6.6
Change-Id: Ia32f20bfe8daea2e2346f3d446c978ae305d2f68
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 11333a097290e4247b27adbfd024d5aa964bed35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:06:00 +00:00
Ivan Solovev
e7a9c8a559 Simplify qCompareThreeWay()
Use QtOrderingPrivate::reversed() in qCompareThreeWay() to avoid
conversions to Qt::partial_ordering and Qt::strong_ordering.

Task-number: QTBUG-119433
Change-Id: Ia42bda518dcf23f5332cac9bb8d50baebef67e55
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 0995358efabc91504f2ede20c724307358f9a276)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:59 +00:00
Volker Hilsheimer
82105e82e5 Doc: complete the snippet for a dialog with extension
Add the setting of the layout's size constraint to 'fixed' back to the
snippet, so that the dialog automatically resizes when the extension
gets hidden. The user won't be able to resize the dialog, but allowing
the user to resize the dialog and to show and hide the extension anyway
leads to unpredictable results for the user.

Amends 11da92ba94570e5eec01597fe09f0a9a48acc677.

Pick-to: 6.6
Change-Id: Ie74ca36eaa1a8e9567e0d5826f91f8633e5cbc05
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 51a1dfe72ddd922cd6caf28d532b3311db767989)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:59 +00:00
Christian Ehrlicher
d84b6079f8 QColorDialog: Use pmf-style connects
Port all string-based signal/slots connections to pmf-style connects.

Change-Id: If1075a5a8a4d018e060e7d18ee59c8fc4c0a5207
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 7dd4a7b2133b9a6aa4f67a3ff5760303af68ac54)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:59 +00:00
Christian Ehrlicher
2e9347dfce QLabel: Use pmf-style connects
Port all string-based signal/slots connections to pmf-style connects.

Change-Id: I888fe3d0022fddbe7ba391dc6841c3ea6b9d1d4b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 7efd3c2718a3d0dd656038ee7cd4eb992a6f2f80)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:59 +00:00
Christian Ehrlicher
a91c2b8c71 QSidebar: Use pmf-style connects
Port all string-based signal/slots connections to pmf-style connects.

Change-Id: I4ebabf1b117f86f39d3875965efa8ee5042bce84
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit b71aa162c00ff180cc946b8fd6c9c670d04ec262)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:59 +00:00
Christian Ehrlicher
144fcb8e79 QInputDialog: Use pmf-style connects
Port all string-based signal/slots connections to pmf-style connects.
Exception: Private::ensureEnabledConnection(QAbstractSpinBox*)

Change-Id: Id88fe88a1f9071085a159e1fa6429a6ec02e61bb
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 4fdcb1212d1a67d2e4b5aed28095e22e609d530a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:58 +00:00
Christian Ehrlicher
f433e57e53 QFontDialog: Use pmf-style connects
Port all string-based signal/slots connections to pmf-style connects.

Change-Id: Ic7ecfd1efb8eb76239598e48f25251357040f814
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit fb58a3aabe8ff9956560dea64c91cd8727da839d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:58 +00:00
Christian Ehrlicher
9c83da5556 QMessageBox: Use pmf-style connects
Port all string-based signal/slots connections to pmf-style connects.

Change-Id: I7d77c2a10ed0c27422893403dfc9c5a6d43ea798
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit e5c40ec5c117376f401c01069f05780046d07094)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:58 +00:00
Christian Ehrlicher
4fec40e67e QLineEdit: Use pmf-style connects
Port all string-based signal/slots connections to pmf-style connects.

Change-Id: I975232a3fedf82cd3327638a0ee119d1f2a90d84
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit bbdc8afa116155a9e8353f1d39af19a2228e3412)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:57 +00:00
Christian Ehrlicher
47cdc81e94 QFileDialog: Use pmf-style connects
Port all string-based signal/slots connections to pmf-style connects.

Change-Id: I6121e727c2730f9e5947f9f3b7550903bb17aee0
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit e03e2e9886ad36f7c3cc0eafd75be81a84f955ee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:57 +00:00
Juha Vuolle
a1cc252130 Rename the replace() function's value to newValue to reflect its role
Found in API-review

Change-Id: Ib047c79d977ad6870c1e426cd1add994a3634df4
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 723ab99b1ac55c8d32a93ea80224d7ffb22f7893)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:57 +00:00
Juha Vuolle
a18964adf0 Rename qnetworkrequestfactory's request() to createRequest()
Resulted from API-review

Change-Id: I09349dbddbfc191d871563b834396b387c6153c9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit f0db08088025005c765037ae53216fb7ee45c29c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:56 +00:00
Jarek Kobus
31a94ee00d QObject: Make it clear we don't install duplicated event filters
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I3048b50700880dd2445a5a65823fef02b196ce7d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 43de84644292978f2b8bce209830cf14d5384904)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:50 +00:00
Marc Mutz
78da624d7f QRestReply: include / fwd-declare what you need
Don't depend on transitive includes and forward declarations.

Found in API-review.

Change-Id: I61b9517453f164391abb9254d92e7ea38051e730
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit fbe29fb3684b02bec5f6019755d0a1bb0c94c275)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:50 +00:00
Juha Vuolle
980b57e85c Change QRestReply json return type to QJsonDocument
The json return type and function naming has gone back
and forth. Let's go with QJsonDocument after all, and add new
overloads in future if necessary.

Task-number: QTBUG-119002
Change-Id: I3f9de0e6cba7d5c52d016d252d65b81f345af050
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 1702a37a3955f449210fe3874cfcd35bb08417ad)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:50 +00:00
Sune Vuorela
5f55f6c8ab Don't show mnemonics in dockwidget titles
One might want to add an accellerator to dockwidget titles to be used in
contexts that isn't directly the title, but still uses the title.

Dockwidget title accelerators doesn't work in dock widgets, so don't
show them.

They are still available in e.g. a right click menu on a dockwidget to
hide/show, and here the accellerator might come handy, and also if a
dockwidget is tabbed.

Pick-to: 6.6
Change-Id: I196e1aa92a5c53fed735b598653c267509f788b8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
(cherry picked from commit cc67b25579c1bb5ea9f5c1ca4c9b7997e66f19b9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:50 +00:00
Alexey Edelev
5d9c9fe8f7 Use target-specific android-build directory
This fix allows using multiple executable targets in a single
CMakeLists.txt when building for android. Previously artifacts for both
targes were collected in a common android-build directory, that led to
artifacts overlaping and broke the deployment process.

Users need to set the QT_USE_TARGET_ANDROID_BUILD_DIR to TRUE to enable
the new android-build directories naming.

This change need QtC adjustments that will take a new directory naming
into account.

Task-number: QTBUG-117443
Pick-to: 6.6 6.5
Change-Id: I47568798e2a2e8550ddab1990a33611967183761
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 5f0575256a4af14c1f2f9a846e40cd9490c12b56)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:50 +00:00
Alexey Edelev
273f1ffbf6 Disable AUTOGEN for resource object targets
It looks like resource object targets don't need AUTOMOC as well
as other AUTOGEN tools. The only source file skips autogen explicitly,
but AUTOMOC requirement is added to the resource object targets anyway.

This disables all AUTOGEN related properties explicitly for all
resource object targets.

The problem occurs when building top-level Qt with the static library
that uses resources in tree.

Pick-to: 6.6 6.5 6.2
Change-Id: I5c968a3e34c881e7fbc5589626ab02b3b1e53968
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit dd4c14104cfab6330b31937acf2b2f120ef940a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 11:05:50 +00:00
Christian Ehrlicher
4bc230ad05 SQL: rename enablePositionalBinding() to setPositionalBindingEnabled()
... and the getter to isPositionalBindingEnabled() for QSqlQuery and
QSqlResult.
This amends e532933a2a9ff0219f0179880e05c95e0ec5e19d

[ChangeLog][QtSql][QSqlQuery] Add setPositionalBindingEnabled() to be
able to disable positional binding.

Task-number: QTBUG-119952
Fixes: QTBUG-120548
Change-Id: I0a0afb652d0fc9421f5692b0927a66b2a9b7b854
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit b1e5d9275d4cf6152e4e9456b1bc2d585a5512e2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 05:57:12 +00:00
Christian Ehrlicher
656576d3b4 CommonStyle/QSlider: use drawLines() instead single drawLine() calls
Optimize the painting of the tickmarks by collecting all lines to draw
in a vector and then passing all to the painter instead calling
drawLine() for every single tickmark.

Change-Id: Ic75e733a02fbf6143d21d4630f6a6d6de913f16c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 83ab7d21150115fbbe954af7d87f1597bf65d206)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 05:57:12 +00:00
Christian Ehrlicher
5278624b62 CommonStyle/QSlider: don't modify outline color
The outline color was modified under some conditions but used afterwards
independently from this condition which lead to a wrong tickmark color.

Pick-to: 6.6 6.5 6.2 5.15
Change-Id: I45baf9127aea96bfe84a7410dd592a084f14f13c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit e9438da42a2ce3c470df01f82245dbfa7901f8db)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 05:57:11 +00:00
Christian Ehrlicher
7c22796a97 QWindowsSystemTrayIcon: use high-dpi icons for notifications
Do not downscale the icon used for QSystemTrayIcon even though the msdn
documentation states that SM_CXICON/SM_CYICON should be used as the
size to avoid blurry icons in the notification.

Pick-to: 6.6
Fixes: QTBUG-103825
Change-Id: I2d466e895254aa3c41682290cc7864632c57d5d7
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 94809cdec004611bdb8531304e6c74761014876b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 05:57:11 +00:00
Christian Ehrlicher
ac04f0397b QCommonStyle: use themeHint(IconPixmapSizes) in iconFromWindowsTheme()
Sync iconFromWindowsTheme() to use themeHint(IconPixmapSizes) similar to
iconFromMacTheme().

Pick-to: 6.6
Task-number: QTBUG-52622
Change-Id: Id06454b010b1946ee0565190672ee8624cffe2de
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 4d2802702e519c7513440ea485b19ff611696fa1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 05:57:11 +00:00
Thiago Macieira
a13d7d6596 QDataStream: add missing #include <iterator>
For std::distance() and std::next().

Amends 003c29511de5979fba526acd62f2a4c7c356b982.

Pick-to: 6.6 6.5 6.2
Task-number: QTBUG-114583
Change-Id: I6e2677aad2ab45759db2fffd17a7318d396cbc4d
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 44b7b1d11b7c83b1f19df915577224f97371c655)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 02:18:36 +00:00
Thiago Macieira
923918c66b QString::arg: don't pass nullptr to memcpy()
A null QString / QStringView has a null begin pointer stored as its
array beginning (something we hide a little in the QString::data()
function, but not in QStringView::data()). We've been passing a null
pointer to memcpy() every time someone passed a null QStringView for
QString's single-argument arg() call, though not the multi-string arg()
version (which is the only one QStringView offers).

Commit f5021835dfb4b0bf974794b598cbdf9f0f95898d made this worse by
making QStringViews created from null QStrings retain the nullness (as
was intended).

Fixes: QTBUG-120624
Pick-to: 6.6 6.5 6.2
Change-Id: I6e2677aad2ab45759db2fffd17a870639b19340b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit d351a97e85e5ed8acd7ad1357ef76dc2e0ad639f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 02:18:20 +00:00
Assam Boudjelthia
5260dcc614 Android: skip vulkan tests for tst_qrhiwidget
Task-number: QTQAINFRA-5971
Change-Id: I61b7e3ef491e4e12c5ee5d95d89a7a510ba328c4
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit bba26d72207304e02098d1436232357dd452de2a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-12 01:18:24 +00:00
GHENADY
8b567e90be Fusion style: QGroupBox title vertical alignment
Take vertical alignment into account in QFusionStyle::subControlRect().

Pick-to: 6.6
Fixes: QTBUG-67708
Change-Id: I9da23a4689565c8dba9fed9ef75d3c640ce77e3f
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 2e625c55b346a727b39b8c5cddc37839b49ba5a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-29 10:19:42 +00:00
Jaishree Vyas
605f9413aa Doc: Rearrange best practices and how to documentation
Change the best practices to how-tos, which are categorized
now on a new page.

Fixes: QTBUG-118044
Pick-to: 6.6 6.5
Change-Id: I78dba2a1fde03b346f110ecd54e11485a0869540
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit 7372b3ab6748b68f1c5fba1f61df8083ce719bc5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-28 16:16:27 +00:00
Kai Köhne
246d243e8d Doc: QAndroidScreen:displayId(): Fix capitalization
Change-Id: Ib005db7fd9317250f5a4cf22ff3422eb83ed787c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit c34c887318c73daaab4610ad2c0d3d3072e1a934)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-28 16:16:26 +00:00
Chris Von Bargen
253957b940 Add parent arg to QFileDialog::getOpenFileContent and saveFileContent
This change updates getOpenFileContent to provide a parent when the
non-WASM fallback to a QFileDialog is created, which avoids issues
where this call is made inside another application. Specifically,
if a QDialog is created lacking a parent to the main window, it will
prevent interaction with that dialog. This patch addresses that problem
with window modality.

This change also updates saveFileContent to provide a parent for
the fallback mechanism, so that both static APIs that interact
with WASM/non-WASM dialogs have comparable behavior.

The new parent argument is updated in the documentation. Documentation
is clarified in terms of usage outside Qt for WebAssembly.

[ChangeLog][QtWidgets][QFileDialog] Adds an overload to the
static methods getOpenFileContent and saveFileContent with a
new parent argument which always no-ops in the WASM environment.

Fixes: QTBUG-118396
Pick-to: 6.6 6.5
Change-Id: Ic59aee386631172d4a29b42fe11e5af318474a1d
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
(cherry picked from commit 7c5cf8cae054954975a3e262f7fe3cd9897d67f4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-28 16:16:24 +00:00
Christian Ehrlicher
433feb87c0 tst_qmdisubwindow: re-enable setFont() test
This test was disabled during Qt5 porting because it was unstable.
According to the discussion in the bug report, a deprecated function was
used to wait for the window to get exposed. This was later replaced by a
more robust QTest::qWaitForWindowExposed() but the test was not
re-enabled again.

Fixes: QTBUG-22544
Change-Id: I3190e38c1f42dc719803a60e66a86c3773cbedcd
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit ce8c81555de31641041730df08be257cf0ddc221)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-28 16:16:22 +00:00
Piotr Wiercinski
a625d521f7 wasm: Fix handling of promise pool in WebPromiseManager
Promises are registered upon entry to the pool and
unregistered upon exit. If all promises are in a 'pending' state,
new promises can't be processed. Upon completion of a registered
promise, it is unregistered, allowing space for a new promise.

The code path responsible for unregistering promises when they
resolve runs each time a promise's callback is called.
Unfortunately, there's no guarantee that the callback will be
invoked upon the promise's resolution. For instance, promises
registered with only a 'catch' callback may never be triggered
when the promise resolves correctly.

This commit ensures that a final callback is always registered,
even if the user did not provide one.
This guarantees that promises are always unregistered upon resolution

Fixes: QTBUG-118161
Pick-to: 6.6 6.5
Change-Id: Ifea93d692464a6ef40c4bcad60f840ca0cb650c9
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 1e6841245dca3bda5dee050fc841c7129142dd9f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-28 11:57:18 +00:00
Christian Ehrlicher
41eb889352 QSqlRecord: style fixes
Misc style fixes in preparation for the new overloads taking
QStringView.

Pick-to: 6.6 6.5
Change-Id: I3b838543aefd08bf115488e571b1bb6eec8d968d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit ddad911f9be71d3a1396e28261ffe386e880aa69)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-28 10:20:44 +00:00
Shawn Rutledge
d7bc61ac51 wasm: Handle stylus events by generating QTabletEvents
Pick-to: 6.6
Fixes: QTBUG-120327
Change-Id: I37a92b9850385712b638c30f9a43028d8134f416
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit bc578ec6efcf667e0be2ea5c3d68bd22135cadd0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-28 06:12:09 +00:00
Morten Sørvig
c28e68c729 wasm: implement async drag-and-drop
Make toMimeDataWithFile() handle writing files to the
in-memory file system correctly: this is an async operation
and we need to collect the files as the writes complete
and then invoke the callback once all files have been
saved. There's then no need for a global static QMimeData.

Use toMimeDataWithFile() for both the paste and drop
handling, however QPlatformClipboard::setMimeData() takes
ownership of the passed in QMimeData and the callback API
must be designed accordingly.

An open question is when we should delete the files.
Deleting them right away (after calling the app event
handler) is predictable, however it looks like QPlatformClipboard::setMimeData() retains the current
QMimeData until a new one is set, so maybe we should
follow that.

Change-Id: Ia9b825eaef1134ff9a554e51ee7e41d1c2ee779a
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
(cherry picked from commit 0ffe8050bd5b55d64da37f5177a7e20dd9d14232)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-28 05:34:13 +00:00
Łukasz Matysiak
ad387bf591 Skip adding a test case for a native backend when QT_NO_INOTIFY is set
Some platforms like VxWorks do not support inotify
or any similar solution for file watching.
Because of that, the implementation falls back to polling.
That means that tests that require a native backend will fail.
Fix the problem by skipping adding a test case for a native backend.

Task-number: QTBUG-115777
Change-Id: I0d683e6376a0453bd2fd591302c4f3ef7ceea87c
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
(cherry picked from commit eabef00425083f19b0da0380378e13780d44a199)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-28 00:44:02 +00:00
Lorn Potter
32212b467c wasm: write file to storage on drop
Change-Id: Ibd1b5d623da07ad611cce577929a23ba991b6738
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-12-27 21:40:29 +00:00
Allan Sandfeld Jensen
e92dd3c091 Deduplicate mapping code in QTransform
Also means these mapping can now also handle overflowing perspective
better.

Change-Id: Id506634c445521f1b041ec2e9051aa499c24671b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit 1f32345a9a30ec11e9213d87b6b18b56beccbe2c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-27 21:40:00 +00:00
Lorn Potter
e8fa50346c wasm: add QWasmDrag back to handle drag/drop
Change-Id: I7c577e6b13db9f5c51e5691baaf6417b956a5ff4
Done-with: Mikolaj.Boc@qt.io
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
(cherry picked from commit e62fd1b7062af421cd289ff542514bd4332e1933)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-27 19:08:19 +00:00
Alexey Edelev
c257e2bf99 Fix the qtliterals documentation
Use QString as inheader record as the place of definition of both
Qt::Literals and Qt::Literals::StringLiterals. Previously mentioned
headers never exist.

Fixes: QTBUG-120379
Pick-to: 6.6 6.5
Change-Id: I104f73b338a144ef5f296500a9a4368cd3791750
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 8081c618827403b2658236d6fefbca0e88517303)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-27 13:33:42 +00:00
Lorn Potter
6b9270fd72 wasm: move DataTransfer to dom::
Change-Id: I069292154bafd1c08a0d0f2e8a62052f596a80f3
Done-with: Mikolaj.Boc@qt.io
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-12-27 06:55:59 +00:00
Lorn Potter
d048249c33 wasm: move image to web conversion to dom::
This allows other areas to utilize this

Change-Id: I4bc7e8374289a19afe8b639b2b3b0dc0f8f65a3a
Done-with: Mikolaj.Boc@qt.io
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-12-27 02:29:40 +00:00
Lorn Potter
a7bf26642b wasm: extend qstdweb to support objectUrls in File
Change-Id: If346f8afcf4578dedccce6f768e85c7750a9de3e
Done-with: Mikolaj.Boc@qt.io
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-12-26 22:46:53 +00:00
Kai Köhne
e853c83491 Use BSD-3-Clause license for CMake files
Pick-to: 6.6 6.5
Change-Id: I7012a7b6424c395dfbf37af48561169ecf138af8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 44ae4b13854de56ab2ec43ebb362ae714f0aff25)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-25 20:27:10 +00:00
Rami Potinkara
19facb3748 Android: update NDKr26b and clang 17.0.2 to docs
Fixes: QTBUG-117993
Change-Id: Ice205e0f472f09fcf60ad41f4daac2cdaf3e362a
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 39290c508e2c7fa816c6f79b3eb284adc0cad3c0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-23 10:48:18 +00:00
Assam Boudjelthia
d66874f13c Android: set default style extraction to minimal
The default value in the default manifest has been for few
releases, set as minimal, and since Widgets Android style
is not fully supported anymore, we can set this to default
to minimal under the hood as well to avoid needing to always
explicitly needing to set it to minimal.

Change-Id: Id0b2134c572694be1e190347ff75f51ade65f0c4
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
(cherry picked from commit ee4f91fa50fa470b4891318750bd7aad5e508124)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-23 10:48:07 +00:00
Christian Ehrlicher
76aab86de2 QWindowsTheme: honor dpr when requesting standard icons
The devicePixelRatio was not taken into account when a standard icon was
requested from the windows qpa which resulted in blurry icons for a
dpr != 1.
Therefore pass the dpr-corrected size to QWindowsTheme::standardPixmap()
and pass this size to SHDefExtractIcon() to get a correctly scaled icon.

Pick-to: 6.6
Fixes: QTBUG-52622
Change-Id: Ia771dd2f93fa133cf2c4429ef59a9c5cb05ad047
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 20cdc663b420a332d16f5f1ca82f352924cd7d1d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-12-22 17:41:01 +00:00