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>
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>
We don't currently handle object libraries when creating prl files for
static Qt builds, so it's best to compile files as part of the main
Core target.
Use source file COMPILE_OPTIONS to add the -fno-lto flag to the
global/qversiontagging.cpp source file.
Amends 2d4a40f93f
Pick-to: 6.1 6.0
Change-Id: Iac1d37ecb4caa7c9889d44b3a103a9bdafec49f3
Reviewed-by: Christophe Giboudeaux <christophe@krop.fr>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Using CMAKE_C_COMPILER to match the compiler
has its drawbacks. CMAKE_C_COMPILER can include
the whole path to the compiler and directory
names that incude icc, icl or qcc also match
even if the compiler is not icc or qcc.
Icc has the compiler id Intel according to
the CMake documentation.
The compiler id for qcc is QCC according to
CMake policy 0047, and this is set to new since
Qt requires CMake to be above 3.0.
Change-Id: Iceb428ed10f0f5bbaa19ec2d883da186c85e7a73
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Set QT_DEFAULT_MKSPEC for various bsd systems, this is needed to
find qplatformdefs.h when compiling.
Change-Id: I9450193b737930548f32c87be3525c5ecd1e0e13
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This design decision was intentional and reflects the fact that we
cannot have inheritance tree 'linear' as before, since the base
interface is an abstract class without any data-members.
Also, fix a warning about size_t -> int implicit conversion.
Fixes: QTBUG-91866
Change-Id: Icbc73c22d8adf72bbd8949125d4404ea6da69c6d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 1a7faeef94dcf6826c6ee564a1bfb31ebb952e56)
Just check for null image/oom initially, no need to do it for every
scanline.
Reported by static analysis.
Change-Id: I86c3f09556b99b889e720901a3691bb0f730ac02
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The code has apparently been broken for quite a while, probably since
the change that made the QObject constructor invokable.
Fixes: QTBUG-91710
Pick-to: 6.0 6.1 5.15
Change-Id: I8b7e6c8a579913b3d0e2a364ffdbffe8d404c72b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
If dd->control is nullptr, then it's nullptr all the way, so don't
dereference it in the calls to dd->controlOffset.
Fixes static analyzer warning 9c33d9bc9b8cf438dccb63aa52afcbe0.
Pick-to: 6.1 6.0 5.15
Change-Id: I7a61b6438422373678d4fcb66255b750c550724d
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
In particular that influences BundledLibrary targets.
Most internal targets already depended transitively on Qt::Platform
via Qt::Core as a public dependency. This was not the case for
BundledLibrary targets which don't link to Qt::Core.
This led to compilation issues in user projects when targeting
WebAssembly, due to mismatched flags between a bundled Harfbuzz vs
a user project. Probably other subtle issues as well (e.g. none of the
Windows specific compile definitions were passed to bundled libs).
Bundled libraries depend on PlatformCommonInternal already, so make
PlatformCommonInternal turn depend on the public Platform target.
I thought that was already the case, but we merely relied on the
Qt::Core dependency.
Note that Qt::Core should still list Platform as a public dependency,
so it gets propagated to user projects.
Amends acf9b3a68b
Change-Id: Ida3b219818f89ec6eba2c2d92c5db65ad56bc5a4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The mariadb driver sets the encoding for the connection to utf-8 but
only after the username and password was already set. Therefore
non-ascii characters were not correctly encoded when the local character
set was not the default one from the database.
Move mysql_set_character_set() above the username/password setting and
encode all as utf-8 instead local8Bit.
Fixes: QTBUG-55444
Change-Id: Iff7ee24159d54b578cd854e620aa814d72da3801
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
This can only be completed in Qt 7, due to BC guarantees. I've only
updated the source code for QHostAddress and its unit test and even then
I did not touch the documentation. This needs to be completed in Qt 7.0
Change-Id: I26b8286f61534f88b649fffd166b695882f8f3b5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Because this is misleading:
socket.bind(QHostAddress::AnyIPv4);
The conversion of enum to int has preference over the construction of
QHostAddress from enum, so that ends up calling bind(6), which attempts
to bind to privileged port 6 and just returns with error. Meanwhile,
socket.bind(QHostAddress::AnyIPv4, 0);
does construct the QHostAddress because that is preferred to converting
the int to the BindMode enum.
Ideally we'd simply add the overload to QAbstractSocket but we can't do
that because QHostAddress depends on QAbstractSocket. So I've added a
Qt7 task to invert that dependency.
Change-Id: I26b8286f61534f88b649fffd166b683266597796
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The calculation rounds early and often, which is intentional. Add
unit test to make sure we don't regress.
Fixes static analzyer report about incorrect rounding in
c903a34347776fe3b89785faa35c446d.
Address some outdated comments and documentation. The property
is read only and calculated, so don't imply that it can be changed
from its default value.
Change-Id: If2dbd9890e533dfccda3eae4cbc96db4f1246f4d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>