Commit Graph

56290 Commits

Author SHA1 Message Date
Thiago Macieira
f7152a4bb7 QThread: re-fix currentThreadId() on Linux
Commit 1808df9ce5 changed the Linux code
to read the third field in the TCB header instead of the first, because
that matches what FreeBSD does and what the documentation for the ABI
appears to say. But it broke MUSL builds because they apparently don't
obey the ABI. So don't use the inline code with libcs other than glibc.

Pick-to: 6.2 6.3
Task-number: QTBUG-103000
Change-Id: I5ff8e16fcdcb4ffd9ab6fffd16eba7748de50ddd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mike Achtelik <mike.achtelik@gmail.com>
2022-05-04 20:15:36 -07:00
André de la Rocha
58d4645661 Windows: Fix pop-up windows being incorrectly moved to primary display
Amends a previous workaround used with AMD graphic adapters, which under
some circumstances could incorrectly move pop-up windows and cause
issues with menus.

Fixes: QTBUG-97533
Pick-to: 6.2 6.3
Change-Id: Icc83198913b0e78ae3d7c0679e46f8b46b7015bf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-05-05 01:17:38 +02:00
Florian Bruhin
fcc64a57cf Fix documentation for QNetworkReply::redirected
In d12afeff40, the default redirect policy was
changed to NoLessSafeRedirectPolicy (from ManualRedirectPolicy), and this was
reworded from:

    This signal is emitted if the QNetworkRequest::FollowRedirectsAttribute was
    set in the request [...]

(i.e.: Qt handles redirect, no manual handling) to:

    This signal is emitted if the QNetworkRequest::ManualRedirectPolicy was
    set in the request [...]

(i.e.: User handles redirect, no handling by Qt), which is exactly the wrong way
around. Only if Qt handles the redirect, it's able to send a signal about it.
If the user handles redirects, they would get the RedirectionTargetAttribute in
response to the finished() signal.

Also see tst_QNetworkReply::ioHttpSingleRedirect(): It sets
NoLessSafeRedirectPolicy (default since Qt 6) and then ensures the "redirected"
signal has been emitted.

Pick-to: 6.3 6.2
Change-Id: I7e80ff69b94a4d94eb541b1021b05601d183c733
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-05-04 15:20:35 +02:00
Florian Bruhin
9bd4e0fe13 QVersionNumber: Show type in QDebug output
To make it clearer what kind of object is being printed, and also more
consistent with the QDebug output of other classes.

Fixes: QTBUG-103085
Pick-to: 6.3
Change-Id: Ia7441dd373d359be2a87ec618684d27375a1dcf8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-05-04 15:20:35 +02:00
Thiago Macieira
acfbe3b779 CMake: also allow building tools when found elsewhere in host builds
Previously, this was only supported when cross-compiling, but that's an
unnecessary limitation. Instead, make it possible to build the "host"
tools (notably qmake) even when they've been found elsewhere due to
QT_FORCE_FIND_TOOLS=ON and a supplied QT_HOST_PATH.

The combination of QT_FORCE_FIND_TOOLS and QT_FORCE_BUILD_TOOLS set to
ON is useful for developers who touch content that ends up in the
bootstrap library.

QT_BUILD_TOOLS_WHEN_CROSSCOMPILING is deprecated in favor of
QT_FORCE_BUILD_TOOLS.

[ChangeLog][CMake] QT_BUILD_TOOLS_WHEN_CROSSCOMPILING has been
deprecated in favor of QT_FORCE_BUILD_TOOLS. The latter can be used in
combination with QT_FORCE_FIND_TOOLS and QT_HOST_PATH to use tools from
a host Qt even for a non-cross build and still build the tools.

Fixes: QTBUG-99683
Change-Id: I0e5f6bec596a4a78bd3bfffd16c8fb486181f9b6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-05-04 15:20:35 +02:00
David Skoland
634717135d Mark mouseEvent in wasm compositor as unused
If this is not there, compiling fails for all-warnings-are-errors,
which seems to be enabled by default.

