Commit Graph

37372 Commits (5fb347c93daabfb6ab554fa6f8a08a6d02c64cc2)

Author SHA1 Message Date
Qt CI Bot 5fb347c93d Merge integration refs/builds/qtci/dev/1616664803 2021-03-25 11:48:36 +00:00
Qt CI Bot d30f88cbf1 Merge integration refs/builds/qtci/dev/1616661627 2021-03-25 11:01:18 +00:00
Qt CI Bot 3e8092d183 Merge integration refs/builds/qtci/dev/1616659664 2021-03-25 10:30:38 +00:00
Joni Poikelin e287582cba Fix removing columns when QSortFilterProxyModel has not been sorted yet
Fixes: QTBUG-91788
Pick-to: 6.1 6.0 5.15
Change-Id: Iddcafd3171f0f3703b94893a32b4ccaaeea9e713
Reviewed-by: David Faure <david.faure@kdab.com>
2021-03-25 11:32:22 +02:00
Alex Trotsenko 856e0a187f QProcess/Win: simplify logic inside waitForBytesWritten()
Also, remove obsolete comments and an unnecessary check.

Change-Id: If64fa660d5434de94edfa48aafcaeb755aa8d68c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-03-25 10:35:04 +02:00
Eskil Abrahamsen Blomfeldt 70251867a5 Fix compilation with experimental x11 paint engine feature
Adding support for vertical subpixel positions in
d79a9b1a4f changed some private APIs
which were used from the xcb-native-painting feature.

This fixes this (it does not implement vertical subpixels but
simply sets the vertical subpixel position to 0). It also
adds a missing "override" which triggered the warnings-are-errors
when compiling for me.

Fixes: QTBUG-92011
Pick-to: 6.1
Change-Id: If214a0d19a41e623ca9ef8e6215bc145f9846ae9
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-03-25 09:06:25 +01:00
Hyungchan Kim 3dcdd89dd1 Fix compilation error when LTTng enabled
Updates tracepoint for qtgui and qtopengl fit to current source code.

Change-Id: I2e8ecc86a37942425734202a11bbc792e8f27bf3
Reviewed-by: Hyungchan Kim <hyungchan2.kim@lge.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2021-03-25 15:37:55 +09:00
Andy Shaw 5577cbaac5 Return the result we have already when getting an object with no name
This will ensure that something is set for the AutomationId based on
the actual object and the parents that do have object names until it
reaches one without an object name.

Pick-to: 6.1 6.0 5.15
Change-Id: I205485bc0ba772e321879e00e64ea8e1d8f1ba91
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2021-03-24 07:48:03 +01:00
Zhang Hao be643a27f4 Account for multiple screens when computing QSizeGrip available geometry
In a multi-screen setup, when the window was resized on one
of the screens, the resize was limited to the available geometry
of the screen the window was on.
Fix this by using the whole virtual geometry of all the screens
as basis for the resize.

Fixes: QTBUG-91714
Change-Id: I28dd241d73f6a68550af88e368f0dbdcb9ebf42b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-03-24 00:54:02 +00:00
Qt CI Bot 2db455aff4 Merge integration refs/builds/qtci/dev/1616505582 2021-03-23 19:38:31 +00:00
Qt CI Bot 1bf62d37d1 Merge integration refs/builds/qtci/dev/1616510551 2021-03-23 19:37:01 +00:00
Qt CI Bot 7d5a183e9d Merge integration refs/builds/qtci/dev/1616509627 2021-03-23 19:00:59 +00:00
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 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
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 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
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 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
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 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
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
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