Commit Graph

49866 Commits

Author SHA1 Message Date
Alexey Edelev
01708a44de CMake: Fix missing report entries
Increment command_count correct way.

Fixes: QTBUG-88054
Pick-to: 6.0
Change-Id: I0769814ed75ee12db1cab3b1f85635b4d7ee0605
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-05 09:03:18 +01:00
Alexey Edelev
6d41d0f2b7 CMake: Print feature condition errors in configure report
Add output of feature condition error at the end of configuration
summary. Introduce qt_configure_add_report_error that may be used
to add error to end-point configure report without actual
configure interruption.

Fixes: QTBUG-88282
Change-Id: Idcf478da863ae6507438eb3370927d7d1f01e071
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-05 08:03:12 +00:00
Timur Pocheptsov
f319974488 QSslCertificate(OpenSSL) - harden protection against nullpointers
An invalid (as input data) certificate may have non-zero number of invalid (nullptr)
extensions (if OpenSSL failed to parse them, for example).

Fixes: QTBUG-89547
Pick-to: 6.0 5.15 5.12
Change-Id: I4b93ac9f482f850f02d01b0aea10560dc11b688d
Reviewed-by: Lars Schmertmann <lars.schmertmann@governikus.de>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2021-01-05 07:49:59 +01:00
Christian Ehrlicher
3977357120 QTreeWidgetItem: fix documentation error for childIndicatorPolicy()
The default value is 'DontShowIndicatorWhenChildless' and not
'ShowForChildren'.

Fixes: QTBUG-83648
Pick-to: 6.0
Pick-to: 5.15
Change-Id: I5d4dd9f3f58bcac09ed38d8ae451e3b771695ce7
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2021-01-05 07:49:50 +01:00
Christian Ehrlicher
672d2ea8f4 QAbstractItemView: fix selectionCommand() with no event
QAbstractItemView::selectionCommand() returned the wrong SelectionFlags
when no event is given since c4366ff018.
Therefore re-add the call to QGuiApplication::keyboardModifiers() when
no event is given and add a unittest for them so it's not removed again.

Fixes: QTBUG-89711
Change-Id: I107357df08c4ff1b1a14d49523401c5e7b428f56
Pick-to: 6.0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-05 07:49:21 +01:00
Laszlo Agocs
587fed817a Add a platform capability indicating support for QRhi-based rendering
This attempts to reconcile a minor difference between Qt 5 and Qt 6:

Running Qt Quick applications with a platform plugin such as vnc,
led to an automatic fallback to the 'software' backend based on
the OpenGL capability reported from the platform plugin. In Qt 6.0
this logic is gone from Qt Quick, because we do not have, and wish
not to have, individual flags for each and every 3D API on this
level.

Therefore in Qt 6.0 a Qt Quick application running with the vnc
(or linuxfb, or minimal) platform needs an explicit selection of
the software backend via QT_QUICK_BACKEND or
QQuickWindow::setGraphicsApi().

To keep migration for users of such platform plugins easier, we
can still reintroduce a Qt 5-like logic: by having a high level
Is-QRhi-Supported type of flag, we can make Qt Quick query that,
and trigger the fallback to the software backend when it is
reported as false by the platform plugin. As this is the minority
case and a conscious choice by platform plugins, the flag can be
opt-out (i.e. true by the default hasCapability implementation).

When it comes to the existing OpenGL flag, that needs to stay for
compatibility reasons, but it is worth noting that the new flag
semantically falls in the exact same category: it does not indicate
things will really work at run time, but rather serves as an opt-out,
"do not even try" type of declaration the platform plugin can make,
which then allows modules like Qt Quick to make early, upfront
decisions about which rendering paths/backends to take.

Change-Id: I8d6fddeb82ca6eece7b7abc1a5b64ebe6d8af29d
Task-number: QTBUG-89561
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-04 17:30:43 +01:00
Laszlo Agocs
8da171a5ae Adjust surface type usage for onscreen tests in tst_qrhi
Change-Id: I1ae076f8bb44e00bf9ff7706063344e8c5502101
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-04 17:30:37 +01:00
Laszlo Agocs
f6cb24f4c0 Handle maxImageCount 0 in QVulkanWindow
Take the logic we use in QRhi's Vulkan backend.

Pick-to: 6.0 5.15
Fixes: QTBUG-85791
Change-Id: Ifdc2b3d351af71fbc86e20abcede902303e41fc4
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-04 17:30:30 +01:00
Laszlo Agocs
133af89038 rhi: shadowmap manual test: use Nearest filtering
Just to avoid validation warnings on systems where the sampling
a D32 texture with linear filtering is not supported.

