Commit Graph

56697 Commits

Author SHA1 Message Date
Tor Arne Vestbø
1480588f44 Print QScreen geometry debug state using the underlying types
A QRect is unambiguous, and easier to parse than a custom rect format.

Change-Id: If8c197a5e522744b9629d5d89536df5c0da7308c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-06-13 21:17:53 +02:00
Tor Arne Vestbø
f7a56b32cc macOS: Resolve screen name via NSScreen on macOS 10.15+
Apple Silicon Macs no longer expose display information through IOKit.
Luckily we can use the 10.15 localizedName property on NSString to
resolve the name.

Pick-to: 6.2 6.3 6.4
Change-Id: Ie75430df1a80808cb7b23d97d1e440d1f3bf75d6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-06-13 21:17:53 +02:00
Tor Arne Vestbø
5909e33d1d macOS: Ignore update requests for offline displays
Accessing a display that's offline may cause crashes,
so to be on the safe side we skip update requests in
this situation.

Task-number: QTBUG-102021
Pick-to: 6.2 6.3 6.4 5.15
Change-Id: I6b48b6722bccde628e510c538943d14f2b0271e5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-06-13 19:17:53 +00:00
Volker Hilsheimer
e6da018c86 Add "We mean it" warning to new private header
Amends 5e48a51608, fixing warning
from syncqt.

Change-Id: I15d22a1bba865777c17180438b6e89ee9e1ae78b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-06-13 18:34:27 +02:00
Friedemann Kleint
539815569f Fusion style: Fix menu item text being elided when mnemonic and && appear in the text
Pass the text flags to fontMetrics.elidedText().
Amends 0c0892a3e2.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-94481
Fixes: QTBUG-103836
Change-Id: I21a9b96ef69e5a5e612a0bdbdf44e5a20931eb59
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-06-13 18:34:27 +02:00
Thiago Macieira
1227af2635 Revert "qglobal.h: include <stdalign.h> in C mode"
This reverts commit 69e8a89358.

Reason for revert: the header is not present in all MSVC installations.

Change-Id: Ib809e59291ef30b9cbf6b4d61e27ea162e5d40b4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-06-13 13:37:37 +00:00
Kai Köhne
04cc705947 CMake: Fix typos
Found by codespell

Pick-to: 6.4
Change-Id: I4907e423b6b345acf82f2d7e0ed62479719d694e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-06-13 15:37:36 +02:00
Samuel Mira
e07fea6fb4 Android 13: Fix warnings on starting an application
On Android 13, currently in beta, android triggers a warning because it
is using a deprecated getDrawable function.
The patch changes it to use the non-deprecated alternative as suggested
in the warning.

Fixes: QTBUG-103568
Pick-to: 5.15 6.2 6.3
Change-Id: I3e629e7b75044bfb51874256895be0ec7e1088f8
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2022-06-13 13:37:36 +00:00
Volker Hilsheimer
ac80cee846 Don't crash when removing the last visible tab
The code incorrectly tried to ensure that the firstVisible tab was a
valid index, even though there might not be any visible tab left after
removing the last visible tab.

The same logic didn't exist of the lastVisible tab, so we tripped the
assert in qBound, as max (being -1) ended up smaller than min (0).

Fix this by removing the wrong correcting of firstVisible to be always
valid. Make sure we emit currentChanged with -1 when no visible tab is
left after removing the current tab.

Add a test.

Fixes: QTBUG-104003
Pick-to: 6.3 6.2
Change-Id: I27e6438a02d0a0f1ac4d0e0160cee4f33b3f3766
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-06-13 14:04:31 +02:00
Jan Arve Sæther
e7477e8934 Update window geometry when QWindow::m{in|ax}imumSize is updated
More specifically, if either minimum or maximum size are updated, make
sure that the current window geometry is updated so that it is within
the minimum and maximum sizes.

Previously, these constraints was only respected by the window manager
when the user resized the window.

For widgets this already worked, because a top-level widget will take
care of respecting these constraints if they are changed.

Since QWindow::setMinimumSize and QWindow::setMaximumSize started to
share so many common things, a new function (setMinOrMaxSize_helper())
is added.

Task-number: QTBUG-102771
Change-Id: Ia4b2680dcf865f84a3cf6424187f9a6036b76386
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-06-13 09:19:17 +02:00
Wang Fei
e57ab1b454 QMenu: Adjust the position of the submenu
When the submenu is about to exceed the screen,
set the position of the submenu to the left border of the main menu