Change-Id: Id4cafaa635be201b649012ce8fc75f7cb5fb88a3
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-05-04 14:14:49 +02:00
JiDe Zhang
84491e5551 Export the QVulkanInstancePrivate class
When needs by the QVulkanInstance::setVkInstance to use a existing
VkInstance to a QQuickWindow, the VkInstance maybe is from a non Qt
render system, in the case, the QPlatformVulkanInstance object of
QVulkanInstance is can't create from the QPA, the all vulkan information
is need get from the VkInstance owner(eg, getInstanceProcAddr). But
providing it with a public interface is not a good idea, so by exporting
a private class, you can use a private interface where needed to achieve
the above purpose.

Task-number: QTBUG-103021
Change-Id: I0312adcf55cfd7d49889ed112ab237c0b3ab3ef6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-05-04 20:14:49 +08:00
Mårten Nordheim
953512ec84 Add test-helper as dependency to tst_qdbusinterface
Then the test-helper is (re)built as part of `ninja tst_qdbusinterface`
or `ninja tst_qdbusinterface_check`

Pick-to: 6.3 6.2
Change-Id: Id129c2fdc5980ea268ef1383f0747589876e2a9f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-05-04 12:14:49 +00:00
Sona Kurazyan
5ab4c9018f Plugins: replace remaining uses of QLatin1String with QLatin1StringView
Task-number: QTBUG-98434
Change-Id: If64c294033c114ae46dfc327c40da7f3c7a598f5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-04 10:00:35 +02:00
Sona Kurazyan
ceaa7d6341 Plugins: use _L1 for for creating Latin-1 string literals
As a drive-by, fix qsizetype -> int narrowing conversion warnings for
the touched lines.

Task-number: QTBUG-98434
Change-Id: I7fadd3cf27ad099028d70f05956303e3af62c0f5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-04 10:00:35 +02:00
Eirik Aavitsland
5020d1b22a Avoid rubberband artifacts under fractional DPR scaling
Expand the rubberband repaint area with one pixel to account for
rounding on screens with fractional device pixel ratio.

Fixes: QTBUG-102717
Pick-to: 6.3 6.2
Change-Id: Iede638d48dfbc3156b02ada28dfe99719b9d5efa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-05-04 10:00:35 +02:00
Marc Mutz
c9f4cb2c92 QTeamCityLogger: fix .arg() placeholder injection
Since each .arg() call starts from scratch, a file name containing a
suitable %n would mess up the formatting of the following .arg() call.

Fix by using multiArg(), which requires to pre-format the line into a
QString, but which performs only a single-pass, so doesn't suffer from
the placeholder injection problem that plagues .arg()-chaining.

Pick-to: 6.3 6.2 5.15
Change-Id: I549527643da657fca0bea63d5e3becadac529d4b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-05-04 07:09:25 +02:00
Marc Mutz
9b3885248b QTextStream: complete char16_t support
... by providing also op>> for char16_t.

[ChangeLog][QtCore][QTextStream] Added op>>(char16_t&).

Change-Id: I2f6cc2b2cdacd5190d364f94c1830f6de62d3b7e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-04 07:09:22 +02:00
Marc Mutz
48a368b78f QIPAddressUtils: remove unused base argument of number() function
Change-Id: I19ea99d1bb6ecb9a6fed39bf8fe13b449864d800
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-05-04 07:09:18 +02:00
CI Insignificant Platforms Monitor Bot
72a3172ea5 Blacklist: test cases blacklisted in tst_QTcpServer:
- serverAddress on qnx

Pick-to: 6.2
Pick-to: 6.3
Task-number: QTBUG-103056
Change-Id: I21b858fabc9d0ec49ded99c921ea399a0dc193a8
Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io>
2022-05-04 05:08:37 +00:00
CI Insignificant Platforms Monitor Bot
80a8d9553f Blacklist: test cases blacklisted in tst_QDockWidget:
- floatingTabs on qnx

