Commit Graph

54596 Commits

Author SHA1 Message Date
Marc Mutz
82d90fbb9e tst_qmetatype: remove the previous MingW workaround
Let's see whether splitting the TUs has made the test amenable to be
compiled with MinGW again.

Pick-to: 6.3
Change-Id: Icde1bad20943c7648dbb119ca879bce62325bd6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-12-16 12:47:39 +01:00
Marc Mutz
e381288146 QRingBuffer: restrict QRingChunk::toByteArray() calls to rvalue *this
It's only user, QRingBuffer::read(), calls it on an rvalue, so we
don't need the lvalue overload, and we can devil-may-care-like just
std::move(chunk) in the non-isShared() case.

Change-Id: I99c16862f5586125c6346ce5f969dc735de738b8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-12-16 12:47:39 +01:00
Marc Mutz
b01c05ef9b QtWidgets: auto-test-export private classes, unbreaking ubsan builds
These classes are used in their respective tests, but since these only
seem to access data members, the missing export macro was never
detected. UBSan, however, checks the type_info on each access, so it
needs the (polymorphic) class exported.

Do so (for -developer-builds).

Change-Id: I97b41cfb5dd7f1665cdf4f7a819a42fbf0388621
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-12-16 09:12:57 +01:00
Marc Mutz
a663b56627 QSslSocket: export QSslSocketPrivate, unbreaking ubsan builds
Only individual members were exported, but that's not enough; ubsan
needs the vtable and type_info:

  qtbase/src/plugins/tls/openssl/CMakeFiles/QTlsBackendOpenSSLPlugin.dir/qtls_openssl.cpp.o:(.data.rel+0x1f8): undefined reference to `typeinfo for QSslSocketPrivate'

Pick-to: 6.3 6.2
Change-Id: Ic22805af1ac7f4b3ad48532e4ba689d12ee4a4b9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-12-16 09:12:09 +01:00
Marc Mutz
e14d0ff8f2 QRingBuffer: simplify QRingChunk::detach()
Just use the QByteArray(ptr, n) ctor instead of the (n,
Qt::Uninitialized) one + memcpy() + std::move().

Pick-to: 6.3
Change-Id: I127219c21556e683d15136f7e6f7b3576b7b2444
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-12-16 00:01:41 +01:00
Marc Mutz
81bf3e68b9 Make QRingBuffer a move-only type
There's no sense in copying a ring buffer. Moving is enough. This
marks an important step on the way to preventing accidental copies of
ring buffer content, because the 'QList buffers' member can now no
longer be implicitly shared. While the compiler will still emit the
code for detach()ing, it will now never be executed.

Pick-to: 6.3
Change-Id: I968bfe3e50c46720ed4baca55c99c1f9c518f653
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-12-16 00:01:41 +01:00
Marc Mutz
758a830f7e QRingBuffer: overload append() for rvalues
The majority of append() callers in QtBase pass rvalues, so overload
append() to avoid the need for manipulating QBA's atomic ref counts.

Also adjust a caller that could pass by rvalue, but didn't, to do so.

Pick-to: 6.3
Change-Id: I3d9e60b0d04ef837bfdc526e1f0f691a151006f9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-12-15 18:36:00 +00:00
Marc Mutz
63a35898f4 QIODevice: use QVLA to hold the ring buffers, not QList
The only users of more than one read- or write channel are the SCTP
code and QProcess. SCTP being pretty rare, optimize for the common
case of at most two QRingBuffers for reading (QProcess) and one for
writing.  Even with more channels, QVLA shouldn't be slower than QList
- on the contrary.

Need to adjust tst_toolsupport and TypeInformationVersion, as
QFilePrivate::fileName has changed.

Pick-to: 6.3
Change-Id: I3baf982ba1f4dc51463be8730e414f6164072d8b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-12-15 17:35:13 +00:00
Marc Mutz
7ef6140170 QLogging: fix potential missing NUL-terminator when calling OutputDebugString
The string returned from QStringView::utf16() is, in general, not
NUL-terminated, as OutputDebugString() requires. Though we only ever
call win_outputDebugString_helper() with an actual QString, it's not
100% clear said QString doesn't originate from, say, a QStringLiteral,
in which case QString::utf16() would have to (an does) detach() to
ensure the NUL-termination.

So, take by const QString&, but use QStringView::mid() to avoid
copying the substring content twice.

Amends a049325cc7.

Pick-to: 6.3 6.2 5.15
Change-Id: Ie42a6000c75c6a55d629621d89e0cf498b174d29
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-12-15 18:35:13 +01:00
Joerg Bornemann
2a013fec1c CMake: Fix errors about missing qt_setup_tool_path_command.bat.in
This amends commit 0bea727cac or rather
reverts it and applies a different fix for QTBUG-98843.

Use file(WRITE) instead of configure_file or file(CONFIGURE).  This
command doesn't have the line endings issues in CMake 3.19 (see
QTBUG-98843).  It's not problematic that the .bat file gets a new
timestamp on every configuration step, since we don't add dependencies
on it.

Fixes: QTBUG-99223
Task-number: QTBUG-98843
Change-Id: Ibdcd0e4703bf6df42c6a6d0bb2f35c5144bbe30a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2021-12-15 18:04:48 +01:00
David Skoland
12511c9941 Declare params in qwasmclipboard unused
Without this, it won't compile with the -developer-build configure
option (warnings are errors)

Pick-to: 6.3 6.2
Change-Id: I114370e918d63bd6e8855b5f750999cf372e2f6d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2021-12-15 18:04:48 +01:00
Morten Johan Sørvig
44d2f97bff wasm: implement socket notifier support
Implement socket notifier support using Emscripten’s
socket callbacks.

This is sufficient for supporting non-blocking (tunneled)
TCP and UDP sockets on the main thread.

Change-Id: Ib9ee2698d029fb94d954c6872f8e118b0aa15499
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2021-12-15 17:06:11 +01:00
Morten Johan Sørvig
76d12eea22 wasm: implement host lookup for socket tunneling
Emscripten implements support for tunneling TCP and
UDP sockets through a WebSockets connection. This support
is implement for the BSD sockets API, which means that
Qt’s existing socket classes can be used, with some
adjustments.

For example, the flow for making a TCP connection to
example.com:1515 can look like this:

1) The application resolves “example.com”.
   Emscripten creates an internal mapping to a private
   IP and returns that IP: 172.29.1.0.
2) The application connects to 172.29.1.0:1515.
   Emscripten makes a WebSocket connection to example.com:1515,
   and forwards the TCP data over this connection
3) On example.com:1515, a WebSockify intermediate server
   accepts the WebScoket connection and forwards the
   TCP data to the target sever, as specified by the
   WebSockify configuration.

Emscripten’s local getaddrinfo() implementation is fast,
which means don’t need caching or the thread pool. Instead,
special-case lookupHostImpl() for Q_OS_WASM. The implementation
calls QHostInfoAgent::lookup() and then posts resultReady
using QHostInfoResult.

Change-Id: Iaf31efb701ae7cc11752a63cc6b8346d4f09107e
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2021-12-15 17:06:11 +01:00
Morten Johan Sørvig
292bdac4cf wasm: add rasterwindow manual test
Simplest possible graphical app, with event logging.

Change-Id: I6b1eb88c270a190becb23cc63d6d755ffbafcf52
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-12-15 18:06:11 +02:00
Morten Johan Sørvig
4184a127fa macdeployqt: don’t err on unexpected otool output
Binaries with multiple slices (e.g. arm64, x86_64)
will have an extra line for the slice, like:

“/path/to/QtGui.framework/QtGui (architecture arm64)”

The parsing code will skip this line since it does
not match the regexp. In other words the parsing works
by looking for lines which matches, and finding lines
which don’t match is not an error condition.

Pick-to: 6.3
Task-number: QTBUG-98466
Change-Id: I0afebdc0dd19e76de00157518f3409d690f18fc0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-12-15 15:43:16 +01:00
Alexandru Croitor
fc89d92150 CMake: Fix echoplugin example to be built as an external project
It was accidentally reverted as part of a different change.

Amends 3c1125d9fe

Pick-to: 6.2 6.3
Task-number: QTBUG-90820
Change-Id: Id9b2650c7c42fd9f401cd2da3fcd60ed4d39d212
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2021-12-15 15:43:16 +01:00
Marc Mutz
eb4206ba23 tst_qmetatype: remove the previous clang-arm workaround
Let's see whether splitting the TUs has made the test amenable to be
compiled on Clang for ARM again.

Pick-to: 6.3
Change-Id: I6bf1e31189f5058dc393adefabaf3014dce4bcf2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-12-15 15:11:17 +01:00
Fabian Kosmale
3ef6af024b QtTestHelpers: print exit code upon failure
This might give a few insights into why the process has failed, at least
if distinct return values are used for different errors.

Change-Id: I61fe0ede812c4dda3d0cf0f2c96a479d198d340d
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-12-15 13:07:10 +01:00
Alexey Edelev
f51d677948 Fix the copy path of the binary when building for Android in QtCreator
The target path of copy command should include
'libs/${CMAKE_ANDROID_ARCH_ABI}' to make the apk build procedure work
correctly in QtCreator.

Amends 87db26bdfe

Pick-to: 6.3
Change-Id: Icaffc3d7418a9a4994f86e453b329a69452c5f0b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-12-15 13:07:10 +01:00
Ralf Habacker
2e2f1e2af7 Add css media rule support for QTextDocument::setHtml()
CSS styles can contain '@media <rule> {...}' blocks, which were
previously ignored for all values except "screen".

To use a media rule other than the default "screen" rule,
specify it before calling setHtml() with setMetaInformation()
and the new info value 'CssMedia'.

[ChangeLog][Gui][QTextDocument] Add css media rule support
for QTextDocument::setHtml()

Pick-to: 6.3
Fixes: QTBUG-98408
Change-Id: Ie05f815a6dedbd970210f467e26b116f6ee3b9ca
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-12-15 11:36:37 +00:00
Pasi Petäjäjärvi
ff97c81642 QNX: Use hostname set in qemu image build files
Hostname is already set in options file, lets use that instead of
setting it again manually.

Task-number: QTBUG-99168
Pick-to: 6.2 6.3
Change-Id: I31c42a597ff45a94a2e36aa6f5002d171ad448ee
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
2021-12-15 10:48:22 +00:00
Marc Mutz
5f305e51b5 QRingBuffer: simplify QRingChunk::clear()
Clear should bring the QRingChunk into the default-constructe state,
so just assign {} instead of calling assign(QByteArray()), which is
equivalent, but has to manipulate QBA's atomic ref-count, which makes
it unlikely the compiler will optimize this call.

Pick-to: 6.3
Change-Id: Idab9c92ec84392d484395042db2427c668756efa
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-12-15 08:20:28 +01:00
Yuhang Zhao
5d12942676 Windows QPA: Correctly respond to WM_ERASEBKGND
According to Microsoft Docs [1], applications should
return non-zero in response to WM_ERASEBKGND if it
processes the message and erases the background and
that's indeed the case for Qt.

Although I can't see any visual difference, this patch
obeys the official documentation at least.

[1] https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-erasebkgnd

Pick-to: 6.3 6.2
Change-Id: I8aa0bfb25259013bfc2ca4074f05a97c7865159c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2021-12-15 13:02:39 +08:00
Yuhang Zhao
d2a0202cda MSVC: Optimize global data to reduce binary size
Package global data in COMDAT sections for optimization.
According to the docs, this can significantly reduce the
size of the resulting binary executable.

I've tested build Qt with /Gw locally with and without
LTCG, the result shows /Gw can reduce the binary size
indeed, but not "significantly". The result also reveals
that exes can benefit much more from /Gw than dlls.
The result can be seen from the QTBUG-98894 bug report.

Microsoft Docs:
https://docs.microsoft.com/en-us/cpp/build/reference/gw-optimize-global-data?view=msvc-170

Task-number: QTBUG-98894
Change-Id: Ibce34c98e791e519d669a5fe39c0027d1459c382
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-12-15 13:02:39 +08:00
Yuhang Zhao
877d6cf6f6 Windows QPA: Remove extra class name from the function name
Change-Id: Iabe7c0093acc9b892182aa7e69e5af50abf61275
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2021-12-15 09:41:12 +08:00
Marc Mutz
9a7d2a7acf QVarLengthArray: avoid std::aligned_storage (deprecated in C++23)
Add some scaffolding to prevent us from running into BC issues due to
the underspecified nature of std::aligned_storage.

Qt 5.15 uses a union { char[], double, qint64 } instead of
std::aligned_storage, so doesn't need the fix.

References:
- https://github.com/cplusplus/papers/issues/197
- wg21.link/p1413

Task-number: QTBUG-99122
Pick-to: 6.3 6.2
Change-Id: I212be7000376c2db33b8cb244a6e862cc4dad544
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-12-15 01:33:05 +01:00
Marc Mutz
9440c1a1fc Revert "tst_qmetatype: Temporarily disable expensive tests on QNX"
This reverts commit 925ad78024.

Reason for revert: Meanwhile, the QNX VM has been assigned more
resources, and the offending test function been split. Re-enable the
test on QNX, to get back to previous test coverage.

Fixes: QTQAINFRA-4669
Pick-to: 6.3
Change-Id: Ib085fbfa7e0d8445f007d1a9346cee3113620720
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-12-15 01:33:05 +01:00
Marc Mutz
daaa3088ec QVarLengthArray: don't allow syncqt to export base classes
Check, in tst_qvarlengtharray, that the forwarding header still works.

Pick-to: 6.3
Change-Id: Ia03cf48457f538287880bb676aea3fa44aeb255f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-12-15 00:04:45 +01:00
Marc Mutz
c4016f9564 QByteArray: sprinkle API with noexcept
Mark (const) data()/begin()/end()/size()/empty() and similar as
noexcept.

Move some trivial definitions into the class body.

Pick-to: 6.3
Change-Id: I6f3ab792264347cdc6a476dacecf065f59f16ff9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-12-14 22:53:12 +01:00
Pasi Petäjäjärvi
64cff16e0d QNX: Fix QLockFile support
Implement getting pid by process name and enable using flock().

Pick-to: 6.2
Change-Id: I500e645b451baddea788d834374a7ae29a4d223f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-12-14 21:50:52 +02:00
Allan Sandfeld Jensen
f370a4c49c Support configure -platform linux-clang-libc++
Detect libc++ config and add appropriate compiler and linker flags.

Pick-to: 6.3
Change-Id: I9ec91b3ace987599d4e79e43b1b75aa67cd5caeb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-12-14 20:04:43 +01:00
Alexey Edelev
2f30e9d751 Use the highest-available android SDK version as the 'target' SDK
When building Qt we want to use the highest available 'target' SDK
version. If the version of the available SDK is lower than the minimum
required 'target' SDK version, we need to throw an error.

Pick-to: 6.2 6.3
Fixes: QTBUG-99165
Task-number: QTBUG-98870
Change-Id: Ib75567a6f33ac6d23d9f79e8ed8535839c08b91d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-12-14 17:09:21 +01:00
Morten Johan Sørvig
50118730b4 wasm: make the compositor draw the window icon
Currently the compositor draws the Qt logo by default;
check if the window has an icon and draw that instead
if set.

Fixes: QTBUG-86052
Pick-to: 6.2 6.3
Change-Id: Ia4f9c03562c15993c86cb8717f27e47ab669353d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-12-14 13:11:26 +00:00
Andreas Buhr
72e802f3b0 Use QAbstractItemModelTester in all QSortFilterProxyModel tests
This patch installs a QAbstractItemModelTester in the
QSortFilterProxyModel tests.

Change-Id: I9bdcc21ba12f919c91c5b9514a5f4362437318c2
Reviewed-by: David Faure <david.faure@kdab.com>
2021-12-14 14:11:26 +01:00
Tor Arne Vestbø
ae6dc7d6df Fix qt_scrollRectInImage when scrolling outside of the image
We were clipping the source rect to the image, both pre and post
scrolling, but did not apply the same logic to the target position.
By computing the target position based on the already clipped source
rect we ensure that the target position is also correct.

This was causing valgrind warnings on Linux, and crashes on Windows,
when trying to test the lower level QBackingStore::scroll() function.
The reason we were not seeing this in practice was that QWidget does
its own sanitation and clipping of the arguments before passing them
on.

As a drive-by, fix the access of image to use constBits instead of a
manual cast, and rename variables to better reflect their use.

Pick-to: 6.3 6.2 5.15
Change-Id: Ibc190c2ef825e634956758f612a018f642f4202b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-12-14 14:11:26 +01:00
Pasi Petäjäjärvi
701294e362 CI: Enable rest of the Qt modules for QNX
Currently only qtbase is being run Qt autotests

Task-number: QTBUG-99168
Pick-to: 6.2 6.3
Change-Id: Ib9678c937c91946f07b78f8141df4837fa5d4111
Reviewed-by: Toni Saario <toni.saario@qt.io>
2021-12-14 10:41:56 +02:00
Lars Knoll
340c0c2ab0 QHash: Improve memory-allocation strategy
Be smarter when allocating memory for the real data in
addStorage(). As the amount of entries in there follow
a binominal distribution, we know pretty well, how many
there will be at least and at most. This avoids most of
the reallocations of the storage when not rehashing, while
Tessil's tests show that the total memory consumption has
not changed.

Task-number: QTBUG-91739
Task-number: QTBUG-98436
Change-Id: I98854bfbde8b2a16e788bfa1890c694d38fd09b5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-12-13 18:58:36 +01:00
Lars Knoll
9836dbd6ee QHash: increase minimum buckets to a full span
Change the minimum amount of buckets to be at least
128, ie. one full Span. This will simplify some assumptions
in the code.

Regeneration of rcc test-data needed because the extra buckets
causes the order of the keys to change.

Task-number: QTBUG-91739
Task-number: QTBUG-98436
Change-Id: Ic0c7da03570cc4c4e6aacc9645e536aec3667a98
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-12-13 18:58:36 +01:00
Mårten Nordheim
333a284ccf QHash: Move span constants to its own struct
To avoid needing a templated Span to access them

Task-number: QTBUG-98436
Change-Id: I5c3b16f9a806986b14ed794a3818990aa3ead0f7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2021-12-13 18:58:36 +01:00
Mårten Nordheim
e508c4c094 QCache: Adapt to upcoming QHash changes
QHash changes some of its preconditions, so we must not call
findNode without verifying !isEmpty()

Task-number: QTBUG-91739
Task-number: QTBUG-98436
Change-Id: I2701b9a01187530f541a7c9a12db56c92f856d87
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-12-13 18:58:36 +01:00
Vladimir Belyavsky
20d869f4c5 QGlyphRun: always use stored bounding rect even if it's empty
QGlyphRun's bounding rectangle may have zero width, e.g. when it
contains only non-printable characters. Some code, e.g.
QTextLine::glyphRuns(), may pre-calculate bounding rectangle for
QGlyphRun and store it inside via QGlyphRun::setBoundingRect().

Previously, we would ignore empty rects as an indication that no
bounding rect had been set on the QGlyphRun. This should be
checking for valid rects instead, to allow for runs containing
non-printable characters exclusively.

Fixes: QTBUG-96463
Pick-to: 6.2
Change-Id: Ia934749cfda37e60ebf98fb76536434054baa4d1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2021-12-13 16:43:47 +00:00
Mike Achtelik
3f6041fb82 QNetworkAccessBackend: Fix living QObjects after QCoreApplication shutdown
Since switching to the plugin bases system for the network backends,
Qt again retains some QObjects after QCoreApplication shutdown.
This was previously fixed in QTBUG-84234, so make sure we destroy the
newly introduced QObjects as well.

Task-number: QTBUG-84234
Change-Id: Ibb411c2dfb716b8f2aea2a3e366253fbd9dd8f64
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-12-13 16:18:06 +01:00
Kai Köhne
80a76df178 Examples: Fix whitespace issues in CMakeLists.txt
Pick-to: 6.3
Change-Id: I8e6dd1f250f8be6016ee4164cb2ab7034cbb1203
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-12-13 14:16:26 +00:00
Kai Köhne
51f22a3a04 Examples: Remove remaining conversion markers in CMakeLists.txt
Pick-to: 6.3
Change-Id: Ia5d474a3efd6aadbd0ef1537318f2f24e6c24fee
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-12-13 14:16:26 +00:00
Kai Köhne
9ca7429dff Tests: Use REQUIRED COMPONENTS in find_package(Qt6...)
Make sure configure fails early if a component cannot be found.

Task-number: QTBUG-98867
Pick-to: 6.2 6.3
Change-Id: I4baa35a84342df58ce8932601fb602be92ed5ab9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-12-13 14:16:26 +00:00
Kai Köhne
28a9d116bb CMake: Prefer unversioned commands
Pick-to: 6.3
Change-Id: Ib32700ab82cf6b271c49e25d12fbad8c9c6bc1d1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-12-13 14:16:25 +00:00
Mårten Nordheim
85c5ae2ab8 QHash::insert: Remove outdated \note
It was added in 5.15 when QHash could have multiple entries per key.

Pick-to: 6.2 6.3
Change-Id: Ifb855b05dd65bbc67bb64bf2567229394525b2aa
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-12-13 14:16:25 +00:00
Joerg Bornemann
0bea727cac CMake: Fix build on Windows with CMake 3.19
qt_setup_tool_path.bat did not have proper line endings on Windows with
CMake 3.19, breaking the invocation of tools that use the wrapper, for
example qmltyperegistrar.

The reason was that file(CONFIGURE) doesn't properly write line endings
with CMake 3.19.  See upstream issue #21769.

Use configure_file with a proper input file to work around this issue.

Pick-to: 6.2
Fixes: QTBUG-98843
Change-Id: I2a4da15f306dc844cf83ca9721a77196c42af2ad
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-12-13 14:41:16 +01:00
Lorn Potter
663c1b8827 wasm: remove deprecated argument for source maps
-g4 was deprecated in Emscripten 2.0.17, and since we are well past
that version we can safely use -gsource-map instead.

Change-Id: I497155619d6320661f6be0e220b52fa7d6ca0b8e
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2021-12-13 06:53:22 +00:00
Thiago Macieira
81a31beeb2 Rewrite Q_{GLOBAL,APPLICATION}_STATIC with C++17 goodies
Especially static inline variables. This greatly reduces the amount of
code that existed in macros, moving them to templates.

Additionally, this removes one level of indirection from
Q_APPLICATION_STATIC by removing the std::unique_ptr. We now directly
manage the object's storage.

Change-Id: I2cffe62afda945079b63fffd16bcc825cc04334e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2021-12-12 14:25:42 -08:00