Fixes: QTBUG-104050
Change-Id: I8935f1bfceb93cfa1097391689f4233991394978
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-06-13 02:58:04 +00:00
Laszlo Papp
e35fc908fd QSettings: fix a typo in the doc
Pick-to: 6.4 6.3 6.2
Change-Id: I059f603f3cc66a40e84179ac3f2a07de3bf31761
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-06-11 17:49:43 +00:00
Shawn Rutledge
eee9d25202 Use CSS classes on html list items for checkbox support
If we replace the bullet character with a UC checkbox character, it
looks ok in a browser, and the HTML parser can recover the BlockMarker
attribute from the css class.

[ChangeLog][QtGui][Text] Checkbox list items can now be read and written
in both HTML and Markdown, including conversions.

Task-number: QTBUG-103714
Change-Id: Ic6b74512075cd4ac16d6f80fdf55b221447491a9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-06-11 14:18:35 +00:00
Thiago Macieira
88f5955cb7 CMake: up the minimum C version to C11
We're in 2022. A 11-year-old C standard probably suffices, especially
since we require C++17 anyway.

Pick-to: 6.4
Change-Id: Ibcde9b9795ad42ac9978fffd16f3555327097ded
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-06-11 10:58:43 +00:00
Alexey Edelev
8a665ba9a6 Remove deprecated qgl.h from sync.profile
The file no longer exists, so the entry is redundant.

Amends f08038fca7

Change-Id: I366a6bd34c7dee57bdd151ee6ecdb76c6c5c095a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-06-11 00:42:13 +02:00
Thiago Macieira
bd40c18389 Cocoa: fix build: add missing include
qcocoansmenu.mm:21:38: error: implicit instantiation of undefined template 'QVarLengthArray<unsigned short, 10>'

Pick-to: 6.2 6.3 6.4
Change-Id: Iba16e8ea451b444ab213fffd16f4da39dfcc343d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-06-10 22:42:13 +00:00
Laszlo Papp
0a78cb7fab QNetworkReply: Fix the test compilation
It would not compile on my Linux box due to using QVariantMap, but not
actually including QMap itself. Using gcc 9.3.1 on CentOS 7.

Pick-to: 6.3 6.4
Change-Id: I808a270c814a906030cb34b197d3a2a85ba384e1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
2022-06-10 20:57:19 +00:00
Vladimir Belyavsky
865212057b Windows: fix DeferredDelete events processing on QThread::terminate()
On finishing/terminating a thread, when processing posted events,
we need to consider QThread's own data instead of caller thread's data.
Otherwise we can get into unexpected situations such as double
destruction of an object, premature destruction, etc.

Fixes: QTBUG-103922
Pick-to: 6.4 6.3 6.3.1 6.2 5.15
Change-Id: Idf77221ebbaa0b150ee2d0c296b51829ae8dc30e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-06-10 19:40:32 +00:00
Alexandru Croitor
e2f14e5be7 androiddeployqt: use QFile::exists instead of QDir().exists
Internally QDir().exists calls QFile::exists(filePath(name))

Pick-to: 6.2 6.3 6.4
Change-Id: I2993d924268b10135bd9df4e9f8165b869946efc
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-06-10 21:10:34 +02:00
Alexandru Croitor
0c82f98ec5 androiddeployqt: Only pass qt_install_dir/qml directory if it exists
In Conan's case, the qtbase installed package directory lacks a qml
directory. We pass that as a valid qml import path via CMake ->
deployment json file -> androiddeployqt -> qmlimportscanner
which causes the qmlimportscanner to fail with

 qmlimportscanner: No such file or directory:
 "~/package/some_sha_1/qml"
 Invalid json output from qmlimportscanner.

which in turn fails the androiddeploqt build step.

Make sure to only pass qtbase_install_dir/qml if it actually exists.

Amends 4ef3da04c3
Amends c08b9a49ba

Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-104056
Task-number: QTBUG-88519
Task-number: QTBUG-89588
Change-Id: I4310eb4e265ae8d3e3f09e1e1dbed79210e23de6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-06-10 21:10:34 +02:00
Alexandru Croitor
b3d0325a8d CMake: Ensure top-level builds are affected by our chosen log level
This will hide the configuration summary and cmake feature summary and
found packages output upon reconfiguration.

