Commit Graph

50696 Commits

Author SHA1 Message Date
Eskil Abrahamsen Blomfeldt
be14adfdc8 Fix QVulkanWindow on Wayland
The Wayland backend needs 4 buffers and is failing when
making QVulkanWindow since there was a hardcoded limit at
3.

The Vulkan-backend to RHI already has smarter handling of
this. We want to limit the changes we do to the "legacy"
QVulkanWindow, so we keep the hardcoded max value but
increase it to 4 to accommodate the requirements on
Wayland.

Task-number: QTBUG-91418
Change-Id: I830bc30d1c2eeac1b076c50d35d5d138fd46dace
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2021-03-12 12:36:48 +01:00
Morten Johan Sørvig
fd27fcf185 Remove “scaling” logging from QBackingStore
Prepare for renaming the logging category.

Change-Id: I1fefefa510032ca70754fde9d80f9ac35ffa977b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-03-12 11:58:58 +01:00
Elvis Lee
a77ca7c9c4 Support additional gbm surface flags
Some vendor requires more gbm surface flags for specific purpose,
such as protected content.

Change-Id: Ie7db337e05f941b5480ffaccf61fbc94eb989ffc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-03-12 10:10:41 +00:00
Eirik Aavitsland
f651e6a26c Avoid undefined color values in corrupt xpm image
Issue reported by Codechecker.

Pick-to: 6.1 6.0 5.15 5.12
Change-Id: I1a5aa2203fb31e0ce3b630a11e450925aee81fb0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-03-12 10:01:27 +01:00
Andrei Golubev
f226854d25 Fix QMultiHash::count(key) crash
As QMultiHash uses a pointer for the data, nullptr dereference is a
thing, so check for valid d before doing anything in count()

Fixes: QTBUG-91704
Pick-to: 6.0 6.1
Change-Id: Ia20440cd7bdc03cb09c77f796fb9c5b52765eac5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-12 08:38:42 +01:00
Tang Haixiang
ae88dea1be Merge "Add setting the ICON size attribute in lineedit to the style plugin" 2021-03-12 02:49:27 +00:00
Aleix Pol
0a77920e56 Merge "Remove unnecessary class member" 2021-03-12 01:20:47 +00:00
Tang Haixiang
24226bb5f5 Add setting the ICON size attribute in lineedit to the style plugin
When the font is large enough, using PM_SmallIconSize will get a large
lineedit,but the icon is very small. This is very unsightly, and the
style plug-in hopes to be able to define the size of the icon by itself.

Change-Id: I0e35b331301472541d3378e748dbcd074d5419a2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-03-12 08:39:04 +08:00
Aleix Pol
23db5ed0b3 Remove unnecessary class member
It's never used or accessed. It's not part of exported API.

Change-Id: Ie60a560fb6f1315a53442f3c067363e651b80768
Reviewed-by: David Edmundson <davidedmundson@kde.org>
2021-03-12 00:12:01 +01:00
Volker Hilsheimer
674747bac1 Revert "QPushButton: fix support of style sheet rule for text alignment"
This reverts commit 6269438af9, and adds a test.

This change introduced QTBUG-91735, without fixing QTBUG-86857 correctly. The
code already interprets the textAlignment values from the rule, also if no
icon is set. Adding the same, or some default textAlignment to the text flags
if there is no icon doesn't work.

Fixes: QTBUG-91735
Task-number: QTBUG-86857
Pick-to: 6.1 6.0 5.15
Change-Id: Iee07e63a40e72909275f32e1caa28b33a595f879
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-03-11 22:30:22 +01:00
Tang Peng
dbdde8d023 Merge "Remove unreachable code" 2021-03-11 21:10:33 +00:00
Thiago Macieira
2851edc027 Merge "Futex/Windows: add support for notifying TSan" 2021-03-11 20:34:00 +00:00
Joerg Bornemann
c5344e42df Merge "Remove superfluous variable assignments from configure.bat" 2021-03-11 19:03:13 +00:00
Fabian Kosmale
fb7bad01fe Merge "QObject: remove QAbstractDeclarativeData::parentChanged" 2021-03-11 18:03:39 +00:00
Alexey Edelev
7592a646d8 Merge "Move the common qmake sources into a object library" 2021-03-11 18:00:32 +00:00
Alex Trotsenko
4b92dc14d9 Merge "QProcess/Win: implement async closing of write channel" 2021-03-11 16:57:18 +00:00
Thiago Macieira
d424ccdb77 Futex/Windows: add support for notifying TSan
The code was already there, just only implemented for Linux.

