Commit Graph

49843 Commits

Author SHA1 Message Date
Alexey Edelev
0f38f69d44 Fix qch install path
Exclude qch_file_name from install DESTINATION

Fixes: QTBUG-89769
Pick-to: 6.0
Change-Id: I8dba13a0a2c2c92d6b2d6aa438c295b42a04156b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-07 14:13:41 +00:00
Allan Sandfeld Jensen
4c6c094895 Windows QPA: Lookup DISPLAYCONFIG data for monitors
Gives more accurate orientation and refresh-rate.

Change-Id: I90b0b7563efc35c9bace07ccb3996350a957e8e5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2021-01-07 12:00:47 +01:00
Samuli Piippo
ac970d48fd tst_qdatetime: blacklist zone-change test for QEMU ARMv7
systemTimeZoneChange() fails also on 32bit QEMU ARMv7.

Task-number: QTBUG-87663
Change-Id: I5c006a8637edff0a95b1f9b76d2c58006aeae6d6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-07 06:35:31 +00:00
Samuli Piippo
5a0f9004e2 tst_qarraydata: blacklist dataPointerAllocate on all 32bit systems
The test case fails also on QEMU ARMv7.

Task-number: QTBUG-88705
Change-Id: Ibe8c777f0205b298f6b9a27c067dd552253fcf33
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-01-07 08:35:21 +02:00
Samuli Piippo
513be303b7 tst_toolsupport: fix expected alignment on ARMv7
The alignment has been recently updated but never correctly tested,
as test has either been disabled or marked as insignificant.

Change-Id: If6e529c290b2057f58c3b27c89279d9e90728ad4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-01-07 08:35:10 +02:00
Camille Viot
8fa91c75ad Clean up code that handle clipboard image conversion on Windows
This commit remove old legacy code that try to deal with clipboard
image conversion in the qwindowsmime class. It now uses
qbmphandler under the hood which is much more complete.
It also add a small fix for the conversion
of BI_RGB clipboard image with an explicit alpha layer (which Firefox
use on Windows).

Change-Id: Iae026378831799dc676e1aba7d5bd6a0d1c01e7f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-01-06 21:53:44 +01:00
Tor Arne Vestbø
e7370d0583 Skip already closing widgets when checking whether application can quit
QApplication tries to close all windows on quit using closeAllWindows,
but closeAllWindows skips windows that are already closing. This can
happen when calling quit() from a close event for example.

QApplication then tries to verify that all windows have been closed,
and that logic should skip the same kind of windows as closeAllWindows
does.

The fact that these two logics diverge was identified earlier in
5af73cd9db, but aligning them required further work. As that
commit notes, the right fix to align them is building on top of
tryCloseAllWidgetWindows(), which already returns true/false based on
whether it could close all windows or not. But, unlike the existing
logic in QApplication::event(), it doesn't skip Popups or Dialogs,
so that discrepancy needs further research.

Pick-to: 6.0
Fixes: QTBUG-89580
Change-Id: I87bff56f2eb8a539f1c859c957f5f239dc1eb93d
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-06 16:59:11 +00:00
Ulf Hermann
c9a1102269 Make QString and QByteArray sequentially iterable
As lists of QStrings and QByteArrays are sequentially iterable the base
types should really also be.

The only problem is that they don't have methods to remove items from
the back or the front, but that is well within what we can support with
QSequentialIterable.

Change-Id: I2ab551e7b11a092aba363fb4012d131bbc4b11b4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-06 17:15:03 +01:00
Kai Köhne
05146a77fc Doc: Improve QMap, QMultiMap description
Make it clear that the fast lookup is by key, not by value.
See also discussion in

https://forum.qt.io/topic/121907/misleading-documentation-of-qhash-qmap/

Pick-to: 5.15 6.0
Change-Id: I396297e0e4674e0a1f889f4138ab52ff224c0ee2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-01-06 17:00:42 +01:00
Laszlo Agocs
3ce5128d80 Fix missing repaints with QOpenGLWidget in a QDockWidget
When AA_ShareOpenGLContexts is not set, docking or undocking
will lead to changing the associated top-level window. This
leads to changing the OpenGL context, and tearing down and
then recreating all OpenGL resources (assuming a well written
application). The problem is, there are no paint events after
the Show, meaning the user code's paintGL is often not invoked,
which leads to showing an empty QOpenGLWidget until something
else triggers a paint event. To remedy this, send a paint event
upon Show, which should be harmless enough, while fixing the
case of docking/undocking.

