Commit Graph

56309 Commits

Author SHA1 Message Date
Volker Hilsheimer
58df315ad1 Fix compiler warning from deprecated QString conversion
Use the string literals instead.

Change-Id: Ic85d0845c211744a79af7e48b180129797d3d612
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-05-06 03:22:14 +02:00
Iikka Eklund
b0e613d10e Conan: Move Qt option parsers to qt-conan-common
Move the QtConfigureOption and QtOptionParser to qt-conan-common where
existing shared functionality can be further re-used by these parsers.

Pick-to: 6.3
Task-number: QTIFW-2585
Change-Id: Ief56762f3a27bb0d6d474e8d1668234856afd732
Reviewed-by: Toni Saario <toni.saario@qt.io>
2022-05-06 01:20:35 +00:00
Morten Sørvig
e4cda635b1 wasm: destroy compositor and screen in order
The QWasmCompositor destructor deregisters event handlers, which
means it needs to look up the the canvas element, which again means
that this needs to happen before we clear the canvas from
specialHTMLTargets.

Also, calling destroy() is not needed since the QWasmCompositor
destructor makes this call.

Change-Id: I3004b94d0459c28642d3bd8bf9fe794c9b658477
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2022-05-06 01:20:35 +00:00
Kai Köhne
b8b3a8047f Fix alignment of next/prev links in offline style
With the old value, they were placed above the
header bar. Moving them a few pixels below looks
less broken.

Pick-to: 6.2 6.3 5.15
Change-Id: Iddd9d5e0b5c199fe35a9c8b8a7cac9a472901a21
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-05-06 00:55:34 +00:00
Tim Blechmann
3ce1642f4c plugins: image formats - fix odr violation
When linking Qt statically, the image fomats are not separated into
different DSOs.  when linking them into the same target, gcc warns
about an ODR violation between icohandler and bmphandler:

```
/usr/src/debug/qtbase/6.3.0-r0/build/include/QtGui/6.3.0/QtGui/private/../../../../../../git/src/gui/image/qbmphandler_p.h:69:8: warning: type ‘struct BMP_INFOHDR’ violates the C++ One Definition Rule [-Wodr]
/usr/src/debug/qtbase/6.3.0-r0/git/src/plugins/imageformats/ico/qicohandler.cpp:98: note: a different type is defined in another translation unit
/usr/src/debug/qtbase/6.3.0-r0/build/include/QtGui/6.3.0/QtGui/private/../../../../../../git/src/gui/image/qbmphandler_p.h:70:13: note: the first difference of corresponding definitions is field ‘biSize’
/usr/src/debug/qtbase/6.3.0-r0/git/src/plugins/imageformats/ico/qicohandler.cpp:87: note: a field of same name but different type is defined in another translation unit
/usr/src/debug/qtbase/6.3.0-r0/build/include/QtGui/6.3.0/QtGui/private/../../../../../../git/src/gui/image/qbmphandler_p.h:69:8: note: type ‘qint32’ should match type ‘struct quint32_le’
```

we therefore wrap the `BMP_INFOHDR` into an anonymous namespace

Change-Id: I0e6ee66dd09ebda0c3e399738b5c172a57beb8f4
Pick-to: 5.15 6.2 6.3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-05-06 00:55:34 +00:00
Kai Köhne
9bf52680bc Revert "Windows QPA: Remove dependency on swprintf_s() pulled in via _com_error::ErrorMessage()."
This reverts commit 043529c9dc, that
was introduced to keep compatibility with Windows XP. This is not
necessary anymore, as support for Windows XP got dropped.

The now removed code also had an issue in the format of the fifth
argument of FormatMessage, that is supposed to be a pointer to a
pointer for FORMAT_MESSAGE_ALLOCATE_BUFFER.

Pick-to: 6.2 6.3
Change-Id: Ib75b6a53a778801388d71388701340d3b79dacce
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ihor Dutchak <ihor.youw@gmail.com>
2022-05-06 02:54:33 +02:00
Marc Mutz
c95fd3a7ce qcompilerdetection.h: add Q_CC_{GNU,MSVC,CLANG}_ONLY macros
As the standard compilers on their respective platforms, other
compilers tend to mask as Clang, GCC, or MSVC, leading to complicated
code when you actually mean just one of these compilers:

  #if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)