This is likely not a problem elsewhere: Qt Quick 3D for example
samples the depth texture only with Nearest filtering already.

Fixes: QTBUG-89761
Pick-to: 6.0
Change-Id: I80bf5b7ecfcb3365f4010daa17f2ef00bb206b74
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-04 17:30:26 +01:00
Giuseppe D'Angelo
d896f78999 qt_qFindChild(ren)_helper: remove pointless checks
The only callers are QObject::findChild(ren), and they always
pass valid pointers, so there's no point of checking them.

Change-Id: I789abc3a53db523acf06c1a8a340094a71c79e41
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-01-04 15:06:30 +01:00
Laszlo Agocs
f6b64c3c62 State in docs that the BufferQueueingOpenGL cap is deprecated
There are no queries for this (somewhat dubious) flag in practice.
Its usage in Qt Quick is gone since 2014 after
0129887195c7255f41515f72ceb213a38b98f72d.

Change-Id: I4fd9cef2705ce13b79ff1dc40a6eda7ce2035e30
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2021-01-04 11:49:54 +01:00
Laszlo Agocs
8bd58a97d7 rhi: vk: Fix DS WAW hazard reported from sync validation
Running with synchronization validation (SDK 1.2.154) we get:

Hazard WRITE_AFTER_WRITE vs. layout transition in subpass 0 for attachment 1
aspect depth during load with loadOp VK_ATTACHMENT_LOAD_OP_CLEAR

Attempt to fix this with an appropriate subpass dependency.

Fixes: QTBUG-89760
Pick-to: 6.0
Change-Id: I67e15a09aab564f63aab646761ccdb1f8b82111d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-04 11:42:21 +01:00
Laszlo Agocs
c715974dc2 rhi: Make triquadcube manual test compile after recent changes
Amends a0aafefd00

Change-Id: I616df866e32fe6df87ce2944f09aac8f0c077534
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-04 11:42:15 +01:00
Laszlo Agocs
97da4519ba Add a dedicated QWindow surface type for D3D
Even though there is no D3D-specific logic in the windows platform
plugin, meaning a QWindow with either OpenGLSurface or VulkanSurface
(or anything really) is DXGI/D3D-compatible, it now looks like it is
beneficial, and more future proof, if there is a dedicated surface
type.

As the linked report shows, there are OpenGL-specific workarounds
accumulated in the platform plugin, while not being clear if these
are relevant to non-OpenGL content, or if they are relevant at all
still. (and some of these can be difficult/impossible to retest and
verify in practice)

When D3D-based windows use the same surface type, all these are
active for those windows as well, while Vulkan-based windows have
their own type and so some of these old workarounds are not active
for those. To reduce confusion, having a dedicated surface type for
D3D as well allows the logic to skip the old OpenGL workarounds,
giving us (and users) a more clear overall behavior when it comes
to OpenGL vs. Vulkan vs. D3D.

The change is compatible with any existing code in other modules
because any code that uses OpenGLSurface for D3D will continue to
work, using the new type can be introduced incrementally.

Task-number: QTBUG-89715
Change-Id: Ieba86a580bf5a3636730952184dc3a3ab7669b26
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-01-04 10:37:11 +00:00
Hou Lei
2d58620140 Adjust the format of code blocks
Change-Id: Id4a98b8b6f66ea4ea18eb90b86c1b84b6342e825
Reviewed-by: Hou Lei <houlei@uniontech.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-04 18:09:55 +08:00
Li Xinwei
173f163ad2 CMake: Fix error and print summary for standalone building sqldrivers
qt_plugins target is needed by qt_internal_add_plugin function, but when
standalone building sqldrivers, this target does not exist, which causes
configure error. So we need to add this target manually.

Fixes: QTBUG-89714
Pick-to: 6.0
Change-Id: Ia7d613faabb82399c2f3e5771aab24302b3c8f56
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-04 17:58:54 +08:00
Tor Arne Vestbø
c30d05e794 macOS: Simplify and fix issues with QMenuPrivate::moveWidgetToPlatformItem
View embedding when QWidget is involved is a bit finicky. This change
breaks down the steps needed to embed it into an NSMenu item, and
simplifies the process by not relying on a container widget.