Change-Id: Ib709fc1585f647a98d54fffd16663881b6d24d6f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-03-11 17:42:35 +01:00
Tang Peng
b5615d3921 Remove unreachable code
Having a `break` after a `return` is pointless as it's never reached.

Change-Id: I30877e926c006fac45681f547e97a55410f02e43
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-03-11 16:11:00 +00:00
Joerg Bornemann
39157bcb0a Merge "Fix CMAKE_INSTALL_PREFIX when building against installer-provided Qt" 2021-03-11 15:59:46 +00:00
Joerg Bornemann
24f790490f Remove superfluous variable assignments from configure.bat
Change-Id: I18d17a4ec8f5a33cb13282b584ecd75dd861d040
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 16:39:54 +01:00
Joerg Bornemann
081b5398f8 Remove the -qmake and -cmake configure arguments
Qt is built with CMake since 6.0 and the QMake build system was removed
in 6.1. It's time to remove the -cmake and -qmake configure arguments
for Qt 6.2.

Fixes: QTBUG-88286
Change-Id: Ie726ec364ded025f8d93bd69b469561a6ae40aa9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 16:39:50 +01:00
Alexey Edelev
fd3c417af9 Move the common qmake sources into a object library
Some qmake sources could be reused by other tools. It makes sense to
move such sources to the object library, to avoid additional compilation
steps and to simplify the reuse of sources.

Change-Id: I9d7bb7624019149d34d29e4b269b4f26b8aec7a4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 15:46:34 +01:00
Joerg Bornemann
3d71f1733d Merge "Fix build of QTuioTouchPlugin with Makefile generator on macOS" 2021-03-11 14:20:49 +00:00
Alex Trotsenko
6bd6151329 QProcess/Win: implement async closing of write channel
Instead of blocking in QProcessPrivate::closeWriteChannel(), we can
handle a pending close in _q_canWrite() slot when there is no more
data to write.

Change-Id: I2a30789b6099a2ec075292348ebe33a11341bca3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-03-11 16:05:40 +02:00
Paul Wicking
5fa8f5df7b Doc: Change section titles that cause bad links
Section titles are valid targets for QDoc's autolinker. When
they are identical to other valid link targets, such as for
example a class, these sections may cause invalid links.

Pick-to: 6.0 6.1
Fixes: QTBUG-91141
Change-Id: Ie9a6258d2bf83932335976d8c0b5fc59f2028ae5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-03-11 15:01:35 +01:00
Paul Wicking
b42df9756a Doc: Add hyperlink to relevant section
Pick-to: 6.0 6.1
Fixes: QTBUG-91734
Change-Id: I3910c7fcf1625ad08a65e691a8eaf9ed6b61779a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-03-11 15:01:33 +01:00
Fabian Kosmale
e8b7e4e96a QObject: remove QAbstractDeclarativeData::parentChanged
The code in qtdeclarative did not do anything at all anymore.

Change-Id: Idd97145cb74aeb4f43dfce2f282a765e90945073
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-03-11 14:53:26 +01:00
Mårten Nordheim
d76c0e3224 Merge "QEventDispatcher(Win): Always honor interrupted status to avoid races" 2021-03-11 13:31:17 +00:00
Eskil Abrahamsen Blomfeldt
3102d611bd Merge "Support family names that end/start with space" 2021-03-11 13:09:00 +00:00
Joerg Bornemann
e6527e2f73 Fix CMAKE_INSTALL_PREFIX when building against installer-provided Qt
When building a module against an installer-provided Qt,
CMAKE_INSTALL_PREFIX would default to /home/qt/work/install, which is
the install prefix of our packaging machines.

Do not hard-code the install prefix in QtBuildInternalsExtra.cmake but
use the one that is calculated from the location of
QtBuildInternalsExtra.cmake.