This is particularly problematic when combined with version checks:

  #if defined(Q_CC_GNU) && Q_CC_GNU >= 900

will, e.g., not match Clang 10.0.0, which masks as GCC 4.2. The
correct way (until a new kid on the block starts to mask as GCC, too)
to check for GCC >= 9.0 atm is:

  #if defined(Q_CC_CLANG) || defined(Q_CC_INTEL) || !(defined(Q_CC_GNU) && Q_CC_GNU >= 900)

The new macros make such checks intuitive and hard-to-misuse:

  #if defined(Q_CC_GNU_ONLY) && Q_CC_GNU >= 900

Use it in qcompilerdetection.h.

Pick-to: 6.3 6.2 5.15
Change-Id: Idcdf973fbc4708f58ed91c800be3d5e599e5b7e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-06 02:41:06 +02:00
Fabian Kosmale
02c2ad6cbe Revert "a11y: Do not cache classes that don't have a factory plugin"
This reverts commit 583668005d, and
provides an alternative fix for QTBUG-75106.

Reason: This introduced QTBUG-103009, due to lack of caching. To fix the
original issue, we still reduce the amount of caching we do, by only
considering the first non-dynamic meta-object for QML related objects.

Task-number: QTBUG-75106
Fixes: QTBUG-103009
Pick-to: 6.3 6.2 5.15
Change-Id: Ic76af26a719d1114208be9555286239c6c6df615
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-05-06 00:00:20 +00:00
Edward Welbourne
93125d3a05 Refine QRoundingDown::qDiv() to avoid underflow
Subtracting denominator - 1 from the numerator ran into trouble if the
numerator was close to its type's minimum representable value. Adding
1 before division, then subtracting it after, avoids that underflow
while getting the same answer.

Change-Id: I0bb85deaa2ad36f8744ed6dbfdb4817442dddebe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-05-06 00:20:52 +02:00
Volker Hilsheimer
4222d117d2 Baseline tests: slow down cursor blinking
Override the default cursor blink time so that we don't get mismatches
from line edits. We need to set the time to > 0 so that QStyleHints does
not fall back to the platform integration.

Pick-to: 6.3
Change-Id: Ib1d04f7450c01c352c13098886aee032dcb14c72
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2022-05-05 16:50:31 +02:00
Volker Hilsheimer
dc96d812ec Baseline testing of widget: wait before taking snapshot
Widgets and styles might use fade effects or other asynchronous mechanisms
as part of hovering. This results in mismatches when the snapshot is
taken before those effects are completed.

Since we can't control all such animations from the outside, process
events for some milliseconds before taking the snapshot.

Pick-to: 6.3
Change-Id: I771658300628238552bddcd14a6751c3f6c0c63d
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2022-05-05 16:50:31 +02:00
Marc Mutz
664b84c137 De-pessimize QBenchmarkValgrindUtils::extractResult()
As if QIODevice::readLine() and QIODevice::Text open-mode aren't slow
enough, the old code took the line QByteArray, converted it to a
QString so it could apply a trivial regex to it: '^summary: (\d+)'.

We can, of course, use QByteArray::startsWith("summary: ") followed by
std::from_chars(), these days, to get the same effect, without having
to JIT-compile an RX and convert every line into UTF-16 first.

Change-Id: I20d80ffb469329d3c3efd08c71fcf5abf9f486d3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-05 10:39:37 +02:00
Marc Mutz
8ece12e466 QBuffer: add missing <limits> include
Amends 4bc85b9850.

Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-102274
Change-Id: If826043f01155f9854cc69079a09f1b50b47994c
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
2022-05-05 08:39:37 +00:00
Marc Mutz
9641b68c9c includemocs (updated script)
The updated script found some more.

