Commit Graph

55989 Commits

Author SHA1 Message Date
Tor Arne Vestbø
88c0a317ec QFontDatabase: Track empty slots in application font list via file name
This allows us to use the properties of the application font as a way to
distinguish whether the font has been populated or not.

Change-Id: Iccce32b23c1b987f2f75fef955227bddc2495fa3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-04-07 14:05:04 +02:00
Mårten Nordheim
c159546401 Network[doc]: Update Qt6-changes for QNetworkInformation in 6.3
Pick-to: 6.3
Change-Id: Icb6d19fd0b7554a83eec2fdc5843e995c5434ee2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-04-07 14:05:04 +02:00
Mårten Nordheim
188cbc0417 Network[doc]: Update Qt6-changes with QNetworkInformation details
I always meant to remove the note and update it with a link, but forgot.

Qt 6.2 details only so it can be easily cherry-picked there.

Pick-to: 6.3 6.2
Change-Id: I4db3919b71971a997ac8a988951b01c984a8a791
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-04-07 14:05:03 +02:00
Sona Kurazyan
8aa3cf21da Add literal operators for QString/QByteArray to StringLiterals namespace
[ChangeLog][QtCore] Added literal operators for _s and _ba for QString
and QByteArray respectively in the Qt::Literals::StringLiterals
namespace.

