Commit Graph

56501 Commits

Author SHA1 Message Date
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
David Faure
b038f8c446 Doc: qt_add_dbus_interface: fix wrong cmake command name
set_source_file_property doesn't exist, it's set_source_files_properties

Change-Id: I696db4e35831ebbf4c871248bd87e6d666354a54
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-04-29 08:25:02 +02:00
Marc Mutz
301e51eca1 QtDeviceDiscoverySupportPrivate: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: I231a833bb5752b4041c69c909a5bc545e73a61d6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-29 07:31:00 +02:00
Marc Mutz
c453173a03 QtOpenGL: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: I60fb8c22a310dfd10cd3611fb603e2175ac6dbcc
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-29 07:30:59 +02:00
Marc Mutz
d005e3d7e5 QtPrintSupport: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: Ic8ceebfa270d0831a8598f98aa255acfc17e953b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-29 07:30:59 +02:00
Marc Mutz
7209a58dfd QtWidgets: includemocs v2022
This makes mocs_compilation.cpp empty again, removing those moc files
that were added after the last sweep in 2016,
0e6ad27549.

Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: Iee35e82d18690469ad889f9b4a7394e706fe037d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-29 07:30:59 +02:00
Marc Mutz
f6cc685fd6 QNetworkManagerNetworkInformationPlugin: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2
Task-number: QTBUG-102886
Change-Id: I625ac4cd59bee6a0a21d6a09c1fc72f726c3c41f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-29 05:30:59 +00:00
Marc Mutz
a440a8e8c5 QtGui: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: I1945741794c25679a9d94c0d68c8642e2c823502
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-29 07:30:59 +02:00
Marc Mutz
6a952403a6 QTuioTouchPlugin: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: I9d7dca22fed668af1a3f5bfe6c9c2c6b17784254
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-29 07:30:59 +02:00
Marc Mutz
ff1f52f2d8 QGtk3ThemePlugin: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: I1e023a23a95088effbbcd830eff627fbc4a3c12a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-29 07:30:59 +02:00
Marc Mutz
07d3b12eb2 QXdgDesktopPortalThemePlugin: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: I564107743e093d880d7d201f45e44207055ad7cf
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-29 07:30:59 +02:00
Marc Mutz
c0760be24f QtFbSupportPrivate: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: I2f82d3c126a3adf804551718f611e9300f7b6f08
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-29 07:30:59 +02:00
Marc Mutz
baab897ad9 QtInputSupportPrivate: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: I6eef540b66ba7e77ae0da9e8385368c15ffe8646
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-29 07:30:59 +02:00
Marc Mutz
08a8e8b495 QTlsBackendCertOnlyPlugin: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2
Task-number: QTBUG-102886
Change-Id: I0d8d41b095e7633606fe51126789bc6160583fd4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-29 05:30:58 +00:00
Marc Mutz
452792323e QTlsBackendOpenSSLPlugin: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2
Task-number: QTBUG-102886
Change-Id: I4390ba334e6d29c8ad600270d96112251e0392f7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-29 05:30:58 +00:00
Mårten Nordheim
b322984b49 tst_QNetworkReply try stabilize autoDeleteReplies tests
The http test data hasn't always been stable but for some reason
it fails far more than usual.

Originally the domain was a non-existing one, because it would then work
on any machine (even if not in CI) and would finish() (with error)
after failing to look up the domain in DNS. However, some machines in CI,
for some reason, take too long to do this and end up failing the test.

So, we change the URL to point to the network server in CI. This should,
at the very least, finish quickly when running in CI.

Pick-to: 6.3 6.2 5.15
Fixes: QTBUG-102952
Change-Id: I3b3f6fa23acf78fefdb69ff9ae7722f15e5f1736
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-04-29 04:28:56 +00:00
Axel Spoerl
ebdaf8ef9c Ignore window icon in XCB when its size exceeds maximum request length
When setting a window icon with its data size exceeding
the value returned by xcb_get_maximum_request_length(), the application
fails with XCB error code 4 (Maximum allowed requested length exceeded).
This patch adds a check if icon_data.size() exceeds
xcb_get_maximum_request_length(). If that is the case the icon is being
ignored and a warning is logged.