Pick-to: 6.1
Fixes: QTBUG-90449
Fixes: QTBUG-91475
Change-Id: I39f214efb18796a89f00a171ef190c547bba5c0a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 13:26:42 +01:00
Laszlo Agocs
aa9b4bd01e Merge "rhi: metal: Stop using BufferOp for no good reason" 2021-03-11 11:33:53 +00:00
Joerg Bornemann
82d50925f1 Fix build of QTuioTouchPlugin with Makefile generator on macOS
For each plugin, we create a custom target with it's OUTPUT_NAME such
that one simply can do 'ninja qtuiotouchplugin' to build it.

QTuiTouchPlugin has qtuiotouchplugin as OUTPUT_NAME, which is
problematic with Makefile generators on case-insensitive file systems.
See CMake upstream issue #21915 for details.

Work around this issue by not creating the custom target in this
situation.

Pick-to: 6.1
Fixes: QTBUG-84342
Change-Id: Id9a6cf0a01c179d5c93da4146e393cf00153ac4f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 11:29:25 +00:00
Joerg Bornemann
e6aff6c7ad Merge "Remove now unneeded QT_BOOTSTRAPPED check from qlibraryinfo.cpp" 2021-03-11 11:28:29 +00:00
Assam Boudjelthia
262fc26a37 Merge "Android: use libexec path for rcc for Android deployment settings file" 2021-03-11 11:13:08 +00:00
Mårten Nordheim
f274f91ceb QEventDispatcher(Win): Always honor interrupted status to avoid races
There may be a race where e.g. thread 'B' is woken up by a queued invoke.
At the same time thread 'A' asks 'B' to quit, which will set various
atomics (some important ones are 'interrupt' in the dispatcher and
'exit' in the event loop), but it does _not_ try to send another wake
since there is already an unhandled wake triggered by 'B' itself.
Sadly 'B' reads the 'exit' atomic before 'A' updates it.
Then, slightly before, 'B' sets 'interrupt' back to 0, 'A' write 1 to
it, meaning 'A's interrupt is ignored. Then, since there is no
interrupt, 'B' goes back to waiting for events, leaving the thread alive
and running instead of quitting.

Maybe this has unforeseen consequences (one consequence is that it will
return and re-enter the event dispatcher once more, possible
unnecessarily)

Fixes: QTBUG-91539
Pick-to: 6.1 6.0 5.15
Change-Id: Ie6f861f42ffddf4817d5c8af2d764abe9d9103c2
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-11 12:11:18 +01:00
Zhang Yong
02bc441553 The conditional statement is missing parentheses
Add a ')' to the judgment statement.

Change-Id: Iadfdfb7643bc5224cb3029a2abb42c3c14982eef
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-03-11 19:10:07 +08:00
Eskil Abrahamsen Blomfeldt
d16b171f1b Make tst_shortcut pass on Wayland
There was a race condition in the test, since the window
might be exposed before the event to activate the
application has been received. And the short cut is not
triggered before the application is active, which
means it could just be discarded and the window would
never be closed.

This happened consistently when testing on Wayland.

Task-number: QTBUG-91418
Change-Id: I40cb143985175f5f2b5405e9502a48475c93074a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2021-03-11 11:59:14 +01:00
Eskil Abrahamsen Blomfeldt
ea310c1d0f Fix tst_QDialog::keepPositionOnClose on Wayland
The test assumed that dialog.move() would actually move
the dialog box to the requested location, which is an invalid
assumption on Wayland.

Since the objective of the test is not to check if move() works
this way, but to check whether the dialog box shows up in the
same location when it is re-shown, we actually fetch the pos
after showing it the first time, rather than assume this is the
same as the requested one.

Task-number: QTBUG-91418
Change-Id: Ifa21fa08429f198988f90d7ee328e4f35a4764c2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2021-03-11 11:59:02 +01:00
Eskil Abrahamsen Blomfeldt
30245c8515 Skip tst_QOpenGL::glxContext test on Wayland
This test depends on XCB, but is only protected by a build-time
flag, so it will be executed as long as XCB is available at
build-time. Do as with the offscreen backend and just skip it
when a different platform plugin is in use.