Pick-to: 6.2
Pick-to: 6.3
Task-number: QTBUG-103091
Change-Id: Ia8b4a60847ba27dd2e9e50148bbe1e37febe1498
Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io>
2022-05-04 05:08:34 +00:00
CI Insignificant Platforms Monitor Bot
d106caeac8 Blacklist: test cases blacklisted in tst_QNetworkReply:
- ioGetFromHttpWithProxyAuth on qnx

Pick-to: 6.2
Pick-to: 6.3
Task-number: QTBUG-103055
Change-Id: I45bf4c2df7fa977ffa525bf80108a74f1e8f4eef
Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io>
2022-05-04 05:08:32 +00:00
Marc Mutz
04c54858c7 QRegularExpression: eradicate QT_STRINGVIEW_LEVEL
It's not used and not useful.

Task-number: QTBUG-100861
Pick-to: 6.3 6.2
Change-Id: Ie28d07474ee8fae96b569632d835dbb0ffd0e48f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-05-03 11:44:56 +02:00
Marc Mutz
ff4f2e9397 QBenchmarkValgrindUtils::extractResult(): use std::optional
... instead of a pair of val and valSeen variables.

More elegant.

Pick-to: 6.3
Change-Id: I0fcf9a3b5611e30fb81d92619993a7828496cd1b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-05-03 11:44:56 +02:00
Marc Mutz
7905b624fd QTextStream: fix streaming of char16_t's
Clazy complains about all uses of QLatin1Char these days, but if one
actually applies the fixit to turn

   out << QLatin1Char(' ');

into

   out << u' ';

the space is now streamed as an int (20), not as a space.

Fix by providing an explicit char16_t overload.

[ChangeLog][QtCore][QTextStream] Added op<<(char16_t).

[ChangeLog][Important Behavior Changes] QTextStream streams char16_t's
as QChars now instead of outputting the numeric value. If you want to
preserve the old behavior, cast the char16_t to a numeric type, such
as ushort or int, and stream that. This is backwards-compatible.

Pick-to: 6.3
Change-Id: I42d422cdebb27d38ac1714b22ef186642ec407e7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-03 11:44:56 +02:00
David Skoland
175cc7f7c0 Remove ALIEN_DEBUG statements
These debug statements come from the Nokia import and it seems unlikely
that they are being used at all.

Change-Id: I3143f83b0acdc5130fb743808003a55b789f2398
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-05-03 07:56:35 +02:00
Michael Spork
7ccc333d77 Namespace a few missing Objective-C categories and their methods
Fixes: QTBUG-100059
Pick-to: 6.2 6.3
Change-Id: I7579c9ee027de6a133a8b5d95d8e56829e089dab
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-05-03 01:38:46 +02:00
Sona Kurazyan
7c9c195235 Plugins: stop using QLatin1Char constructor for creating char literals
Required for porting away from QLatin1Char/QLatin1String in scope of
QTBUG-98434.

As a drive-by, fix qsizetype -> int narrowing conversion warnings for
the touched lines.

Change-Id: Id76add7e86b6dfb89f758a9efb0644067f0f44de
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-02 23:38:46 +00:00
Sona Kurazyan
e65e3f3021 Tools: replace remaining uses of QLatin1String with QLatin1StringView
Task-number: QTBUG-98434
Change-Id: Ie136f600f823019c29461561d4e30be66a66e87b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-03 01:38:46 +02:00
Sona Kurazyan
39a6307178 Tools: use _L1 for for creating Latin-1 string literals
As a drive-by, fix qsizetype -> int narrowing conversion warnings for
the touched lines.

