Commit Graph

50797 Commits

Author SHA1 Message Date
Qt CI Bot
55fdd5e705 Merge integration refs/builds/qtci/dev/1616418060 2021-03-22 19:08:26 +00:00
Qt CI Bot
f5e300bf6a Merge integration refs/builds/qtci/dev/1616415197 2021-03-22 16:45:12 +00:00
Qt CI Bot
e8c3fc7c43 Merge integration refs/builds/qtci/dev/1616410126 2021-03-22 15:22:00 +00:00
Qt CI Bot
b4afffd6a2 Merge integration refs/builds/qtci/dev/1616406519 2021-03-22 15:19:48 +00:00
Eirik Aavitsland
14ccc11194 lance tool: fix build for Qt 6
Pick-to: 6.1
Change-Id: I639ffa60609b1e6036252cccc146dd98fded0b3e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-03-22 13:59:40 +01:00
Fabian Kosmale
abd7496fba QFutureInterfaceBasePrivate: reorder members to save 8 bytes
And use in-class member initialization where applicable.

Task-number: QTBUG-92045
Change-Id: I54715709f2d8e54017311f45016c16d86ed3078b
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
2021-03-22 13:12:15 +01:00
Qt CI Bot
b3544bfd46 Merge integration refs/builds/qtci/dev/1616403477 2021-03-22 11:33:17 +00:00
Qt CI Bot
fc76a348e4 Merge integration refs/builds/qtci/dev/1616402489 2021-03-22 11:14:01 +00:00
Zhang Yu
c47bb4478a Fix invalid pointer return with QGridLayout::itemAt(-1)
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>
2021-03-22 18:47:36 +08:00
Qt CI Bot
248ed57e05 Merge integration refs/builds/qtci/dev/1616400978 2021-03-22 10:36:21 +00:00
Qt CI Bot
f7e697f7bc Merge integration refs/builds/qtci/dev/1616400051 2021-03-22 10:31:24 +00:00
Fabian Kosmale
e07aec7eaa QFuture: cleanup headers
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>
2021-03-22 10:47:13 +01:00
hjk
8403fc7796 Make it even more obvious on what to do when tst_toolsupport fails
Triggered by 6778b247.

Pick-to: 6.0 6.1 5.15
Change-Id: Ic8e7136cd82eb8d3891450cfa8994f43b7cc09fc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-03-22 09:56:51 +01:00
Oliver Wolff
5910adae74 QWinRTFunctions::await: Return proper error in case of timeout
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>
2021-03-22 09:40:29 +01:00
Albert Astals Cid
9e837c936f Make QMovableArrayOps::Inserter non copyable
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>
2021-03-22 09:03:29 +01:00
Nico Vertriest
c535933d89 Doc: Fix qdoc warnings on snippet files
qtwidgets-index.qdoc:123: (qdoc) warning: Cannot find file to quote from: 'snippets/snippets.pro'
qtwidgets-index.qdoc:123: (qdoc) warning: Unexpected '\snippet (//! [qmake_use])'

Task-number: QTBUG-90662
Change-Id: I702b685e7cd9c34b5a07480ecb99e913ce250d70
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-03-22 08:59:23 +01:00
Fan PengCheng
b6fe187f0d Avoid a crash in QMessageBoxDetailsText, just in case
Change-Id: I3322767363c34ad1f131b6ef24e274e5e5cc9f16
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2021-03-22 15:28:14 +08:00
Craig Scott
df121fd7f7 Remove unnecessary $<BOOL:...> generator expression
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>
2021-03-22 10:28:48 +11:00
Fabian Kosmale
5da3f1e4b6 Merge "qarraydata.h: use __has_builtin directly" 2021-03-21 20:12:20 +00:00
Fabian Kosmale
1687f4c963 qarraydata.h: use __has_builtin directly
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>
2021-03-21 18:30:15 +01:00
Fabian Kosmale
3b281f6693 QAbstractFileIconProvider: Fix compilation without feature mimetype
Change-Id: I3aecc1ab97ed549511bc9a5cbc8eb780f5e9a4dd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-03-21 16:39:03 +01:00
Giuseppe D'Angelo
a4ea58bf04 Merge "QSqlQuery: make it a move only type" 2021-03-21 11:24:27 +00:00
Giuseppe D'Angelo
14f9f00fdb QSqlQuery: make it a move only type
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>
2021-03-21 10:16:56 +01:00
Giuseppe D'Angelo
37e0953613 QHash: add a Qt 7 TODO
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>
2021-03-21 10:16:28 +01:00
Fabian Kosmale
ce73ca0b55 qcontainerfwd.h: Do not include variant and tuple
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>
2021-03-21 09:13:04 +01:00
Fabian Kosmale
b8b50c6c7a Clenaup Q_COMPILER_THREADSAFE_STATICS
Change-Id: I1cf0646d4e6c9b30a7ef6538d81f92faf2e511e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-21 09:13:00 +01:00
Fabian Kosmale
52e0a91fbc QUtf8StringView: Check size directly in operator==
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>
2021-03-21 09:12:57 +01:00
Andy Shaw
58437836f0 Merge "SQLite: Update to 3.35.2" 2021-03-20 12:50:27 +00:00
Andy Shaw
022fd8e79c SQLite: Update to 3.35.2
[ChangeLog][QtSQL][SQLite] Updated SQLite to v3.35.2