Pick-to: 6.2 6.3 6.4
Task-number: QTBUG-104128
Change-Id: I42270b99e45076052ec176df4652661cae10ac0c
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-06-10 21:10:34 +02:00
Alexandru Croitor
dd5c860a7b CMake: Show configuration summary on first configuration
or when feature changes are detected, even when the log-level is set
to NOTICE (which is the default for non-developer-builds).

We want to show the summary during the first configuration so we don't
force users to look into the config.summary file.

We want not to show the summary upon reconfigurations, to keep regular
reconfigurations as quiet as possibe, so it's easy to notice any new
warnings.

Amends e2a0ddbb69
Amends 384dfceb53

Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-104127
Change-Id: I506f33b4bae9da8957e04bb69c206bf00e3f7b0e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-06-10 21:10:34 +02:00
Ulf Hermann
47c545d983 moc: Improve formatting of output
If we are going to append an else clause, keep it on the same line as
the closing brace.

Change-Id: Idfa0eec49240086dc24268aebbf610d64a2f53d0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-06-10 14:41:14 +02:00
Alexandru Croitor
ae62d908a5 CMake: Move all CMake Coin builds to be out-of-source
Cross-builds already were out-of-source.
Move non-cross-builds to out-of-source as well.

Fixes: QTBUG-82820
Fixes: QTBUG-96513
Change-Id: I5bef08f18a16e51fe2c501565699494b46546f84
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-06-10 12:27:01 +00:00
Joerg Bornemann
f318c0e2d6 CMake: Find system harfbuzz even if pkg-config is disabled
FindWrapSystemHarfbuzz.cmake relied on pkg-config to find system
harfbuzz.  This patch makes it find system harfbuzz even if pkg-config
is not available or disabled.

Pick-to: 6.2 6.3 6.4
Task-number: QTBUG-103894
Change-Id: I2a8fc64c738c7604f47de89f387002e40a9fa5e0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-06-10 14:25:45 +02:00
Joerg Bornemann
71a0b893fb CMake: Fix check for system harfbuzz if pkg-config is unavailable
We need to check whether pkg_check_modules returns success before
setting up target name etc.

Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-103894
Change-Id: I12702639683723d976e93be95443099b88885869
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-06-10 14:25:41 +02:00
Joerg Bornemann
4cef4f1c1b Make configure -no-pkg-config actually work
Turning off pkg-config with the configure flag -no-pkg-config did not
work.  There are different defaults for FEATURE_pkg_config on different
platforms (e.g. Linux: ON, Windows: OFF).  The existing code that
calculated the initial FEATURE_pkg_config value assumed that the default
is OFF and never turned the feature off.

Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-104123
Change-Id: I33b9687c55c60d4ec9224324951a8838741ee976
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-06-10 14:11:09 +02:00
Ilya Fedin
fb981a0954 Fallback to another file dialog implementation when XDP is inaccessible
Fixes: QTBUG-98988
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Idca1ab4cae0e9eabebc599f3c8efa136a7973918
Reviewed-by: Jan Grulich <jgrulich@redhat.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-06-09 01:49:41 +04:00
Thiago Macieira
17454bf9c6 FatalSignalHandler: print the signal name on crash
It's easier to remember what "SIGSEGV" means instead of "11".

GNU libc has offered sigabbrev_np() (non-portable) since 2.32; for older
libcs, we'll be happy with a hardcoded list.

Selftest updated to match... though it didn't seem to be necessary.

Pick-to: 6.4
Change-Id: I5ff8e16fcdcb4ffd9ab6fffd16ebc66ecf6e9465
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-06-08 20:39:18 +00:00
Marc Mutz
2e9bc3494f QLocale: use qsnprintf instead of deprecated sprintf
Fixes warnings such as

 qtbase/src/corelib/text/qlocale_tools.cpp:321:5: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]

from AppleClang.

Pick-to: 6.4 6.3
Change-Id: Ief10e99abfa0a56c24622ac79db719dde58a4210
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-06-08 20:35:39 +02:00
Volker Krause
193039dff3 Fix renameat2 configure check
Give this a chance to ever succeed by not using undefined variables in
the test code.

Found by a KDE unit test observing changes in inotify behavior between
Qt5 and Qt6.