Task-number: QTBUG-98434
Change-Id: I6d4712a71b5ebf3f379f1f98ea476557bce963ef
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-03 01:38:46 +02:00
Sona Kurazyan
a0539ed53f Tools: stop using QLatin1Char constructor for creating char literals
Required for porting away from QLatin1Char/QLatin1String in scope of
QTBUG-98434.

As a drive-by, fix qsizetype -> int narrowing conversion warnings for
the touched lines.

Change-Id: Ib9e01ede4e0d7869fc95414d36f37df4a30b16b4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-02 23:38:45 +00:00
Marc Mutz
8d6eae7ffd QAbstractTestLogger: disable copying
Fixes clazy-copyable-polymorphic.

Pick-to: 6.3 6.2 5.15
Change-Id: I31a68da6e402ada91099b09540b29a1d56f9cc56
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-03 00:10:05 +02:00
Joerg Bornemann
687f22671f CMake: Fix typo in error message
Pick-to: 6.2 6.3
Change-Id: Iace4fe19c0bdbcb61f667363d86b22abf6ec7d24
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-05-02 23:24:41 +02:00
Sona Kurazyan
2b3782132f QTestLog: simplify construction of a log message
Change-Id: I055efa45ec468cae43a38a9746a47af0382ca8c1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-02 20:06:20 +00:00
Sona Kurazyan
89225c951e QtTestLib: replace remaining uses of QL1String with QL1StringView
Remove unneeded \fn qdoc lines as a drive-by.

Task-number: QTBUG-98434
Change-Id: Id93ddbb38b97a8f5a6734bfbc82686ccb3a87aa6
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-02 20:06:20 +00:00
Sona Kurazyan
7baa06fe0c QtTestLib: replace QLatin1String uses with _L1/_s/QStringLiteral
Task-number: QTBUG-98434
Change-Id: Ie327fd4af1880002e5a1e09b43384f2b709625e7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-02 20:06:20 +00:00
Sona Kurazyan
34242f843e Deprecate _qs and _qba literal operators in favor of _s and _ba
[ChangeLog][QtCore] Deprecated _qs and _qba literal operators
for QString and QByteArray in favor of _s and _ba in the
Qt::Literals::StringLiterals namespace.

Task-number: QTBUG-101408
Change-Id: I26aee0055e3b4c1860de6eda8e0eb857c5b3e11a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-05-02 12:23:56 +02:00
Sona Kurazyan
651ba6535c Add QT_DEPRECATED_VERSION_X macros for 6.7 and 6.8
Change-Id: If905899300280b8a27eb73b62174b8a07337757a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-02 12:23:52 +02:00
Sona Kurazyan
17e06afdc3 Replace remaining uses of deprecated _qs with _s
Task-number: QTBUG-101408
Change-Id: I1fda67c07e948af5017f0b99b67f8c20d7052033
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-02 12:23:44 +02:00
Alexey Edelev
40ba4b2437 Add qpa include directory to the return values of qt_internal_module_info
Change-Id: I0540ce70e4a5dbde4027d97d9308c61248230c96
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-05-02 12:03:42 +02:00
Timur Pocheptsov
ecfe8e6e23 Macstyle: fix the text color on the disabled button
Forcing it to black make button look enabled, when it's not true.
Baseline test already covers this scenario (but probably took wrong
snapshot).

Pick-to: 6.3 6.2
Fixes: QTBUG-102782
Change-Id: Ifa9041fbf5bf56a7a560e2d1af291c3db2b134f8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-05-02 09:44:43 +02:00
Tor Arne Vestbø
d5113384c9 AppleUnifiedLogger: Remove manually managed os_log_t cache
The os_log_create API documents that the logging subsystem will
maintain a global list of logs, and will return existing logs
for subsequent calls for the same category and subsystem, so
we don't need to maintain our own log.

This also avoids a crash were we would end up in the logging
backend during application shutdown, when destructor functions
run, for example via QLibraryStore::cleanup().