Fixes: QTBUG-102628
Pick-to: 6.3 6.2 5.15
Change-Id: Id47a0833efd16cd29b030e8c880acb416cbc500b
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-04-29 01:16:58 +02:00
Samuel Mira
08a4fd3570 Android: Fix ANR when QtService and QtActivity load in same process
This patch is a fix to prevent the ANR. In this patch, the QtService
queries QtNative if there is a QtActivity or QtService started and,
in case there is, it does not begin the loading process. When that
happens, the QtService will be a regular android Service.

Fixes: QTBUG-99691
Pick-to: 5.15 6.2 6.3
Change-Id: Ibd8aa8554107a9744b53cca4e0dd7e6f9b25baea
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
2022-04-28 22:14:00 +00:00
Dmitry Shachnev
189bcbea07 QPdfEnginePrivate: generate link only when there is a href
Otherwise, when anchor is just something that can be linked to (not a
link itself), it will result in a PDF link pointing to an empty URI.

See https://github.com/retext-project/retext/issues/580.

Pick-to: 6.3
Change-Id: Ib3c71797b09579783d74505601bad08c84856719
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2022-04-28 22:06:32 +03:00
Richard Moe Gustavsen
bfd10af245 QIOSTextResponder: restore reset/commit logic
After 2211092aa5, parts of the reset/commit logic
was left out by a mistake. This patch will add the
missing lines back into the text responder.

Task-number: QTBUG-102960
Pick-to: 6.3
Change-Id: Ib339eae2af69ce088e251fe8571bed97bbd64fc3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-04-28 17:43:10 +02:00
Sona Kurazyan
d3457c39c4 QtXml: replace QLatin1String uses with _L1 or _s
As a drive-by, fix qsizetype -> int narrowing conversion warnings for
the touched lines.

Task-number: QTBUG-98434
Change-Id: I4f337501e4cf445ded75b414a41bbd85dfd38900
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-04-28 15:17:23 +02:00
Sona Kurazyan
79cf895c70 QtTestLib: stop using QLatin1Char constructor for creating char literals
Required for porting away from QLatin1Char/QLatin1String in scope of
QTBUG-98434.

Change-Id: I3debae5f481037958bfb65caabca97a0d4681eb9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-04-28 11:15:11 +02:00
Marc Mutz
c038fa9e77 QtNetwork: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: Ie027419956d98c971429f2b4c7ae6f8f56c094f6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-28 11:15:03 +02:00
Marc Mutz
d792e8d90b QLinuxFbIntegrationPlugin: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: I585374e1e4e304f6c078744b36e0a021a938390d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-28 11:15:03 +02:00
Marc Mutz
569c6dbafc QVncIntegrationPlugin: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: I540916c8dc93d3b13bbf6d2ca9e1a1d1a7685621
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-28 11:15:03 +02:00
Marc Mutz
d2b3ca1e36 QSQLiteDriverPlugin: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: I3ad19796499e5fd4bb2bd1a495aeed7729890650
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-28 11:15:03 +02:00
Marc Mutz
a4783b49fa QMYSQLDriverPlugin: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: Idf1a38d8a293e3cbf74443f00d2a9765eb68a9c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-28 11:15:03 +02:00
Marc Mutz
d333cfbd5c QIbusPlatformInputContextPlugin: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: Id5ac448dc99789ad2675e89c79be8bf4aef036ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-28 11:15:03 +02:00
Marc Mutz
602e6ae21d QComposePlatformInputContextPlugin: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: Ie56a3b402ee8e1ed258a3b7e12dae3eb663bc03d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-28 11:15:03 +02:00
Marc Mutz
e21df99708 QtSql: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: Id758d672710ba998595824645e3e16e00537781d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-28 11:15:03 +02:00
Marc Mutz
82cf06fc21 QtTest: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: I9378ddcabbfa0ec5ca895f6ce55ab5f1ec2cade3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-28 11:15:03 +02:00
Marc Mutz
1ca7b51694 Image Plugins: includemocs(-ish)
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

