Commit Graph

50883 Commits

Author SHA1 Message Date
Andreas Buhr
0aae7b9593 Add documentation for internal Q_OBJECT_COMPAT_PROPERTY
The internal class QObjectCompatProperty and the associated macro
Q_OBJECT_COMPAT_PROPERTY did not have any documentation so far.
This patch adds some initial documentation.

Task-number: QTBUG-90511
Change-Id: Ie55e7d7829363bd5a29430a4250ddba14a761912
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-03-25 11:14:38 +01:00
Qt CI Bot
e272070047 Merge integration refs/builds/qtci/dev/1616660720 2021-03-25 10:12:07 +00:00
Volker Hilsheimer
42e659b320 Fix deprecated macros
The QTextCharFormat::fontFamily  methods are deprecated as of Qt 6.1,
not as of Qt 6.0.

Mark them as obsolete in the documentation and point to the replacement
there as well.

Address API review comment.

Pick-to: 6.1
Change-Id: Id71ea1ebab6f7a385c8c3f286a35f88ba1177857
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2021-03-25 11:08:21 +01: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
Andreas Buhr
ce8f7e0ebd Fix some warnings
Change-Id: I9460606cefd8c4b5c01e576043c1bc8660b19de4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-03-25 09:24:03 +01: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
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