The main issue is that QCocoaWindow::recreateWindowIfNeeded() will
potentially create an NSWindow for the embedded view, resulting in
a stray view. To prevent this we set the Qt::SubWindow flag on the
window, but QWidget tends to reset this flag when the widget doesn't
have a parent, so we need to be careful about which order we do the
setup.

Pick-to: 6.0 5.15
Change-Id: I505f7c0a2d8e4350511fdb01a5e9b9c623a40a41
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-01-04 10:47:45 +01:00
Tor Arne Vestbø
74559dccc8 Update QPalette() documentation to not mention the application palette
It's an implementation detail that the default constructed palette
happens to use the d-pointer of the application palette, and as a
result has the same colors as the application palette if requested.

The palette has an empty resolve mask, and hence all the colors in
the palette are undefined. Users should not rely on QPalette() to
represent the application palette when for example overriding a
parent palette.

Task-number: QTBUG-85226
Pick-to: 6.0 5.15
Change-Id: Ia6747887eef6e9a5f21b2002066608c433260de2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-04 10:46:26 +01:00
Friedemann Kleint
179696fcb8 uic: Do not generate QComboBox::AdjustToMinimumContentsLength into code
The enumeration value was removed in Qt 6 by
1a342b2db1. Ignore it.

Add a check to helper function checkProperty() and move
the code from a5e2f2ddad there
as well.

Pick-to: 6.0
Task-number: QTBUG-89093
Fixes: QTBUG-89700
Change-Id: I0890be8fff155d7342e2386b7f6b0783a5f3a192
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-01-04 10:25:41 +01:00
Giuseppe D'Angelo
1dc4e5d3eb XmlStringRef: remove operator<=>
It's defined in terms of operator<=> on QStringView, which does
not exist, causing a compile error.

Change-Id: I64fc60da4e52c7e53be7849d9b42952be139a816
Fixes: QTBUG-89729
Pick-to: 6.0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-04 10:02:44 +01:00
Giuseppe D'Angelo
1f4434a8e2 Upgrade md4c to 0.4.7
Change-Id: I9400c2df13c30fb0bc14728a0c44851c2d1e9079
Pick-to: 6.0 5.15
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-01-04 10:02:31 +01:00
Craig Scott
1b4d70676c CMake: Prefer canonical CMAKE_ANDROID_NDK var when writing deploy file
CMAKE_ANDROID_NDK is an official variable provided by CMake. The
ANDROID_NDK variable will be set by the NDK toolchain file, but we
don't need to rely on that (the user could theoretically not be using
the NDK's toolchain file). Using the CMake-provided variable means
we don't have to explain the source of the variable in documentation
for the qt6_android_generate_deployment_settings() command. We should
prefer to use things provided by CMake already where it makes sense
and this seems to be one such case.

Task-number: QTBUG-89651
Task-number: QTBUG-88839
Pick-to: 6.0
Change-Id: Ieda54de8f5c65c36da6bb55c87a8b8fdd1d5cd7b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-04 14:08:40 +11:00
Alex Trotsenko
ef968963c0 QProcess/Win: do not duplicate handles for pipelined processes
Instead, make them inheritable at creation time.

Change-Id: I1aabc203851b2873acc772ba20258238cbe01d59
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-01-03 21:45:47 +02:00
Gatis Paeglis
2dc15e1f25 xcb: document QXcbEventQueue::PeekOption enum
And renamed PeekRemove* to PeekConsumed to document
better that nodes are not removed when peeking.

Change-Id: I7349f57fcfc3287d1a1309a31ee7f481f8d18755
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-01-01 17:58:20 +01:00
Christian Ehrlicher
f0818f6ed8 QAbstractButton: don't access nullptr in queryButtonList()
When a button has no parent, QAbstractButtonPrivate::queryButtonList()
unconditionally accessed parent which results in a nullptr access. Did
not crash because qt_qFindChildren_helper checks for nullptr and
therefore could only be found with a sanitizer.

Fixes: QTBUG-83865
Change-Id: I591e546e96acba50770935b9c3baaf08b09b833d
Pick-to: 6.0
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2021-01-01 16:44:09 +01:00
Alex Trotsenko
e334d6f9a7 QProcess: allow pipelining for detached processes
[ChangeLog][QtCore][QProcess] Added support for
setStandardOutputProcess() with startDetached().

Change-Id: I61278cdb7084127f583c8c017688da392017b44c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-12-31 12:16:46 +00:00
Alex Trotsenko
04c34eb799 QProcess: allow merged channels forwarding for detached processes
[ChangeLog][QtCore][QProcess] Added support for QProcess::MergedChannels
mode with startDetached().