Task-number: QTBUG-101408
Change-Id: I5cd4e7f36f614ea805cfecc27b91c5d981cd3794
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-04-07 09:22:28 +02:00
Timur Pocheptsov
a0470ec261 QProxyStyle: do not pass DeferredDelete to baseStyle
Calling deleteLater on an object of type QProxyStyle (or inheriting from
QProxyStyle) results in this object never deleted, since it simply
passes the event to its base style, which in case of deleteLater is
not right. QProxyStyle inherits QCommonStyle which in turn inherits
QStyle (which is QObject's descendent). So for the style to be deleted
we pass DeferredDelete to its base class - QCommonStyle::event (which
means QObject::event, since neither QCommonStyle nor QStyle override
QObject::event()).

Pick-to: 6.3
Fixes: QTBUG-96213
Change-Id: I99b8f413624e2f18ddae3fb331997f767de219d0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-04-07 05:04:41 +02:00
Tor Arne Vestbø
6cbaf834a7 QFontDatabase: Move registration of platform application fonts into call sites
Makes it more transparent what's going on, rather than the opaquely
named static helper function.

Change-Id: I9a5bd348007e9ed11214f1e55c4b39d4734328dc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-04-07 03:18:57 +02:00
Tor Arne Vestbø
24f242a2f3 QFontDatabase: Make match/bestFoundry/load(Single)Engine part of QFontDatabasePrivate
Makes it clearer where and how they are used, and to set breakpoints on them.

Change-Id: Id2aaeb51ff80676ad3316d29e23661b2cad79478
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-04-07 01:18:57 +00:00
Tor Arne Vestbø
04837c1687 Don't blit individual rects of region when when scrolling backingstore
The QPlatformBackingStore::scroll() API takes a QRegion as input, but
we have no guarantee that the individual source and destination rects
of the region will not overlap each other when applying the scroll offset,
so we can't naively iterate the rects and call qt_scrollRectInImage for
each one.

The reason this didn't cause any issues in practice was that the QWidget
repaint manager was always passing in a single rect as the region.

On the other hand, the client has requested a scroll of the given
region, so it might assume any other part of the backing store is
preserved as is. Scrolling the bounding rect of the region violates
this assumption.

Amends 19ef76b0606621f189d3bc56549d200f2f5ebb25.

Pick-to: 6.2 6.3
Change-Id: I27934dd6685311c0b53ea2adb60fa5997e360f6c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-04-07 03:18:56 +02:00
Tor Arne Vestbø
c1b0b061e1 doc: Warn against using the screen's refresh rate for driving animations
Pick-to: 6.2 6.3
Change-Id: Id26aae76792a4109b2ea6cca3db69ab505495d65
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-04-07 03:18:56 +02:00
Marc Mutz
9c21347863 Rest of QtBase: sweep Q_DECLARE_METATYPE → QT_DECL_METATYPE_EXTERN
It's one of our best tools to improve compile times.

In some places, we can't do the change, yet, because there's no .cpp
file for the header file.

Also mark Q_DECLARE_METATYPE macros that are in the wrong place. We
shouldn't have Q_D_M markup for public classes in .cpp or _p.h files.

Fixes: QTBUG-102206
Change-Id: Iec0a39e4745571b24d07dacc87593321967c10e3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-07 01:29:24 +02:00
Eirik Aavitsland
6963190581 Graphicsview: Avoid background clearing glitches under fractional DPR
QGraphicsView enables autoFillBackground on the viewport widget, so
the dirty area is cleared before repaint. Then QGraphicsView fills the
same area with the background color. However, under fractional DPR
scaling, the scaled version of the dirty rect may end up covering only
a fractional part of the pixels on the edges. If antialising is
enabled, such pixels will be only partially filled with the background
color, leaving the clear color partially visible as glitches. This can
be seen in the dragdroprobot example.

Fix by disabling AA during background filling, as it has no purpose
then anyway.

Task-number: QTBUG-96223
Pick-to: 6.3 6.2 5.15
Change-Id: Ica00997141701faa0cf368caced84ae50ba017d0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-04-06 23:30:57 +02:00
Allan Sandfeld Jensen
ca106e261e Make keyClick safer for QWindows going away on presses or during wait
We already have similar logic in the QWidget variant.

Pick-to: 6.3 6.2
Task-number: QTBUG-102253
Change-Id: Idf1e3474f3189909f1cba7d5dedc2cde12f1338e
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
2022-04-06 20:39:33 +02:00
Alexey Edelev
6569a4068b Map the 'verbose' configure option to CMake
Raise the CMake log level to STATUS when the 'verbose' argument is
passed to the configure script.

Change-Id: I736d95ab66b115f8416eec7f9e2ee96d1580c78d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-04-06 16:46:59 +02:00
Iikka Eklund
878984a014 Conan: Resolve the 'qt_host_path' before assigning it to 'QT_HOST_PATH' env
The value of the 'qt_host_path' option needs to be resolved fully
before assigning it to 'QT_HOST_PATH' env.

This icludes expanding ~ constructs, resolving symlinks, expanding vars
and relative paths.

Pick-to: 6.2 6.3 6.3.0
Change-Id: Ia338105ccb4a203796864304f463b222163c5193
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-04-06 17:46:59 +03:00
Ivan Solovev
7c9afa8d00 Q[Multi]Hash: fix squeeze()
When calling QHash::reserve(), or when creating the
internal QHashPrivate::Data structure, the value 0
for the size parameter is reserved for performing
the squeeze operation.

However commit 8a984ab772
broke it, by using the 0 value in QHashPrivate::Data
constructors as a mark that no resizing needs to be done.

This patch reverts the problematic commit (also applying
some later fixes to the code), and adds the missing
tests for Q[Multi]Hash::squeeze().

Pick-to: 6.3 6.2
Change-Id: Id644df7b2beb008e6a37b2c89b709adfbd893e25
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-06 16:46:59 +02:00
Ivan Solovev
d11941db41 Q[Multi]Hash::reserve(): do nothing if desired size is less than current
Calling Q[Multi]Hash::reserve(n) when n is much smaller than the
current amount of elements in the hash, could result in an infinite
loop, because at some point the algorithm could not find a free bucket
for the element.

Fixing it by returning early if the new desired capacity is less than
current.

Fixes: QTBUG-102067
Pick-to: 6.3 6.2
Change-Id: I38ef0b2168c4e2a317eedf91b2155b1fdffb1c27
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-06 16:46:59 +02:00
Xiao YaoBing
87098106d0 Remove unnecessary type conversion
Change-Id: I09e3e4596a8c79b3ece08c694010c76e05d8a22b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-04-06 22:46:58 +08:00
Assam Boudjelthia
bc71496a34 Android: fix androidtestrunner failure parsing
Make sure androidtestrunner reports the following cases as failures:
* XPASS test case
* The test output doesn't have closing block.
* The test result read from output.txt is empty

Pick-to: 6.2 6.3
Fixes: QTBUG-100312
Task-number: QTBUG-100470
Change-Id: Ifbb3c31fa22159df0c39b264e95e2f1ccd16e5ff
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-04-06 14:50:17 +03:00
Eirik Aavitsland
0ff7328f37 Improve surface format request for baseline test of GL painter
Different platforms and drivers hae different defaults, so make sure
to request what we need.

Pick-to: 6.3 6.2
Change-Id: I54ae6e0770fea53fbf59c86d7e55aa5897292b67
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-04-06 12:44:40 +02:00
Marc Mutz
20e6a049fe QtNetwork: sweep Q_DECLARE_METATYPE → QT_DECL_METATYPE_EXTERN [2/2]: private API
It's one of our best tools to improve compile times.

Can't backport to Qt 6.2 because the macros don't exist there.

Pick-to: 6.3
Task-number: QTBUG-102206
Change-Id: Ic8f3870d8eec6211c4be506dc67717cc4e0ff7d6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-06 12:44:40 +02:00
Marc Mutz
787d178b19 QBuffer: optimize seek()-past-end-of-buffer
Use new QByteArray::resize(n, ch) method to resize the buffer
directly, instead of first allocating a QByteArray full of NULs and
then using public write() API to append it.

Change-Id: Ibdb082b970de0ba24534a570ecb23304c5f1470c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2022-04-06 12:44:40 +02:00
Marc Mutz
a00a1d8806 QByteArray/QVarLengthArray: add missing resize(n, v) overloads
QList and QString had them, so add them to QByteArray and
QVarLengthArray, too.

In the QVLA case, we need to jump though a hoop or two to avoid having
to duplicate all the reallocation logic. Nothing a few template tricks
cannot solve.

[ChangeLog][QtCore][QByteArray] Added resize(n, ch) overload.

[ChangeLog][QtCore][QVarLengthArray] Added resize(n, v) overload.

Fixes: QTBUG-102270
Change-Id: I0d281ae5b574f440f682e4a62427b434dcf5b687
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-06 10:44:40 +00:00
Marc Mutz
2fb7c94f63 QDom: optimize an atomic read
By the time setNodeValue() gets its hands on the removed object, the
removeChild() function has already called removed->ref.deref(), which
performs an acquire fence if the ref-count drops to zero.

IOW: if removed->ref == 0 now, then an acquire fence has been
executed. If ref != 0, then we're not reaching into removed, so we
need no acquire.

Therefore, a relaxed load suffices (as opposed to the loadAcquire()
the implicit conversion operator performs).

Found by disabling QAtomic<T> -> T implicit conversions.

Change-Id: I367754fde0ad82db797161b5e94e2ebc08a90c0b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-06 10:44:40 +00:00
Marc Mutz
ad26d6a18d QIODevicePrivate: disable copy/move SMFs
Clazy complained about this polymophic class being copyable.

Change-Id: I05087bb7fcf7112136e5d62c108ea460569f2aa0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-06 12:44:40 +02:00
Marc Mutz
18eaf72991 QSettings: fix a misleading comment
Destructors in C++ are implicitly noexcept, so the try-catch around
QSettingsPrivate::flush() is not to prevent throwing from a dtor
(anymore), but to prevent a throw statement inside flush() from taking
down the whole application.

We don't need to care about abi::__forced_unwind here, since we
couldn't re-throw it even if we wanted to (throw in noexcept function
is direct std::terminate(); at least by not re-throwing, the user will
get a nice complaint message from the runtime).

