Commit Graph

51020 Commits

Author SHA1 Message Date
Qt CI Bot
cf4e607098 Merge integration refs/builds/qtci/dev/1616492874 2021-03-23 15:28:39 +00:00
Qt CI Bot
0c97ef1abb Merge integration refs/builds/qtci/dev/1616500234 2021-03-23 15:10:59 +00:00
Fabian Kosmale
932c10fcda Revert "qtypeinfo: make variable templates inline"
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>
2021-03-23 14:32:22 +00:00
Shawn Rutledge
c0e31d6387 Remove QWindowSystemInterface::handleGestureEventWithSequenceIdAndValue()
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>
2021-03-23 15:25:54 +01:00
Qt CI Bot
661fb133aa Merge integration refs/builds/qtci/dev/1616493800 2021-03-23 14:15:29 +00:00
Qt CI Bot
c5d0abdc3b Merge integration refs/builds/qtci/dev/1616491690 2021-03-23 13:58:05 +00:00
Alex Blasche
edfab62cb0 Remove qualification for Julian calendar
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>
2021-03-23 13:15:01 +00:00
Allan Sandfeld Jensen
35ef3fb009 Test incoming formats more throuroughly
Just to protect against invalid data in d->format.

Change-Id: I5e7cc04d5d8e42bdcb0edd2ab5fa34a08b96b6a8
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-03-23 12:49:08 +01:00
Tor Arne Vestbø
df8e1c8e58 cmake: Handle arbitrary configure arguments that contain lists
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>
2021-03-23 11:01:14 +01:00
Edward Welbourne
824d963700 Restore support for reading /etc/timezone for system zone name
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>
2021-03-23 10:46:33 +01:00
Laszlo Agocs
3c85f8e9fc rhi: vulkan: Prevent a misplaced assert from triggering in debug builds
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>
2021-03-23 10:27:10 +01:00
Lars Knoll
22c66e12e4 Provide an inline implementation of currentThreadId() on Windows
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>
2021-03-23 06:42:16 +01:00
Qt CI Bot
47abdbea81 Merge integration refs/builds/qtci/dev/1616458599 2021-03-23 02:21:15 +00:00
Qt CI Bot
e7422db629 Merge integration refs/builds/qtci/dev/1616449672 2021-03-23 00:19:06 +00:00
Craig Scott
5807e1ae81 Add plugins to Qt tools and executables for static builds
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>
2021-03-23 11:15:33 +11:00
Qt CI Bot
dd7920821e Merge integration refs/builds/qtci/dev/1616448750 2021-03-22 23:46:28 +00:00
Qt CI Bot
adf8ba820a Merge integration refs/builds/qtci/dev/1616446659 2021-03-22 23:17:07 +00:00
Joerg Bornemann
567b154ba7 Fix warning when building qmake with MSVC
Fix the C4715 warning for 'hostToTargetPathEnum' by marking the qFatal()
branch as unreachable.

Change-Id: Id065daaffd865e85985b1a8e0ac2eba4a2ff0b1c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-22 22:32:56 +01:00
Niclas Rosenvik
75296f347f Fix backtrace on non-linux systems
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>
2021-03-22 21:31:09 +00:00
Fabian Kosmale
8771669ca9 QMetaTypeInterface: Do not make member itself const
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>
2021-03-22 21:56:24 +01:00
Giuseppe D'Angelo
647c0e80ed Enforce __cplusplus >= 201703L on MSVC
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>
2021-03-22 19:57:07 +00:00
Qt CI Bot
65b4937f34 Merge integration refs/builds/qtci/dev/1616419842 2021-03-22 19:25:52 +00:00
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
Allan Sandfeld Jensen
c32cd44d34 Fix alpha handling of QImage::setPixel
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>
2021-03-22 14:29:14 +01: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