Task-number: QTBUG-91418
Change-Id: Ida076dc81d0740af2cec164bd40ca10d16345f05
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2021-03-11 11:58:42 +01:00
Eskil Abrahamsen Blomfeldt
7fd9ed3201 Support family names that end/start with space
If the family name starts or ends with a space in the actual font
data, then this would not be selectable by Qt. This is because we trim
the family name before matching it against the contents of the database.

Testing on Windows GDI, it actually does trim the spaces on the
family names (matching a request for "Chibola" with a font called
"Chibola " for instance), but since we read the font data ourselves,
we are not doing this.

To ensure we never have font names that cannot be matched in the
database, we make sure we trim the family names before registering
them.

[ChangeLog][QtGui][Text] Fixed matching against fonts which has a
family name that ends or starts with a space.

Task-number: QTBUG-79140
Pick-to: 6.1
Pick-to: 6.0
Pick-to: 5.15
Change-Id: I9cdb50b78a7da2d2697f992ce462033eb1d7ada7
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2021-03-11 11:55:46 +01:00
Eskil Abrahamsen Blomfeldt
3416e5423e Merge "Fix tst_qgraphicseffect on Wayland" 2021-03-11 10:52:55 +00:00
Andreas Buhr
1f36e5ebd1 Merge "Fix warnings about marking functions override" 2021-03-11 10:19:13 +00:00
Laszlo Agocs
adf6ba7eae rhi: metal: Stop using BufferOp for no good reason
Do what the Vulkan backend does, and just take the offset
and the QRhiBufferData. There is no reason to store a full
QRhiResourceUpdateBatchPrivate::BufferOp struct within the
backend.

Change-Id: I67528029de40320b3e4f031346d40dfc0bb9ab52
Pick-to: 6.1 6.0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-03-11 10:17:13 +01:00
Laszlo Agocs
0c6375a346 rhi: metal: Skip unnecessary writes when updating the entire buffer
Follow the similar Vulkan change in 20eb40bce9
and drop the queued up buffer data for a given slot when the current update
covers the entire buffer. This is relevant in particular for Qt Quick 3D
where such dynamic buffer changes are common.

Change-Id: If1e70d78968586b552a5357bc97af10cc61d9611
Pick-to: 6.1 6.0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2021-03-11 10:17:00 +01:00
Joerg Bornemann
a21fe37c72 Remove now unneeded QT_BOOTSTRAPPED check from qlibraryinfo.cpp
Since qmake links against QtCore, we don't need to check for the
bootstrapping case in qlibraryinfo.cpp anymore.

Change-Id: I644b1e71db727773b3e32ac650481df134acf033
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-03-11 10:00:24 +01:00
Joerg Bornemann
e158d699e0 Remove all qmake-related data from q[make]config.cpp
Now that we're not actually using qmakeconfig.cpp anymore, we can remove
it together with all qmake-related information that was written into
qconfig.cpp.

This also moves the qtConfEntries array back to qlibraryinfo.cpp.

Change-Id: I5e57d8c55613332cc3e57b11df4398d46aed259b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 10:00:18 +01:00
Joerg Bornemann
9f5a7cb5fa qmake: Do not read from qmakeconfig.cpp
Change-Id: I6a46c2e817f8dc3f580774aba2db8bfb01f5a403
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 10:00:11 +01:00
Joerg Bornemann
a08b1f6359 Read QLibraryInfo paths directly from QLibraryInfo and not from qmakeconfig.cpp
Change-Id: I1db1c871ec6b4e572bd36df6aff7a5be8a4a706c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 10:00:01 +01:00
Joerg Bornemann
3c12ab974f Pass target and host mkspec as defines to QMakeLibraryInfo
Change-Id: If07055286496c507310c0dbb3a06f1a42d643596
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 09:59:56 +01:00
Joerg Bornemann
c651e7ba18 Do not write Sysroot and SysrootifyPrefix into qmakeconfig.cpp
Those have fixed values.

Change-Id: I7f1ba8036f43413d3c805f4b419ae79e037343fb
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 09:59:51 +01:00