Pick-to: 6.3
Change-Id: I3b24a4be9aeb74637a58725540990b535d005bdd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-06 10:44:40 +00:00
Marc Mutz
0c1f9ab36b benchmarks: fix deprecation warnings
- count() -> size()
- QCryptographicHash::addData(ptr, ch) -> ({ptr, ch}) (QByteArrayView overload)

Pick-to: 6.3
Change-Id: I15dddfa5c4385dd2a0fa0c3ae06c303c7151e2dc
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-06 12:44:40 +02:00
Marc Mutz
bf2bff543c QMetaTypeModuleHelper: prevent slicing
Disable copy and move SMFs and make the dtor protected. This requires
to restore the default ctor, which in turn also becomes protected,
because it needn't be public.

Found by clazy-copyable-polymorphic.

Pick-to: 6.3
Change-Id: Ibde8202e755f6de05cd8f9e92cf0f9cf19b4e19b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-06 12:44:40 +02:00
Pasi Petäjäjärvi
a322af7df4 CI: blacklist fromHtml:preformats with embedded backticks for QNX
Pick-to: 6.2 6.3
Task-number: QTBUG-100515
Change-Id: I82b06ef1d2e275e256f8d811bc70f425c6e6bf7e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-04-06 11:42:55 +02:00
Yuhang Zhao
42287255d3 Build system: Allow user to enable Intel CET
MSVC:
https://docs.microsoft.com/en-us/cpp/build/reference/guard-enable-eh-continuation-metadata?view=msvc-170
https://docs.microsoft.com/en-us/cpp/build/reference/cetcompat?view=msvc-170