In this case local static such as our log cache had already been
destroyed, leading to use after free.

Pick-to: 6.2 6.3 5.15
Change-Id: I91abfef6c56f8ca6dd8d602ac83aa163ce3d6860
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-02 09:40:02 +02:00
Tor Arne Vestbø
b41b1a3f6f macOS: Tie QCocoaWindowManager lifetime to QCocoaIntegration
To avoid any static initialization fiasco when Qt is being used
in a plugin.

Fixes: QTBUG-101150
Pick-to: 6.2 6.3
Change-Id: I68fa03f982d0c07e4b725ed5f4a1f738e0220438
Reviewed-by: <stefan.wastl@native-instruments.de>
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-05-02 09:39:48 +02:00
Sona Kurazyan
c48795c515 QtWidgets: replace remaining uses of QL1String with QL1StringView
Task-number: QTBUG-98434
Change-Id: If20e217e6e4fecd18c7707bf94650f5ba856893f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-02 09:07:23 +02:00
Sona Kurazyan
7d79b94db7 QtWidgets: use _L1 for for creating Latin-1 string literals
Task-number: QTBUG-98434
Change-Id: I310ea8f19d73a79d985ebfb8bfbff7a02c424360
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-05-02 09:07:19 +02:00
Liang Qi
43b779ab04 examples: add WindowStaysOnBottomHint into preview text
Pick-to: 6.3 6.2 5.15
Change-Id: I1e4e390990fcb6e30b2ff7bb59168e4ffc01a936
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-05-01 21:29:00 +02:00
Marc Mutz
c847f0091d QFutureInterface: use (new) qYieldCpu() instead of _mm_pause()
This loop here was a lonesome instance of a CAS loop in which adding
_mm_pause() was simple, because the code didn't use the usual pattern

  do {
     construct new value
  } while (!testAndSet)

we use everywhere else in Qt.

In search of an elegant pattern that would allow to apply
qYieldCpu()/_mm_pause() to those idiomatic CAS loops, too, I've
reached for a lambda to construct the new value. This should apply to
all (tight) CAS loops, and may form the basis of an API extension
whereby we take that lambda as a function argument to encapsulate the
CAS loop in an algorithm (a function).

Pick-to: 6.3
Change-Id: Id4a8f174dd812aa26f0b163e943bd4558e5e6a7b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-30 23:54:38 +02:00
Thiago Macieira
1808df9ce5 QThread: Fix currentThreadId() on FreeBSD
We were reading from the wrong offset. It just happened to work on Linux
because the values stored in the first and third fields of tcbhead_t[1]
are the same. But that is not the case on FreeBSD for the same thing[2].

Confirmed by disassembly. Linux:
Dump of assembler code for function __GI___pthread_self:
   0x00007ffff71b6efe <+0>:     endbr64
   0x00007ffff71b6f02 <+4>:     nop
   0x00007ffff71b6f03 <+5>:     nop
   0x00007ffff71b6f04 <+6>:     mov    %fs:0x10,%rax
   0x00007ffff71b6f0d <+15>:    ret

FreeBSD:
(gdb) disass pthread_self
Dump of assembler code for function _Tthr_self:
   0x0000000800324790 <+0>:     push   %rbp
   0x0000000800324791 <+1>:     mov    %rsp,%rbp
   0x0000000800324794 <+4>:     cmpq   $0x0,0x8b1c(%rip)        # 0x80032d2b8 <_thr_initial>
   0x000000080032479c <+12>:    jne    0x8003247a5 <_Tthr_self+21>
   0x000000080032479e <+14>:    xor    %edi,%edi
   0x00000008003247a0 <+16>:    call   0x80031de40 <_libpthread_init>
   0x00000008003247a5 <+21>:    mov    %fs:0x10,%rax
   0x00000008003247ae <+30>:    pop    %rbp
   0x00000008003247af <+31>:    ret

