This reverts commit 6de9acf779.
Reason for revert: This might cause ICEs in clang
Task-number: QTBUG-91782
Change-Id: I987d2242b04a22208b54ecbc386a1f6cfc625c1d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This was added in fbfc8ffbf3 but left
unused in Qt 5; and we don't anticipate needing it now either.
Change-Id: I3d1f1301c8896df04255ebef5bacb5c5027dc7ae
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Povilas Kanapickas <povilas@radix.lt>
The given qualification was wrong but also not needed in the first place,
Fixes: QTBUG-92046
Pick-to: 6.1 5.15
Change-Id: Id28347fee2ef11ffcb0df8320b1025568b59de9c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Just to protect against invalid data in d->format.
Change-Id: I5e7cc04d5d8e42bdcb0edd2ab5fa34a08b96b6a8
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Passing e.g. -- -DQT_BUILD_SUBMODULES="qtbase;qtdeclarative" to
configure would fail because the module list was not preserved
as a single argument.
Change-Id: If685d0d541201597a2c2a5dc3d55b5d1ae51da22
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This restores one of the two mechanisms removed in
commit b0383cbd38,
transformed to fit in with the new cached system-zone determination.
Fixes: QTBUG-87326
Pick-to: 6.1 6.0 5.15
Change-Id: Ic270acb0d958e17dbc74a0ff93a5a1843c939678
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
One place where this popped up was the qrhi autotest (in debug builds).
This check is meant for VkRenderpass objects for texture render targets,
should not bother with it for the "main" renderpass.
Amends 19384f2e8f
Change-Id: I877a2458fe17fe339b4741d4aa8af3fbda4dabcc
Pick-to: 6.1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
As this method is rather critical for performance of some central
parts of Qt, it really should be inline whereever possible. This
commit adds an inline implementation for Windows 32 and 64 bit.
Amends 5e9b2ade67
Change-Id: Iea51ef905b1cb7f91ca64b718d79bdc4f5c02c3a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In static builds, we cannot allow any part of the main build to make a
call to find_package(Qt6...) where such a call may load a
Qt6*Plugins.cmake file. That would add additional dependencies to the
main module targets, setting up a circular dependency in the set of
*Config.cmake files which cannot be resolved. This scenario would be
triggered by per-repo builds or user projects.
But Qt's tools and other executables still need to load some plugins
in static builds. Sometimes a platform plugin may be enough, other
times we may want all supportable plugins (e.g. Qt Designer).
Therefore, add all plugins we can identify as relevant for an
executable that is part of the Qt build, but add them directly to the
executable without affecting the linking relationships between the
main module libraries.
Also remove the now unnecessary check for QT_BUILD_PROJECT_NAME in
top level builds because there should be no difference between per-repo
and top level builds any more (as far as linking static plugins is
concerned).
Examples that build as part of the main build will still build
successfully after this change, but they will not run if they require
a platform plugin. Examples need to be moved out to a separate build
where they can call find_package(Qt6) without QT_NO_CREATE_TARGETS
set to TRUE to be runnable (see QTBUG-90820).
Fixes: QTBUG-91915
Pick-to: 6.1
Change-Id: I8088baddb54e394ca111b103313596d6743570ba
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Fix the C4715 warning for 'hostToTargetPathEnum' by marking the qFatal()
branch as unreachable.
Change-Id: Id065daaffd865e85985b1a8e0ac2eba4a2ff0b1c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
On BSD systems backtrace lies in libexecinfo. Use
FindBacktrace from CMake to be able to resolve
backtrace on more unixes than linux.
Change-Id: Ie14fd1727d2da03645fc2d6de10c0217baabad6b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
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>
Dynamic metatypes, like the ones used in QML any Python, benefit if the
pointer in the interface is mutable: They can -either by inheritance
from QMetaTypeInterface or by copying one of its instances- get a
"prefilled" interface, and then replace any member to fit their use
case. Except that before this change, this was not possible for
metaObjectFn.
Change-Id: I6afba13f97174eb08391af38b73fcfc7b37a2276
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Client code on MSVC *must* pass /Zc:__cplusplus when using Qt.
Otherwise, this makes Qt code that relies on feature-testing
macros a mess. For instance, in QTBUG-91117, we trip on this code:
// C++ version guard is necessary: you may have the header,
// but including it in pre-C++20 will cause an hard error
#if __has_include(<bit>) && __cplusplus > 201703L
#include <bit>
#endif
#if defined(__cpp_lib_bitops)
// use some <bit> functionality
#endif
The #define __cpp_lib_bitops should've come from the preceding include
directive, but there's another possibility: that it comes from
<version> (or some other similar header) included transitively,
when compiling in C++20 mode, and *without* a bumped __cplusplus.
Yes, that's an actual possibility on MSVC.
Then, since we did not include <bit> ourselves due to the __cplusplus
version check, using the functionality will cause a compile error.
We're not going to fix *every* post C++-17 feature detection macro
because of MSVC and feature-test shenanigans. It's time to require
compilers to tell us the truth about what they support.
Fixes: QTBUG-91117
Change-Id: I9d74f9d8b74b5ac35dce3528e7a2006746a00676
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
It was treated differently depending on format, made it consistently
behave the same for all formats (following the behavior of the primary
formats).
Pick-to: 6.1 6.0 5.15
Change-Id: Ie24e19957d076fdf3ebd333074e26ede187489eb
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
And use in-class member initialization where applicable.
Task-number: QTBUG-92045
Change-Id: I54715709f2d8e54017311f45016c16d86ed3078b
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
QGridLayout::takeAt() and QLayoutItem *itemAt() only check the upper bound.
If the index < 0, these function will return invalid pointer.
Fixes: QTBUG-91261
Pick-to: 5.15 6.0 6.1
Change-Id: Idfb9fb6228b9707f817353b04974da16205a835c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Do not include vector; we currently do not use std::vector, and the plan
is to use QList when that one supports move-only types.
Use QMutexLocker instead of std::mutex_locker, considering that the
former is already included with <QMutex>.
Use forward declarations where applicable.
Add header which were currently only indirectly included (to make
QtCreator's code model happy).
Change-Id: I37d5cd3982047a6d8a3132fd66571878298039b3
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
The await function is still used in other Qt modules which depend on UWP
API (like Qt Bluetooth).
ERROR_TIMEOUT is a win32 error not an HRESULT so that the check for
FAILED(ERROR_TIMEOUT) in "static inline HRESULT await" will not work as
expected if we do not use HRESULT_FROM_WIN32.
The await function will fail in asyncOp->GetResults but the error
message will not be related to a timeout but about a function being
called at an unexpected time.
Change-Id: Iac46b27f379f80769913d544e32320c77b799b4f
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
copying it would be a mistake
QGenericArrayOps::Inserter is already mark as non copyable
Change-Id: Ib9eba5e26bf943fe82c5cfc83f0785e214d3cc67
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The $<NOT:...> genex already guarantees to return a value of 0 or 1,
so there's no need to wrap it with $<BOOL:...>.
Pick-to: 6.0 6.1
Change-Id: Iff4ad64ed8deaa846e1b5bc22d2e5d9dbcd77cc7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
All our supported compilers support __has_builtin; also, no need to
check for old GCC versions; we require at least GCC 8.
Change-Id: I86d955188e71d6da5ebd1b2455e0f7fad8072bfb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QSqlQuery is a broken value class. Copying one object would mean
copying database state (the result set, the cursor position, etc.)
which isn't generally available for all database drivers.
For that reason, the current implementation does not honor value
semantics -- modifying a QSqlQuery object has visible side effects
on its existing copies (!).
The correct solution is to accept that QSqlQuery is a move only
type, not a value type. Add move semantics to it, and deprecate
its copies.
(We can't just *remove* copies in Qt 6 due to SC/BC constraints).
[ChangeLog][QtSql][QSqlQuery] QSqlQuery copy operations have
been deprecated. QSqlQuery copy semantics cannot be implemented
correctly, as it's not generally possible to copy a result set
of a query when copying the corresponding QSqlQuery object. This
resulted in modifications on a QSqlQuery having visible (and
unintended) side effects on its copies. Instead, treat QSqlQuery
as a move-only type.
Fixes: QTBUG-91766
Change-Id: Iabd3aa605332a5c15c524303418bf17a21ed520b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The hashing seed's type has been changed from int to size_t in Qt 6.
However the functions setting/getting the seed, and the seed itself,
are still simply int, meaning that we've crippled our seeding.
Add a TODO to amend it.
Change-Id: Ie9dd177149ec299ccf16d4e31f9f4b065804cfed
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
utility is enough to get std::pair; qtypeinfo.h needs to include tuple
now though.
Change-Id: I9feb625f9feb148b3f3133747ab5405c2eca049d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
We can avoid the non-inlined function call if the sizes do not match up.
This aligns the implementation of QUtf8StringView's operator== with the
one used for the other string classes.
Change-Id: Iaaf71b236edc0385551639961f753f11b324b327
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>