GCC:
https://gcc.gnu.org/onlinedocs/gcc-11.2.0/gcc/Instrumentation-Options.html

Clang:
Don't know where's the documentation but should use
the same parameter with GCC.

Change-Id: I654618e45743a5ad1394c930932b9d0044572725
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-06 13:06:24 +08:00
Allan Sandfeld Jensen
dbae10487e Detach for colortransforms of indexed formats
We were triggering detach during the transform, but the short-cut for
indexed formats wasn't triggering that. Instead make the detach explicit
and avoid it during the loop.

Pick-to: 6.3 6.2 5.15
Change-Id: I0f12b7f93841342a0770ce3d3c78f26ad19d8dac
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2022-04-06 00:04:09 +02:00
Morten Johan Sørvig
08733dff58 wasm: use “specialHtmlTargets” for canvas lookup
We’d like to support use cases which require using
multiple html documents, for example when displaying
application content using more than one browser window.

Normally Emscripten uses the primary html document when
looking up elements by id, which means that targeting
elements on secondary documents is not possible.

Emscripten does provide a workaround: the application
can create custom id mappings to any html element on
the “specialHtmlTargets” object, and then use the
“!id” syntax instead of normal “#id” lookup.

Change-Id: I4dda920868cfbc6f8991425daf8933144c0ffad8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-04-05 22:34:44 +02:00
Marc Mutz
4bc85b9850 QBuffer: fail early in seek() beyond QByteArray's max capacity
On 32-bit platforms, the range of qsizetype is smaller than the range
of the qint64 used as a parameter in seek().

When seek()ing beyond the current buffer's size, the old code relied
on a write() to fill the gap with NUL bytes. This has two problems:

First, this may allocate a huge amount of memory just to find that it
cannot write that much, possibly even taking the program down when the
allocation in the QByteArray ctor fails, instead of returning false from
seek().

Second, the QByteArray ctor to which we pass the gapSize only takes
qsizetype, not qint64, so we were writing data of size gapSize mod
(INT_MAX+1) on 32-bit platforms, which may succeed, just to find that
that wasn't the number of bytes we expected to be written. By that
time, however, the internal buffer has already been enlarged.

Fix by checking whether the desired seek position is within the limits
that QByteArray can contain early on, before attempting to construct
such a large QByteArray.

[ChangeLog][QtCore][QBuffer] Fixed silent data corruption on 32-bit
platforms when seek() fails due to position > INT_MAX.

Pick-to: 6.3 6.2 5.15
Fixes: QTBUG-102274
Change-Id: Ib63cef7e7e61ef8101a5f056c7b2198bb7baa228
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-05 20:34:44 +00:00
Alexandru Croitor
da97bc5f53 moc: Add --debug-includes option to moc
Because moc silently ignores missing headers, or sometimes includes
the wrong header, it is useful to have a facility to print which
header paths were considered and found.

Add a new --debug-includes option that does that.

Task-number: QTBUG-101775
Change-Id: I72b294ae53d6e47252c7d8afe0f2245da78bfadb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-04-05 19:40:17 +02:00
Edward Welbourne
7db6aa4395 Fix overflow issue discovered by MSVC in C++20 mode
In setMSecsSinceEpoch(), when epochMSecsToLocalTime() fails (e.g. when
msecs is near one end of time and the offset being added causes
overflow), the call to setDateTime(d, ...) is bypassed so the d-ptr is
not updated and getStatus(d) returns the status prior to the function
call. The new status being prepared by the function should thus not be
updated to getStatus(d) unless setDateTime(d, ...) was called.