Also confirmed not to affect macOS:
(lldb) disass -n pthread_self
libsystem_pthread.dylib`pthread_self:
libsystem_pthread.dylib[0x7ff80032186c] <+0>:  pushq  %rbp
libsystem_pthread.dylib[0x7ff80032186d] <+1>:  movq   %rsp, %rbp
libsystem_pthread.dylib[0x7ff800321870] <+4>:  movq   %gs:0x0, %rax

[1] https://code.woboq.org/userspace/glibc/sysdeps/x86_64/nptl/tls.h.html#tcbhead_t
[2] https://github.com/freebsd/freebsd-src/blob/main/sys/x86/include/tls.h#L43

Pick-to: 6.2 6.3
Fixes: QTBUG-103000
Change-Id: I7fb65b80b7844c8d8f26fffd16ea67d2f3461964
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-04-29 18:33:38 -07:00
Florian Bruhin
b6759ff81c QAbstractItemModelTester: Fix typos in debug output
Introduced in 2f6faca901

Change-Id: Iab01bbd572ee1fdc7f590b608d7bf504dbf18769
Reviewed-by: David Faure <david.faure@kdab.com>
2022-04-29 23:16:54 +02:00
Marc Mutz
23e580f1b4 Long live qYieldCpu()!
This is a small wrapper around PAUSE (x86) (and, eventually, YIELD
(ARM) and whatever MIPS and Sparc have for this purpose) instructions
to improve the performance of tight CAS loops.

Pick-to: 6.3
Change-Id: I51e58484c7f02fdbdc491fd1f4a2e9a34f7c2cd0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-29 22:43:15 +02:00
Marc Mutz
2efd5ad7af QSimd: fix MSVC C4319 warning on ARM
Says MSVC:

   qsimd.cpp(629): warning C4319: '~': zero extending 'QCpuFeatureType' to 'quint64' of greater size

On non-x86 architectures, QCpuFeatureType is just uint32_t, thus
the warning. Fix by casting to quint64 before negating.

Amends 5f7e02efb8.

Change-Id: I1a9451abf79d51c1993b7f6d2a842169a5de7b3c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-29 20:43:15 +00:00
Tor Arne Vestbø
4f72db2fce Remove noop calls to QPlatformInputContext base class
Like most QPlatformFoo base classes the default implementations are
empty, or have default behavior that should be completely replaced
by subclasses.

By making it consistent across all the platform plugins when we call
base class methods, we avoid confusion of whether a base class call
is needed or not.

Change-Id: Idd8e4a6fa0e24a1dffd21b63471c9b1c2348691f
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-04-29 18:03:40 +02:00
Tor Arne Vestbø
3aeeb8d113 macOS: Remove un-needed auto-release pools in QCocoaInputContext
These functions do not push much pressure on memory to warrant separate
pool, and are otherwise called as part of the normal runloop which has
its own pool.

Change-Id: If84a899edc4e8cefbf58ecb55d46848ccd69b33b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-04-29 18:03:39 +02:00
Tor Arne Vestbø
ce12b4bd3a QAppleKeyMapper: Print key via QKeySequence instead of as QChar
The keys map beyond the Unicode range, so we can't print them as QChar.

Luckily QKeySequence takes care of all of this for us in
QKeySequencePrivate::keyName() via QKeySequence::encodeString().

Pick-to: 6.2 6.3
Change-Id: I822c4f925854e22af5a3b4a7028cb0ed18fb67b2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-04-29 18:03:37 +02:00
Marc Mutz
786121bf73 qsimd: remove dead preprocessor directives
Following 6323ccfa73, the #if/#elif
chain switching over the Q_PROCESSOR_ values starts with unadorned
defined(Q_PROCESSOR_ARM) now, so the #elif with the same condition at
the end of the chain is dead code.

Change-Id: Ie17041fbf025fd6ef5a817e0c4d66cd300252c8c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-04-29 13:52:47 +02:00