Pick-to: 6.2 6.3 6.3.1
Change-Id: Iceb743d88dfa093c02d76ce32ea5c8ced24bfc5b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-06-08 17:43:34 +00:00
Ilya Fedin
6f9f6849c5 Add QXdgDesktopPortalFileDialog::useNativeFileDialog()
Task-number: QTBUG-98988
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I39417f089d839a9af009791088bd20058532bd7a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-06-08 21:43:34 +04:00
Marc Mutz
a7dcdf063d Update Catch2 to v2.13.9
Two patches applied to upstream release.

Pick-to: 6.4 6.3 6.2
Fixes: QTBUG-103732
Change-Id: Id64b65c4567433806047a2a34fa85ab5f260e6cc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-06-08 19:43:34 +02:00
Allan Sandfeld Jensen
dc3b2ac81d C++23/c++2b support
Change-Id: I33b2a48312ae94e3d5ebb4097e50c4953e14d533
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-06-08 19:43:34 +02:00
Mårten Nordheim
4d2ef82089 QTest: Remove pre-Qt6 code
It's disabled now, so can be deleted

Pick-to: 6.4 6.3 6.2
Change-Id: I0d548327e7ef42bbca9ed88556bf9f8456038cc7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-06-08 19:08:49 +02:00
Vladimir Belyavsky
4a2c31103c Fallback to PerMonitorDpiAware if V2DpiAware is not supported by system
DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 might not be supported
on some legacy Windows 10 editions (prior Creator Update). In this
case SetProcessDpiAwarenessContext returns ERROR_INVALID_PARAMETER.

Fallback to DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE using old API
SetProcessDpiAwareness in such cases as the most suitable.

Fixes: QTBUG-103733
Pick-to: 6.3 6.4
Change-Id: I39216e63ecfcae96aaa159237a52b0a76bc5d956
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-06-08 17:08:49 +00:00
Topi Reinio
e4f9a78c18 Doc: Document the CorePrivate module
Classes to aid Android development are currently available in the
CorePrivate module. In order to have correct information for
the requisites table (for CMake and qmake inclusion), document
the private module, mark it \preliminary, and link the classes
to it using the \inmodule command.

Fixes: QTBUG-103865
Pick-to: 6.3
Change-Id: Id913148751ab925eb4e8488aa28a54b0e0c2d78d
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2022-06-08 16:41:01 +00:00
Edward Welbourne
720de98824 QDateTime::Data, QTimeZone: rule-of-five and noexcept
CodeChecker noted that both QDateTime::Data and QTimeZone have
incomplete rule-of-five method sets; and two of the former's methods
should be noexcept.  Marc tells me the copy constructor can be
noexcept. Added the missing methods and noexcepts.

Change-Id: I8ddaa86207320606a890e90bd2b1593ee82f5a4a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-06-08 18:41:01 +02:00
Edward Welbourne
02b11e0623 PosixZone::parse(): don't reset already-initialized variable
The nameBegin variable was already initialized to pos, so just
increment it in the one case that needs it rather than resetting it in
both branches of the condition.

Change-Id: Ia0d42b604ed21829dc84c27a1907c345f62594d1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-06-08 18:41:01 +02:00
Edward Welbourne
0a350eaf25 Drop const from a declaration to let a return move
CodeChecker points out that QTimeZone::systemTimeZoneId()'s first
attempt saved its result in a const QByteArray, which consequently
wasn't moved from when returning. That doesn't make a huge difference
for a CoW, but might as well skip the const and let the compiler do
the natural thing.

Change-Id: I966c9137505a8188532b164524dd4e05c0b2ac53
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-06-08 18:41:01 +02:00
Edward Welbourne
b6be97f65e Don't std::move() trivally-copyable type; it makes no difference
CodeChecker says:

 std::move of the variable 'parts' of the trivially-copyable type 'QCalendar::YearMonthDay' has no effect; remove std::move()

So don't bother with the move, and remove && from the signature of the
function being called in all four places. Assert that the type *is*
trivially copyable.

Change-Id: I3c07491b4b1dafdf52916e8699561c58c24ee954
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-06-08 18:41:01 +02:00
Samuel Mira
140ca89a3c Android: Fix QSettings when using content URL
Using QSettings with Content URL in Android failed because of 3 issues:
* the lock file assumed that it could append ".lock" to the file name
for its name
* the lock file assumed that it could write in the same directory as the
file
* the QSaveFile used by QSettings requires direct write on content URL
but setDirectWriteFallback is set to false on QSettings by default