This amends commit 74eddd5bf0

Done-with: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Fixes: QTBUG-102157
Pick-to: 6.3
Change-Id: I25e358070907f22d9e4fb0030fa82ec290c7a730
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-05 19:40:17 +02:00
Edward Welbourne
d9ae822e05 Minor post-""_L1-ification tidy-up in QDateTimeParser
Change-Id: Ibbead3922446b820bfe6def5f1278fd7825f0425
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-05 19:40:17 +02:00
Edward Welbourne
1c359df621 QDateTimeParser: Correct a comment which was exactly wrong
Change-Id: I90c2b2bce4aeb5fe9edf70122c6546976583e1bf
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-05 19:40:17 +02:00
Andreas Buhr
edf9b23145 Extend androidtestrunner default timeout to 8 minutes
qmake had a feature to set androidtestrunner's timeout. This
feature is not yet ported to CMake. So with CMake, we always
have androidtestrunner's default timeout. Which was
five minutes. We have several tests which take just shy of five
minutes and are thus flaky.
This patch extends the timeout to eight minutes. This should be
a temporary workaround until the timeout feature is implemented
in CMake.

Task-number: QTBUG-101596
Pick-to: 6.2 6.3
Change-Id: Ia67ed6ab40a40f1b82861bd15bd04528ee9334ee
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-04-05 19:40:17 +02:00
Andreas Buhr
ea6f556186 Activate tst_qmessagebox for Android
tst_qmessagebox was disabled because it crashed.
It does not any more. Now it hangs, which
is a new problem.

Fixes: QTBUG-87671
Task-number: QTBUG-101217
Pick-to: 6.2 6.3
Change-Id: Iec15cf82a4112ee79182ec091622e40147bd3e7f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-04-05 18:40:17 +01:00
Laszlo Agocs
a5db072dc2 rhi: Add explicit subclass for RTs from swapchains
We want to enable gaining access to the underlying resource(s) by
inspecting a QRhiRenderTarget. This is not currently possible for
swapchains since there is nothing that references the actual
QRhiSwapChain. To clean this up, make an explicit, new
QRhiSwapChainRenderTarget subclass. Thus the logic already used in a
couple of places to examine the resources attached to a
QRhiTextureRenderTarget can now work with swapchain render targets too,
by branching based on the resourceType().

This eliminates the somewhat odd setup where a "RenderTarget" resource
is QRhiRenderTarget corresponding (but not exposing!) a swapchain,
whereas a "TextureRenderTarget" is a QRhiTextureRenderTarget which
is a subclass of QRhiRenderTarget. Now we correctly have an (abstract)
base and two subclasses, one for each type of render targets.

Besides, it allows us to clean up the oddly named
Q...ReferenceRenderTarget classes in the backends, which initially tried
to indicate that this "render target" merely references (or, in
practice, is) a swapchain. We can now have a nice and symmetrical
Q...SwapChainRenderTarget and Q...TextureRenderTarget naming scheme.

Change-Id: Ib07e9be99a316eec67b94de0860e08f5f4638959
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-04-05 19:40:17 +02:00
Mårten Nordheim
d72f2ca9ea QMetaType: Add qHash() overload
This is needed for use in QHash and similar.
It's essentially the same as using the integer id, but typesafe

Change-Id: I9515b8e178c8f9828934cb0bb099cce5553ec393
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-04-05 17:24:28 +00:00
Marc Mutz
d2d202c648 QtNetwork: sweep Q_DECLARE_METATYPE → QT_DECL_METATYPE_EXTERN [1/2]: public API
It's one of our best tools to improve compile times.

Can't backport to Qt 6.3 or 6.2 because this change introduces new
exported symbols.