Pick-to: 6.1 6.0 5.15 5.12
Change-Id: I1e784627d7ed3a226acfbb28d8379d4c69f91a84
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-03-20 11:41:24 +01:00
Fabian Kosmale
411ab34c96 QMetaObjectBuilder: remove unused serialization code
Change-Id: I73a13265a69079581d2974400b3311d3fdfda2d0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-20 10:24:27 +01:00
Alexandru Croitor
90fd142b09 Merge "CMake: Get rid of the Core_versiontagging object library" 2021-03-19 22:55:51 +00:00
Alexandru Croitor
d68486547a CMake: Get rid of the Core_versiontagging object library
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>
2021-03-19 21:42:15 +01:00
Niclas Rosenvik
83e222d8ca Properly set ICC and QCC
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>
2021-03-19 21:02:23 +01:00
Niclas Rosenvik
e9e3c09f4b Merge "Set QT_DEFAULT_MKSPEC for various bsd systems" 2021-03-19 18:56:25 +00:00
Timur Pocheptsov
f6a603f0f5 Merge "Suppress warning (MSVC, C4250)" 2021-03-19 18:49:15 +00:00
Eirik Aavitsland
ac175ff483 Merge "paintengine: improve error handling" 2021-03-19 18:09:23 +00:00
Tor Arne Vestbø
e415939abf Merge "qmake: Improve error message when detecting macOS platform SDK upgrade" 2021-03-19 17:22:04 +00:00
Niclas Rosenvik
36a366c871 Set QT_DEFAULT_MKSPEC for various bsd systems
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>
2021-03-19 16:47:03 +00:00
Timur Pocheptsov
a9300f2c34 Suppress warning (MSVC, C4250)
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)
2021-03-19 17:32:59 +01:00
Fabian Kosmale
919425cb3a Merge "tst_bench_qmetaobject: Fix test" 2021-03-19 15:52:31 +00:00
Eirik Aavitsland
e08eaf2c10 paintengine: improve error handling
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>
2021-03-19 16:47:49 +01:00
Volker Hilsheimer
8f2f70a8ff Merge "Consistently check for nullptr in QGraphicsTextItem::inputMethodQuery" 2021-03-19 15:46:17 +00:00
Alexandru Croitor
ea5cc229e2 Merge "CMake: Make Platform a dependency for all Qt internal targets" 2021-03-19 15:12:33 +00:00
Tor Arne Vestbø
fca543bcde qmake: Improve error message when detecting macOS platform SDK upgrade
Pick-to: 6.1 6.0 5.15
Task-number: QTBUG-85546
Change-Id: I2bce9d22ad826fa73fa4dbfd03c9b1d404c57859
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-03-19 15:08:46 +00:00
hjk
b38b9e2bb0 Merge "Tests: Clarify the course of actions when touching tst_toolsupport" 2021-03-19 14:35:26 +00:00
Fabian Kosmale
ed3df88846 tst_bench_qmetaobject: Fix test
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>
2021-03-19 14:37:51 +01:00
Volker Hilsheimer
7edf0fbb9e Consistently check for nullptr in QGraphicsTextItem::inputMethodQuery
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>
2021-03-19 14:26:03 +01:00
Laszlo Agocs
98e4652a96 Merge "rhi: Make it possible to clone a QRhiRenderPassDescriptor" 2021-03-19 13:05:37 +00:00
Alexandru Croitor
d962c9ff85 CMake: Make Platform a dependency for all Qt internal targets
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>
2021-03-19 12:52:49 +00:00
Fan PengCheng
57c737f325 Merge "Improve the sample code" 2021-03-19 12:10:46 +00:00