Task-number: QTBUG-102886
Pick-to: 6.3 6.2 5.15
Change-Id: Ic8062e8a441c4d1a3718598a21f7f2e050a17cae
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-05-05 10:39:37 +02:00
Marc Mutz
1fa72be230 QXcbNativeInterface: remove unused field m_sysTraySelectionAtom
Says Clang:

qxcbnativeinterface.h:141:16: error: private field 'm_sysTraySelectionAtom' is not used [-Werror,-Wunused-private-field]
    xcb_atom_t m_sysTraySelectionAtom = XCB_ATOM_NONE;
               ^
Detected by includemocs.

Pick-to: 6.3 6.2 5.15
Change-Id: Ie08c2b268b508ed87e63010fc22311ab6c8d0e40
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-05 10:39:37 +02:00
Vladimir Belyavsky
a3a07dd16d QWindowsFontDatabase: fix handling of default EUDC font
There was a problem if default EUDC font is specified in user's
Windows Registry as a font file name instead of full path. In that
case we didn't handle this font properly and the warning was
generated.

Fixes: QTBUG-103003
Pick-to: 6.2 6.3
Change-Id: I946082af8dc31e6cf82cebca94ebbb03726239e0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-05-05 05:42:39 +00:00
Volker Hilsheimer
a085a14d76 Generate JNI signature strings at compile time
Introduce an internal QtJniTypes namespace with types that allow us to
concatenate string literals at compile time. This makes it possible to
generate arbitrary strings based on types, which we can then use as
signatures to JNI method calls.

Move some of the private members of QJniObject into the QtJniTypes
namespace for consistency, and to allow further template specialization
by user code to make other types and their JNI signature string known.
Remove the "Jni" prefix from names.

Use the compile-time generated string in QJniObject methods that created
the signature string at runtime, which involved a temporary memory
allocation.

Treat 'void' as a primitive type (with signature string 'V'), and
remove redundant template specializations.

Add a test case to verify the the strings are constructed correctly
at compile time.

Change-Id: I5e3895a97f7dc1b86961f7a7855b899d9203037d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-05-05 07:29:25 +02:00
Marc Mutz
dffca8bb0e Add a simple Qt 6/CMake-compatible script a la includemocs.py
Perl is dead and I don't speak Python, so if someone wants to port it,
be my guest. I needed something that I can use to roll out includemocs
across all Qt modules, and this is it. It works for me™, so I don't
expect to do much development with it.

This is an automated committer script I've been using so far:

    # SRCDIR=~~~
    # BUILDDIR=~~~~
    cd $BUILDDIR
    find */src -name mocs_compilation.cpp | while read FILE; do
        if grep -qsE '^#include' "$FILE"; then
            DIR="$(dirname "$FILE")"
            LIB="$(basename "$DIR")"
            case "$LIB" in
            Q*)
                LIB="${LIB%%_autogen}"
                ;;
            *)
                LIB="Qt${LIB%%_autogen}"
                ;;
            esac
            DIR="${DIR%/*}"
            path/to/includemocs6.sh "$SRCROOT/$DIR" "$DIR" "$FILE"
            (cd "$SRCROOT/$DIR" && git commit -am "$LIB: includemocs

$(cat "$SRCROOT/commit-msg.txt")" --no-edit)
        fi
    done

If the script cannot associate a moc file with a cpp file, it will
print a warning and continue.

The script tries to include the moc-file right after the
QT_END_NAMESPACE to work around many TUs ending in an #endif from some
#if QT_CONFIG or other. If there's no QT_END_NAMESPACE, it appends
the include and prints a warning.

Fixes: QTBUG-102886
Pick-to: 6.3 6.2
Change-Id: I16c5a9f845777ea2e82f15611b4fdd32f98ce0bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-05-05 04:26:19 +00:00
Thiago Macieira
30067d102c qtestcase.cpp: use #ifdef RLIMIT_CORE to guard RLIMIT_CORE usage
Instead of trying to guess which OSes have this functionality.

Change-Id: I5ff8e16fcdcb4ffd9ab6fffd16ebc20fe7eca346
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-05-04 20:15:36 -07:00
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