Task-number: QTBUG-102206
Change-Id: I6bfa532be34ca847d3b9034d16c94efed3d602c3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-05 16:27:16 +02:00
Marc Mutz
bfd2d30169 WhenAllContext: optimize atomic operations
The old code performed one load-acquire (in the assertion) and one
ordered(!) fetch_sub() (in the pre-decrement operator) where one
relaxed fetch_sub() would suffice (it's just a counter).

Fix by caching the result of the relaxed fetch_sub() and performing
the following checks on the cached result.

As drive-bys, rename the atomic member variable (to catch any outside
uses) and make the ctor explicit.

Found by locally disabling the QAtomic<T> -> T implicit conversion
operators.

Change-Id: Ifdc11c2c4807b71f4cab2ba9f5405ace7d8d71a9
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-04-05 14:27:16 +00:00
Tatiana Borisova
8116fdde1c Reorganize work with graphical libraries on INTEGRITY
- Currently we manually unpack all platform libraries,
  that are required for GUI apps, and pack it into single eglmegapack.a library.
  It could be better do not execute such additional step,
  but have possibility to add required graphical libs
  to cmake interface lib via toolchain file list variable.

Pick-to: 6.2 6.3
Change-Id: Ic4122600f02e6828d528ee4f00075f8c27f42e38
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-04-05 17:27:15 +03:00
Tommi Mänttäri
aa8bada10b CI: add Windows host support for QNX
Add required environment variable configurations to COIN for
building Qt SW in Windows host for QNX OS.

Task-number: QTBUG-101292
Pick-to: 6.3 6.2
Change-Id: I3ea4cbaaebb693a0a46b5f9cbd08209805366ca7
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
2022-04-05 17:03:40 +03:00
Tommi Mänttäri
e506c84eb2 CI: use HOME directory for QNX license and PATH in Linux host builds
To ensure that both Linux and Windows host builds are equivalent
the Linux host builds need to use the common QNX SDP file that
support both host environments. This new QNX SDP does not include
QNX license files like previously, instead they are separately
installed by the Ansible scripts of the CI system to the $HOME/.qnx
directory. That directory is also supposed to be used for any possible
binaries found via PATH environment variable.

Task-number: QTBUG-101292
Pick-to: 6.3 6.2
Change-Id: I97ad71f00e8289e708c51565f86c6d0c84a9ae84
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
2022-04-05 17:03:40 +03:00
Nodir Temirkhodjaev
99f22e3fc8 QSplitter: Don't move handle in non-pressed state
Fixes: QTBUG-102249
Pick-to: 6.2 6.3
Change-Id: Ib1d74447e346760d1fc9960e11486e8dc7ea3bc0
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-04-05 17:03:40 +03:00
David Skoland
cd1ac8666c Correct documentation in QMainWindow in regards to centralwidget
It's quite clear from the code in qmainwindow.cpp and
qmainwindowlayout.cpp that centralWidget returns nullptr (not zero)
if it's not set. This also seems to be perfectly well supported,
contrary to the note given.

Change-Id: Ib7ab37f3645089fb85d7262717b7147b5871c1ad
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2022-04-05 15:01:12 +02:00
Timur Pocheptsov
306f44a176 QCocoaTheme: use NSColor.controlAccentColor for QMenu items
The highligh color we have looks too different to what system menus
have. Accent color seems to be better matching this color, though
it's not really what we can see in menus, which are transparent and blend
with watever lies below them.

Fixes: QTBUG-75386
Change-Id: I03f66808eb885594862ad9b31398cae4ca186593
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-04-05 15:01:12 +02:00
Joerg Bornemann
b5ed3cb7ba qmake: Add support for C++23
Add the CONFIG value c++2b that represent the upcoming C++23 standard.
Add QMAKE_CXXFLAGS_CXX2B and QMAKE_CXXFLAGS_GNUCXX2B.
On MSVC, use /std:c++latest when c++2b is active.

This fixes an issue with MSVC where c++latest implied the /std:c++20
compiler flag.

Pick-to: 5.15 6.2 6.3
Fixes: QTBUG-102202
Change-Id: Ie00ee5793c1a649195013c8c19efc8d59cf0acc9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-04-05 14:27:50 +02:00
Pasi Petäjäjärvi
6c760f8cef CI: Blacklist mixedScripts for QNX
QNX tests are run under QEMU so have the same problem as Ubuntu.

Pick-to: 6.2 6.3
Task-number: QTBUG-100928
Change-Id: Id7c7639b743062c777502e2ba8b28f9bb18deb19
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-04-05 12:27:49 +00:00