The result of the automated script is no good here, because these
plugins all use the same anti-pattern of defining the plugin class in
a header, main.h, which doesn't have include guards. Included moc
files therefore lead to redefiniton errors.

Fix by inlining the main.h's into the respective main.cpp's and
including main.moc's instead.

Task-number: QTBUG-102886
Pick-to: 6.3 6.2 5.15
Change-Id: I6d3ec5590d13d9b7a4cedd5f1b4d3331e6916655
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-28 11:15:03 +02:00
Marc Mutz
7d4b480be3 QtDBus: includemocs
Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102886
Change-Id: Id5892f146f9792a0c5c8df24c7750a4089b07c6e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-28 11:15:02 +02:00
Marc Mutz
e48b4d2b7c Implement support for '0b' prefix in toInt() etc
[ChangeLog][QtCore][QByteArray/QByteArrayView/QLatin1String/QString/QStringView]
The string-to-integer conversion functions (toInt() etc) now support
the 0b prefix for binary literals. That means that base = 0 will
recognize 0b to mean base = 2 and an explicit base = 2 argument will
make toInt() (etc) skip an optional 0b.

[ChangeLog][QtCore][Important Behavior Changes] Due to the
newly-introduced support for 0b (binary) prefixes in integer parsing,
some strings that were previously rejected as invalid now parse as
valid. E.g., Qt 6.3 with autodetected bases would have tried to parse
"0b1" as an octal value and fail, whereas 6.4 will parse it as the
binary literal and return 1.

Fixes: QTBUG-85002
Change-Id: Id4eff72d63619080e5afece4d059b6ffd52f28c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-28 08:40:19 +00:00
JiDe Zhang
7a5d7e8440 Optimize the QPalette::resolve from the other palette
If all the palette's colors are resolved, nothing needs to be done in
QPalette::resolve(const QPalette &other).

Change-Id: I1573cfa5b5cd1e7eb15f3242aff6ab92e9f8c84b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-04-28 09:24:39 +02:00
Andreas Hartmetz
5165b89e2b Document the default value of QSFPM::sortOrder()
...and how to change the value, which is by calling sort().
Also, this is not a property either.

Pick-to: 5.15 6.2 6.3
Change-Id: I1b1be90dc43c29e85903a33d0f99569fd6c87abb
Reviewed-by: David Faure <david.faure@kdab.com>
2022-04-28 08:18:53 +02:00
Andreas Hartmetz
d39bd46fa2 Better document how to enable sorting in QSPFM
This can be a big time sink otherwise. Unlike reimplementing
filterAcceptsRow() for filtering, reimplementing lessThan() is
*not* sufficient to enable sorting.
As a drive-by, change \brief to \return because sortOrder() is not
a (formal) property.

Pick-to: 5.15 6.2 6.3
Change-Id: I7e7be6f1e8e6b03a9923a7f77f04005b19a69d41
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2022-04-28 08:18:52 +02:00
Sona Kurazyan
9a55c695c7 QtGui: replace remaining uses of QLatin1String with QLatin1StringView
Task-number: QTBUG-98434
Change-Id: I98c27030c783f968cbf38dc966ce486dc366b302
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-04-28 05:58:52 +02:00
Sona Kurazyan
7b6b133746 QtGui: use _L1 for for creating Latin-1 string literals
Task-number: QTBUG-98434
Change-Id: Idcb71c1d27125333a53b6bdd3e1af0d4c66617fa
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-04-28 05:58:52 +02:00
Lorn Potter
852bb43605 wasm: fix window leave and enter events
Leave and enter events are not happening
when the mouse enters or leaves the browser
window/canvas.

Done-with: Alexandra Cherdantseva <neluhus.vagus@gmail.com>
Change-Id: I702584980c6bea6a36143281de658e566e4c155b
Pick-to: 6.3
Fixes: QTBUG-100950
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-04-28 12:44:04 +10:00