Pick-to: 6.0 5.15
Fixes: QTBUG-89812
Change-Id: I3c4560f8f069d86645a6314bf7ad1b4ee8e2c716
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-06 16:18:25 +01:00
Laszlo Agocs
f0d1a50333 rhi: vk: Prevent WAW hazard reported from sync validation with offscreen rt
...when a QVkRenderBuffer is used as depth-stencil (i.e. a "throwaway"
depth-stencil buffer that is a lazily allocated / transient VkImage
under the hood). Such a resource is not tracked by the
QRhiPassResourceTracker, so do an explicit barrier in beginPass
instead of having it generated by the tracker.

Fixes: QTBUG-89764
Change-Id: Ice794f44342175f712ea56f450270cbb8929f516
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-06 16:18:20 +01:00
Laszlo Agocs
5f8efb2597 rhi: gl: Reset tracked state upon a buffer update or readback
...encountered in the command list.

Move all, previously local, tracking variables into a struct. This
allows creating helper functions to reduce error-prone repetition in the
executeCommandBuffer() function body.

The only real change in the patch is in the handling of
Command::BufferSubData and Command::GetBufferSubData: here, instead of
calling glBindBuffer directly, use a helper function that also resets
the relevant state tracking variables. A subsequent
Command::BindVertexBuffer or BindIndexBuffer will therefore correctly
rebind the appropriate buffers.

This is particularly relevant with certain command stream patterns
exercised by some Qt Quick 3D scenes:

- A View3D renders a mesh,
- another View3D has some 2D Qt Quick content, as well as a model with
  the same mesh.

When both View3Ds use the default Offscreen render mode, the resulting
command list consists of segments along the lines of:

1. prepare resources for first View3D

2. render content for first View3D - this binds the vertex and index
   buffers for the mesh (state is tracked; all 1-4 steps are within
   the same command list, processed by a single call to
   executeCommandBuffer())

3. prepare the content for the "inline" 2D Qt Quick scene - this may
   update vertex and index buffers, that may lead to adding
   BufferSubData commands to the list (tracked state (last
   vertex/index buffer) may need invalidation/updating - and that's
   where our problem lies)

4. the second View3Ds 3D content is rendered: a model with the same
   mesh as the last (Quick)3D draw call, so same vertex and index
   buffers. If #3 did not invalidate and/or update the tracked state,
   the glBindBuffer calls are (incorrectly) skipped.

Fixes: QTBUG-89780
Pick-to: 6.0
Change-Id: Icc933252f3993b8727d192e7ba4aa0f842bab51e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-01-06 16:18:15 +01:00
Andreas Buhr
6a664d0660 Fix segmentation fault in QObject::dumpObjectInfo
There was a check "if (cd && cd->signalVectorCount())" in the code
which was faulty because "signalVectorCount()" could return -1 to
indicate that no signalVector is available. This patch fixes
the problem.

Fixes: QTBUG-89846
Pick-to: 5.15
Change-Id: I12c512ff8d889ba2bd298789ab6081930f739089
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-01-06 16:17:47 +01:00
Alexey Edelev
5f867f4b1f Add 'oci' to possible Oracle Client library names
In latest Oracle Instant Client releases for windows the OCI library
name is 'oci.dll'. Add it as option to find_library call.

Change-Id: I6e6f4a998207d16583a380c1bd95db857051606b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-06 16:17:47 +01:00
Kai Köhne
05ec5a47ab QLocale: Remove dead code
The code using it got removed in qttools commit 01da5d9a

Change-Id: I14d36ac939f2647139fcc42591a044a03e707553
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-06 16:17:47 +01:00
Volker Hilsheimer
7114b6d23c Prefix binary produced by QAbstractItemModelTester testcase with tst_
This is standard for all test cases. It matters, because cmake targets
are generated, and e.g.

$ ninja tst_qabstractitemmodeltester

should do what the user expects.

Change-Id: Iac8160c53d5005382e61c03b7daceaba0a4c2596
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
2021-01-06 11:16:13 +00:00
Joerg Bornemann
36b1e03ecd Remove superfluous OpenGL_GL_PREFERENCE assignment
We did set this variable, however after src/gui/configure.cmake
was loaded (it is early-loaded in src/CMakeLists.txt), meaning the
assignment had no effect.

Also, what this assignment tried to achieve is covered by our global
CMake policies now.

Pick-to: 6.0
Task-number: QTBUG-89754
Change-Id: Ie7aeee1505d112d799455b2915acbfa7e9a12a64
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-01-06 09:30:31 +01:00
Paul Wicking
32a46a1dcf Doc: Use correct include for QtFuture namespace
Pick-to: 6.0
Fixes: QTBUG-89766
Change-Id: I20c5d3c12490a5eed7bb4e267b2edb5d45dbaadf
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2021-01-06 08:02:06 +01:00
Craig Scott
ae91e3365b android: Generate deployment settings file with correct qml-import-paths
The qt6_android_generate_deployment_settings() command had been
creating deployment settings files with the wrong key name for qml
import paths. This resulted in the QT_QML_IMPORT_PATH target property
having no effect.