Change-Id: I953ad2063322015332269522a297f8e2842e438c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-12-31 12:16:38 +00:00
Alex Trotsenko
1fb9c5348e QProcess: consolidate channel management
We have the same channel forwarding, redirecting, and merging rules for
all platforms. This makes it possible to introduce the openChannels()
function, which consolidates the logic and performs high-level general
processing of the channels configuration properties.

Change-Id: Id3574fc42a56829328369b6a1a6ec9c95fce8eca
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-12-31 09:34:54 +02:00
Alex Trotsenko
8be9fb66f7 QProcess/Win: do not needlessly duplicate std handles in startProcess()
The idea was to create descriptors with HANDLE_FLAG_INHERIT. However,
this can be assumed to be already the case for std descriptors, and if
it isn't, the user messed up, and we shouldn't try to work around it.

This is consistent with what we already do in startDetached().

Change-Id: I8135c5e612c361e77a0442541f2d50cfbb5b4601
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-12-30 23:40:53 +02:00
Alex Trotsenko
efb3d87700 QProcess/Win: handle more errors in openChannel()
In theory, low-level functions like CreateNamedPipe() or
DuplicateHandle() could suddenly fail. Thus, in order to ensure the
correct configuration of the channels, we must check for these
errors.

Pick-to: 6.0 5.15
Change-Id: I3d6291043e5e394ec5c5a7d85dfb7b09bfdcd172
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-30 21:43:16 +02:00
Matthias Möller
6e9125608f fix potential mem leak on connection lost
The PostgreSQL driver can change it's connection status
after the first established connection.
In this case, the function "isOpen()" returns false
and the "close()" function would not free all resources.
With this fix, the "close()" function
always frees any allocated resource
independent of the connection status.

Fixes: QTBUG-88984
Pick-to: 6.0 5.15 5.12
Change-Id: I7c9add6a183bf46a8573952ab39f8cb1f728c00c
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-12-30 16:04:55 +01:00
Alexey Edelev
94b6bec01f CMake: Fix dirty summary file when reconfigure qt
Overwrite summary file during each configuration cycle.

Amends 6baf36d774

Fixes: QTBUG-87830
Pick-to: 6.0
Change-Id: Ie77f9aded4a7395592ff3cefad02265d836bebcc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-12-30 15:06:14 +01:00
Alexey Edelev
34c3b12fd5 Revert "CMake: Fix missing report entries"
This reverts commit 642ee46f98.

Reason for revert: Issue when command_count is actually 0

Pick-to: 6.0
Change-Id: I1b2603f25b56e3bd50cfc22a08925930ad231498
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-12-30 13:00:06 +00:00
Alexey Edelev
642ee46f98 CMake: Fix missing report entries
Use LESS_EQUAL condition since qt_configure_command_count stores last
added command index but not actual count

Fixes: QTBUG-88054
Pick-to: 6.0
Change-Id: I8112820f9885bdad5a786a4f6b4890d8f2fbe14b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-12-29 13:00:31 +00:00
Alexey Edelev
6baf36d774 CMake: Store config summary to file
Add generation of qmake-like config.summary in build folder

Fixes: QTBUG-87830
Pick-to: 6.0
Change-Id: I08dd9b3116c6200f7e9f5de96605118c1ea474ad
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-12-29 13:58:26 +01:00
Jonas Karlsson
a0aafefd00 Add QRhiTextureSubresourceUploadDescription QByteArray constructor
Change-Id: I1be4ef1a15c4049f19d0401d6a1a62b3117180a0
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-12-29 09:59:09 +01:00
Jonas Karlsson
162a859045 Add getDataView() method to QTextureFileData
This method will return a QByteArrayView of the data range corresponding
to the level. This avoids a leaky abstraction by moving the needed data
pointer arithmetic from the caller to the method. It will also make it
easier adding cubemap support in the future.

Change-Id: I2415bd88365d8d69ba14aefc77f5f1117f9e0033
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-12-29 09:59:06 +01:00
Lars Schmertmann
89b2b60e63 Add version() to QOperatingSystemVersion
Change-Id: I6c7f0616d52b0d118ffd8c031f3f51212b8ed821
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-28 17:33:20 +00:00
Laszlo Agocs
d2b0856f59 eglfs: Enable building the fbdev-based Mali backend
The configure tests are all in place for CMake as well, and this one
has no special library depdendencies. Generate the CMakeLists and
remove the special case.