This patch fixes those issues by, when it is an Content URL in Android,
saving the lock file in QStandardPaths::CacheLocation and setting the
setDirectWriteFallback to true.
This does not break backwards compatibility because appending ".lock"
to the Content URL will always make an invalid URL, so it did not work
before.

Fixes: QTBUG-103455
Pick-to: 6.3 6.2
Change-Id: I92867577507b7069e4e6091d94e0931bb6dbcbed
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-06-08 13:44:59 +00:00
Mikolaj Boc
3df23b1fe4 Define out unused functions on WASM build
The struct iovec conversion functions that are needed on Unix are
unused on WASM build. This makes the build fail with -Werror on Mac
since the WASM build is treated as a variant of Unix. Cross-compilation
with clang:
Apple clang version 13.0.0 (clang-1300.0.27.3)
Target: arm64-apple-darwin21.3.0

Fixes: QTBUG-103974
Pick-to: 6.3 6.4
Change-Id: I34c65a18832ceedb9064a98f5729e45667749461
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-06-08 08:30:45 +00:00
Ivan Solovev
78c677376a QTestLib: improve documentation
Add missing '\since' version numbers.

This commit amends cc6d984390
and 0681a2dd5a

Pick-to: 6.4
Change-Id: Ia10b991c996fb58f08a17e485c4dfcbfbe8eba0a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-06-08 10:30:20 +02:00
Alexandru Croitor
5ddb13d0d4 CMake: Fix Android multi-abi builds in Qt Creator
Qt Creator passes -DANDROID_NDK to the main project configuration
whereas the Qt toolchain file expects -DANDROID_NDK_ROOT.

This causes the configuration of the sub-builds to fail not finding
the android toolchain, and trying to use the CI ndk toolchain path.

Make sure to consider both variables.

Also change the conditions to evaluate the variable as a variable
explicitly, to avoid passing an empty option if the variable is
unset. If the variable is unset, CMake would treat the variable as
an actual string which would always not equal the empty string.

Amends d6919b073a

Pick-to: 6.3 6.4
Task-number: QTBUG-104013
Task-number: QTBUG-102041
Change-Id: Ifee48953ce50bc616c49c59d72e845c6d9418187
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-06-07 16:48:57 +00:00
Mårten Nordheim
4dfc582644 tst_QTcpServer: Make test-helper a dependency
For convenience.

Change-Id: I91017e4b05b3c64f8628f23a0a3cf7abd4b4d686
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-06-07 15:09:48 +02:00
Janne Juntunen
c58e97245d tst_qfile: skip trash bin test on webOS
Skipping moveToTrash() test is needed because WebOS
does not implement a trash bin directory.

Fixes: QTBUG-104053
Pick-to: 6.4
Change-Id: Id1d1595eb401d8ef3a403c915d95be1cd75368d2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-06-07 13:37:34 +03:00
Marc Mutz
0da17e83ec Fix data race in QCoreApplicationPrivate::sendThroughApplicationEventFilters()
The assertion has the acquire fence at the wrong place:

- QThreadData::thread isn't dereferenced, so the acquire fence on its
  load() isn't needed.

- QObjectPrivate::threadData, however, _is_ dereferenced, so an
  acquire fence is needed; the relaxed load() is insufficient.

Swapping the loadAcquire() and the loadRelaxed() fixes both issues.

Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Iee964490e93ebc323c188e616bf0d448f91fb2b5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-06-07 06:46:12 +00:00
Marc Mutz
d6575f3717 QByteArray: de-inline to/fromStdString()
Removes another owning container manipulation that made the top entry
in Clang -ftime-trace's most-expensive template instantiations in a
QtWidgets build.

Pick-to: 6.4
Task-number: QTBUG-97601
Change-Id: I8c765ea2e6c46da5188b70c9503dd87e63f6b328
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-06-07 06:46:04 +00:00
Ilya Fedin
36c1a7ba23 Fix a leak of fallback dialog helper in xdgdesktopportal
Task-number: QTBUG-98988
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Id066f0dd2cacbc273deacd4f7df66c3787ad4017
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-06-07 00:32:07 +04:00