The QT_QML_IMPORT_PATH property can also potentially hold a list, not
just a single value. This change now handles the list case as well,
previously qt6_android_generate_deployment_settings() was assuming it
always held a single path if it was set.

Fixes: QTBUG-89628
Pick-to: 6.0
Change-Id: Ibdd74ec8d130f160433a60a14a0a9f496f496a1b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-06 13:11:57 +11:00
Zhang Yu
22416ecaaf Fix QMultiHash::equal_range crashes
QMultiHash::equal_range crashes when called in a const member function.
The Data `d` is a NULL pointer when calling equal_range()
before inserting data into an empty QMultiHash.
Then calling`d->find` crashes.

Fixes: QTBUG-89687
Pick-to: 6.0
Change-Id: I10c3d196cbc72aed8c8c922ef16534bba51037b7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-06 09:07:10 +08:00
Alex Trotsenko
13f9e2857b Remove superfluous call in QProcessPrivate::_q_startupNotification
There is no need to disable startupSocketNotifier because the call to
QProcessPrivate::processStarted() will do that.

Change-Id: I20b816533d9a5c4b9bf57135d26166c961a07d07
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-01-05 21:15:37 +02:00
Andy Shaw
9d36ee1904 TableView: Trigger the resizing of editors resizing a row/column
If there is an editor in the table then this needs to be updated as
the resize happens, otherwise it will not adapt to the new size
correctly and can appear drawn over other cells.

Fixes: QTBUG-85484
Pick-to: 5.15 6.0
Change-Id: I918c37f1ee1b0614c03c6b38f95f0f8b35a571f2
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2021-01-05 18:31:54 +00:00
David Faure
0cbbba2aa5 Update shared-mime-info to the 2.1 release, adjust implementation
The spec hasn't changed, but I made the same mistake in xdgmime
(the reference implementation) and in Qt: when multiple globs match,
and the result from magic sniffing is unrelated to any of those globs,
then I used the magic result, but that's wrong, globs have priority
and one of them should be picked up.

This is now fixed in xdgmime
(https://gitlab.freedesktop.org/xdg/xdgmime/-/merge_requests/3)
and in the expected results in shared-mime-info
(https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/99)
which this commit is also tested against.

This change also optimizes QMimeBinaryProvider::addFileNameMatches
to have the same logic as xdgmime for glob matching:
literals > extensions > other globs
As soon as one category matches, we can stop there.
This makes no difference in the overall results, in practice.

The user bug report (against the Qt implementation, actually)
is https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/138
as well as https://bugs.kde.org/show_bug.cgi?id=411718

Pick-to: 6.0 5.15
Change-Id: Ia0a34080427daff43c732609443ee6df8f41447c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-01-05 18:31:54 +00:00
Liang Qi
e688b99995 QInputControl: accept surrogate category character
See also https://unicodebook.readthedocs.io/unicode_encodings.html#utf-16-surrogate-pairs .

Fixes: QTBUG-89184
Pick-to: 6.0 5.15
Change-Id: I04eff7f42f0030346603a7b31e4ac854a477030c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-05 16:24:29 +01:00
David Skoland
34f0841451 Fix minor errors in tests
Fix indentation in tst_qlockfile and remove QtTest include in
tst_qcheckbox.

Change-Id: Idf630c6337859dbcc8f644010b941bfe55bb0633
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-05 12:43:09 +01:00
Edward Welbourne
6974737695 Change QLineF::setLength() to work whenever length() is non-zero
Previously it only worked when isNull() was false, which is true for
very short lines, even though length() may be non-zero.

[ChangeLog][QtCore][QLineF] QLineF::setLength() will now set the
length if the line's length() is non-zero. Previously, it was
documented to only set the length if isNull() was false; this is a
fuzzy check, so isNull() could be true for a line with non-zero
length().

Fixes: QTBUG-89569
Pick-to: 6.0 5.15
Change-Id: I803e622ad09c85815dde25df8dd3ba6dfcba0714
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-01-05 12:43:09 +01:00
Alexey Edelev
52e1603e33 CMake: Add proactive check of generator multi-config capabilities
Add explicit error, if multi-config build is requested, but selected
generator doesn't support it.

Fixes: QTBUG-88287
Pick-to: 6.0
Change-Id: I6dba589bb59ad69fa07221c657df272ec75c359b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-05 09:03:24 +01:00
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