Change-Id: I55817045f9e259515fb3aad33d1446d9413111d9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-12-28 16:46:23 +01:00
Ahmad Samir
824c726340 QRegularExpression: mention raw string literal in the docs
Raw string literals (since C++11 according to [1]), make writing/reading
regex patterns easier, since one can just use e.g. "\w\d" without having
to escape those backslashes e.g. "\\w\\d"; this is especially useful with
longer/more complex regex patterns.

[1] https://en.cppreference.com/w/cpp/language/string_literal

Pick-to: 5.15 6.0
Change-Id: I119f9566d27222b915af931ee7e13e064baede61
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-12-28 14:35:39 +00:00
Paul Olav Tvete
24cf218b39 Handle XCB_INPUT_DEVICE_TYPE_MASTER_POINTER properly
Make sure we use the new QXcbScrollingDevice class for the "core
pointer" as well.

Change-Id: I97575e8125cbb2aa280662aa675e61021c21ea59
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-25 09:07:18 +01:00
Lu Zhen
9a237257c4 Adjust the format of code blocks in handleScreenChange function
Change-Id: I5da777e2196c005d6d5402c254a9452c3a888036
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-12-25 10:40:29 +08:00
Andreas Buhr
741862875c Add test creating QDateTime in double-DST gap in 1947 Germany
In 1947, Germany had not only a summer time but also a
"Hochsommerzeit", a high summer time. This patch adds a test
creating a QDateTime in the time gap at the beginning of this
Hochsommerzeit on May 11, 1947.

Pick-to: 6.0
Change-Id: Ib81a23914965f092c3e3195e4c7258e5a4e0b30e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-24 19:41:48 +01:00
Christian Ehrlicher
41e665a452 QStylesheetStyle: fix push button label alignment
Due to a copy'n'paste error in 01ec11507d
the valign was not properly determined for text-align bottom.

Fixes: QTBUG-89366
Change-Id: I081e1b24bba0edd9dd3754599a111c1658b18746
Pick-to: 6.0
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-12-24 12:48:28 +01:00
Liang Qi
489ce6f91b tests: unblacklist tst_QWindow::modalWithChildWindow() on openSUSE
This reverts 3d53cf976d.

Task-number: QTBUG-66851
Change-Id: Ib2b76c539c57fe70ee60426635e6ba59291a1f90
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-12-23 19:41:42 +00:00
Liang Qi
ab8b061620 tests: unblacklist tst_qwidget::saveRestoreGeometry on xcb
This reverts b4977a332b.

Task-number: QTBUG-69666
Change-Id: I07b57d248f3a09969e9f0d89404a3366b882e097
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-12-23 19:41:39 +00:00
Sona Kurazyan
f1f4fd16fd Document that QtConcurrent::run doesn't support overloaded functions
After improving QtConcurrent::run() to use parameter packs for the
arguments (see c977e74afd), calling
overloaded functions is ambiguous. Updated the porting guide and the
documentation to mention this and describe possible workarounds.

Task-number: QTBUG-89648
Pick-to: 6.0
Change-Id: I4c1f996ae67bce8c13cc1f99f54240295db6ae1d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-12-23 18:34:21 +01:00
Christian Ehrlicher
f3747c21d3 QStyleOption: avoid code duplication
Use delegate constructors to avoid code duplication

Change-Id: I5c7d3764966ec07d1e3d175ccb075c64408d2338
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-12-23 17:08:05 +01:00
Paul Olav Tvete
c80d6473fb Fix out-of-bounds write
Change ac210c73e4 introduced the requirement that all input devices with
Scroll capability must have a QXcbScrollingDevicePrivate as their d_ptr.
However, this was not enforced, and would fail for the "Virtual core
pointer".

To fix this, always use qobject_cast to verify that the device is of the
correct type.

Change-Id: I4a6b1d4d79308eb04e9f52dda00294fffe377bdf
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-23 15:25:02 +01:00
Sona Kurazyan
3729d37dd9 Fix the CMake feature for docker-testserver to use correct mkspecs path
Use the QT_MKSPECS_DIR instead of QT_SOURCE_TREE to find out the
location for the testserver feature's data. QT_SOURCE_TREE points to
qtbase source location, which may not be always available. This allows
to use this feature by projects outside of qtbase.

Task-number: QTBUG-85034
Change-Id: If7fa6ef95777be9acf35d36f8d99776bf9568a79
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-12-23 10:56:16 +01:00