Commit Graph

51147 Commits

Author SHA1 Message Date
Qt CI Bot
b187ce87f9 Merge integration refs/builds/qtci/dev/1617813097 2021-04-07 21:01:58 +00:00
Qt CI Bot
8d16237cfa Merge integration refs/builds/qtci/dev/1617809473 2021-04-07 20:33:35 +00:00
Robert Löhning
7473317b52 QTextHtmlParserNode: Limit colspan to avoid segfault
This fixes oss-fuzz issue 29758.

[ChangeLog][QtGui][Text] QTextDocument::setHtml: column spans are
limited to 20480, an arbitrarily high but reasonable value.


Fixes: QTBUG-92463
Pick-to: 5.15 6.0 6.1
Change-Id: Ib759e3e3ac0b0d0d483f8e8ce11002e079db3ace
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-07 20:07:56 +00:00
Qt CI Bot
72ae064886 Merge integration refs/builds/qtci/dev/1617805866 2021-04-07 19:55:22 +00:00
Qt CI Bot
5712853061 Merge integration refs/builds/qtci/dev/1617802255 2021-04-07 18:57:36 +00:00
Qt CI Bot
fecba62d32 Merge integration refs/builds/qtci/dev/1617798649 2021-04-07 16:50:55 +00:00
Andrey Butirsky
62e697fd56 fix Alt+` shortcut on non-US layouts
Make it possible for non-letter-keys with Latin 1 symbols (`, !, @ etc.)
to participate in shortcuts also, when the keys generate national
symbols on non-Latin layout.
For example, in Russian layout, "`" key generates cyrillic "ё" letter of
national alphabet, so shortcuts with the key should still work
regardless of the actual layout.

Fixes: QTBUG-90611
Change-Id: Id9a505210ff33a94b82511b88c30ef79f3d03913
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-04-07 16:15:19 +00:00
Alexey Edelev
cbdce59cd2 Add the SIMULATE_IN_SOURCE argument to _qt_internal_test_expect_pass
test_QFINDTESTDATA builds the project in the source tree, this is
necessary because the test requires relative paths to the source file
names. This function could be useful for other tests, so it makes sense
to extend the _qt_internal_test_expect_pass/fail macros to support
build in the source tree.
Note that, the SIMULATE_IN_SOURCE argument doesn't build the test in
the existing source tree, but copies source files to the build tree
first to do not litter the source directory.

Change-Id: I16e790d74be2a0c5ca0593e0f88580dbe09882b9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-04-07 17:56:57 +02:00
Thiago Macieira
89a0ed1009 Allow qrandom_p.h to be included by more than one .cpp in QtCore
I thought we could use C++17 inline variables, but those can't be used
across DLL boundaries:

 qrandom_p.h:75:48: error: definition of 'QBasicAtomicInteger<unsigned int> qt_randomdevice_control' is marked 'dllimport'

Change-Id: Id2983978ad544ff79911fffd1671f857587ef2fb
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-04-07 08:36:03 -07:00
Nikolay Avtomonov
3f0858ed10 Explicitly set output files for qtpreprocess
This fixes build error with XCode 10.
XCode 10 build system (a.k.a "New Build System") requires all the files
that are generated by scripts and used later on build to be explicitly
defined as output files.

Task-number: QTBUG-71035
Pick-to: 6.0 6.1 5.15 5.12
Change-Id: Ibec39eee53b0cb3acecf592f1ca53c04b9975cad
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-04-07 17:14:37 +02:00
Alexey Edelev
72d1393c1d Fix condition that adds resources for each Android ABI
If we already have the list of Android ABI in BUILDS, it's not
necessary to generate extra resource while Qt build.

Amends: 58556afb69

Pick-to: 6.0
Pick-to: 6.1
Pick-to: 5.15
Fixes: QTBUG-88031
Change-Id: I344efe6c477461659a360281da59c4abeae18fc2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-04-07 17:00:17 +02:00
Qt CI Bot
30d5e13768 Merge integration refs/builds/qtci/dev/1617794981 2021-04-07 15:00:15 +00:00
Qt CI Bot
969cb830ca Merge integration refs/builds/qtci/dev/1617791373 2021-04-07 14:46:43 +00:00
Christoph Keller
9c24ad3b94 Only embed launch screen when building an app
Xcode's new build system checks duplicated entries when building. Qmake wants to embed
the launch screen for all types of configurations (static libraries etc.) which makes Xcode bail
out with "Multiple commands produce LaunchScreen.storyboard".

Pick-to: 6.0 6.1 5.15 5.12
Task-number: QTBUG-71035
Change-Id: I5c028e687f16e046b12156c1a8a89540deba4d3b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-04-07 13:32:17 +00:00
Sona Kurazyan
a4d1ed854d Do not notify about property changes if the value hasn't changed
After 2ffb91ac59 we manually call notify()
for QObjectCompatProperties. Currently we always call it when setting
values to compat properties, even if the value hasn't actually changed.
Fixed to call notify() only if the value is being changed.

Task-number: QTBUG-85520
Change-Id: I385db84c4009c45406e204b96e0e37ce5fa8882b
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-04-07 14:51:04 +02:00
Edward Welbourne
0c9fc20e7f Avoid attempting to parse insanely long texts as zone names
There are limits on zone name length and the trial-and-error approach
we're more or less forced to take to parsing gets horribly expensive
if applied to every prefix of a very long string. So apply a loosened
version of the zone-name validity rule that limits the length of the
fragments between slashes and limit the number of such fragments.

Fixes: QTBUG-92275
Pick-to: 6.1 6.0 5.15
Change-Id: I83052b1b6888728c81135db22a9c6298ae439375
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-07 14:51:04 +02:00
Qt CI Bot
89bdd09670 Merge integration refs/builds/qtci/dev/1617784151 2021-04-07 12:51:02 +00:00
Lars Knoll
df54a5d087 Add QRhiTexture::RG16 format
Those are needed to handle 16bit YUV formats in Qt Multimedia.

Change-Id: I39c67bf4fcf558487b7819ea38e578f99c12a3ed
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2021-04-07 14:29:23 +02:00
Ilya Fedin
0baa26638d indicator-application hack: fallback to dbus service check
There is a hack to work with Canonical's indicator-application tray
applet. Since it implements the SNI spec partially and doesn't work
with IconPixmap, the icon is broken without the hack.

Unfortunately, this tray implementation is still in active use by
Ubuntu; it's shipped and enabled by default on at least:
* Xubuntu
* Ubuntu MATE
* Ubuntu Budgie
(and maybe even others)

Unfortunately, the check doesn't work in confined environments
providing broken tray icons for snapped & flatpak'ed apps.
Fortunately, snap allows checking all registered services on the host.
It also fixes the check on flatpak if permissions to talk with these
names are given.

Pick-to: 6.1 6.0
Change-Id: Iee5d0bb610c3ff397babee89ef1ee788ac19f477
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-04-07 11:45:31 +00:00
Mårten Nordheim
587e3bb0ba QSemaphore: fix missed wakes with futex on Windows
We do this by making the 'futexNeedsWakeAllBit' to be part of both the
expectedValue and the pointer we're waiting on.
This makes sense since having the 'futexNeedsWakeAllBit' set is a
requirement for starting a sleep. Thus we should condition
sleeping on whether or not another thread unset it.

Since the futexNeedsWakeAllBit is in the "topmost" bit of the pointer we
wait on we'll need to use the full 64-bits on 64-bit platforms.

This isn't enabled (nor was it an issue) for configurations with
'futexHasWaiterCount' since that works differently, and waits for the
high 32 bits.

Fixes: QTBUG-92148
Change-Id: I424c605f0120ea5e647c5bb19b00ff35eaf1608a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-07 13:35:10 +02:00
ChunLin Wang
b8802071ed Fix get out of bounds index in QSortFilterProxyModel::filterAcceptsRow
Before calling the index function, we need to check the validity of the parameters.

Fixes: QTBUG-91878
Pick-to: 5.15 6.0 6.1
Change-Id: I9ec7265fff3f81b8a288c4ba8fae606a2ec808a6
Reviewed-by: David Faure <david.faure@kdab.com>
2021-04-07 19:30:08 +08:00
Kai Köhne
337bd058b9 Remove last trace of licheck
Since we don't feature it for CMake, there's little point in keeping it
for qmake.

Pick-to: 6.1
Change-Id: I7f17d2536510c0b94dca9767036ceab7ec08e1d8
Reviewed-by: Tino Pyssysalo <tino.pyssysalo@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-04-07 11:00:41 +00:00
Michal Klocek
4b4642143a "Export" linker features
We need to feed gn with linker info for qtwebengine build.

Change-Id: I4bd96af8bb8a1927e4c03e5c5d4ade10a0876eb1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-04-07 12:16:20 +02:00
Joerg Bornemann
20db8dbeeb androiddeployqt: Fix the fallback location of rcc
Now, that rcc lives in libexec, we need to assume the location of rcc to
be "bin" on Windows and "libexec" elsewhere.

Pick-to: 6.1
Fixes: QTBUG-92245
Change-Id: Idb81a5d02bae9ca3254e7590140a128500572b07
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-04-07 10:21:52 +02:00
Alexandru Croitor
d0c2425d79 CMake: Choose better defaults for qt_add_plugin STATIC/SHARED
There was a recent behavior change where the public CMake API
qt_add_plugin API took into account the value of BUILD_SHARED_LIBS
to decide whether the plugin should be a static or shared library.

Instead, use the following new behavior

 - If no explicit option STATIC / SHARED option is passed, default to
   whatever flavor Qt was built as.
   Aka if Qt was configured with -shared, qt_add_plugin defaults
   to creating shared plugins. If it's a -static Qt, create static
   plugins.
 - If an explicit STATIC / SHARED option is set, override the default
   computed value with the given value.

As a result BUILD_SHARED_LIBS does not affect Qt plugins anymore. This
is more in line with Qt expectations.

Add SHARED as a new valid option to pass to qt_add_plugin (it wasn't
before).

Add tests to check for the above behavior.

Amends aa4a1006cb

Pick-to: 6.1
Fixes: QTBUG-92361
Task-number: QTBUG-88763
Change-Id: Iae806024ddd5cf10cfe58ddbcebd2818084b0bd7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-04-07 10:10:55 +02:00
Alexey Edelev
ae70011377 Remove use of qt_internal_module_info from qt_internal_add_plugin
Plugin targets don't fit the requirements of the module but use
the function associated to the module. The purpose of using
qt_internal_module_info is to get the path to the top-level include
directory. So there is no point in breaking the encapsulation rules
to get a well-known directory.

Change-Id: If3d2a31d4ec186929e3d662a79a1ae9eac988d1a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-04-07 10:03:41 +02:00
Volker Hilsheimer
1e8b085f8c Fix return type of QMetaType::sizeOf in documentation
Pick-to: 6.1
Change-Id: I6f5a866fa83f0e2720d62c5170c9283997b31a7f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-04-07 09:57:44 +02:00
Volker Hilsheimer
e9ae8c2b0c Fusion style: don't use large icons in QLineEdit
Partly revert 24226bb5f5 by falling through
to the QCommonStyle implementation, which defaults to PM_SmallIconSize.

Fixes: QTBUG-92460
Change-Id: I82f99e98640a962577fd94556bef04f4da5789e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-04-07 09:57:30 +02:00
Robert Löhning
d15bfba176 Explicitly set enums' type to avoid undefined behavior
Fixes oss-fuzz issue 31022.

Fixes: QTBUG-92159
Pick-to: 6.1
Change-Id: I8f0dfbe0e198f9ac43754758d18db1f0842d6eae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-07 08:53:01 +01:00
Friedemann Kleint
c10159a9a1 standarddialogs example: Fix font handling
The example crashed since it passed the font label text (which
receives the font key) to the QFont constructor taking the family list.
Use QFont::fromString() instead.

Pick-to: 6.0 6.1
Change-Id: I499fc9200b4d817b10c946a7b79ede4e7f7e69af
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2021-04-07 08:27:21 +02:00
Qt CI Bot
d05118bf10 Merge integration refs/builds/qtci/dev/1617712854 2021-04-06 19:07:48 +00:00
Qt CI Bot
604087361c Merge integration refs/builds/qtci/dev/1617702467 2021-04-06 14:51:16 +00:00
Qt CI Bot
8398f9dada Merge integration refs/builds/qtci/dev/1617698863 2021-04-06 13:47:42 +00:00
Fabian Kosmale
4be2741aa2 Document meta-object revision 10
Amends cb43aaca11

Change-Id: I7bcf2b86aa29d00291f5d8ad44a89320b9eae2f5
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-04-06 14:17:24 +02:00
Volker Hilsheimer
95a31d0738 Assert that pointer is not nullptr before dereferencing
Fix static analyzer warning 0dc0b2a764417025a335a3a60b814335.

Change-Id: I9891194b74dda51032c887b9351fe7314174fcd6
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-04-06 14:00:55 +02:00
Eskil Abrahamsen Blomfeldt
70af64433f Update to Harfbuzz 2.8.0
This updates Harfbuzz to the latest version and also
adds an import script to help with this work in the
future.

Task-number: QTBUG-90217
Pick-to: 6.1
Change-Id: I23eae7b7bbbd5001df9873e4784a0c4213de5508
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-04-06 12:55:18 +01:00
Qt CI Bot
29450dfa28 Merge integration refs/builds/qtci/dev/1617691608 2021-04-06 11:49:28 +00:00
Fabian Kosmale
595b4e1a9b QList: Satisfy contiguous_range requirements
With C++20, there is a new iterator_category: contiguous_iterator, for
containers whose elements are stored contiguously in memory. In Qt 6,
QList satisfies this requirement.

However, we still need to tell the standard machinery about it. Step one
is to mark the iterators as contiguous_iterator; as that exists only in
C++20, we have to ifdef accordingly.
We also have to ensure that the iterators satisfy pointer_traits by
defining element_type due to how contiguous_range is specified. As this
runs afoul of LWG 3346, we check for known bad _GLIBCXX_RELEASE
versions.

Change-Id: I8c134544e694ba937e4d912393eb72fa75b49e3d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-04-06 11:35:35 +02:00
Doris Verria
0eb0fc8701 Fix incorrectly-drawn menu indicator for QPushButton on macOS
Because the QPushButton's bevel rect is smaller than its actual
widget's rect, custom styled menu indicators are drawn outside the
bevel frame on macOS. Fix this by drawing the menu indicator inside the
bevel's rect instead of the widget's rect.

Fixes: QTBUG-90250
Pick-to: 5.15 6.0 6.1
Change-Id: Ie63d68d8f564a4a640bdb8e7564f028784faab97
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-04-06 10:55:54 +02:00
Doris Verria
37f9f2e7af Fix label margins for pulldowns with custom styled menu indicator on macOS
Don't apply the QMacStyle's pulldownButton titlemargins to the
QPushButton's contents rect if the button has a custom styled menu
indicator. This causes the button's text/icon to be misaligned.

Fixes: QTBUG-86134
Pick-to: 5.15 6.0 6.1
Change-Id: I6ef95d51071c1d79f1cc07425a46958f50091b7e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-04-06 10:55:35 +02:00
Mårten Nordheim
9211d04730 QSemaphore: move suspect increment of waiter count
We might return false a few lines down, without decreasing the count.

Change-Id: I0a90c07f279860987e41539e9d5f3b5d2cb15207
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-06 09:55:14 +01:00
Alex Trotsenko
72d1a54763 QWindowsPipeReader: determine pipe state before signaling
The 'pipeBroken' flag must be updated before emitting the readyRead()
signal to avoid deadlock of waitForReadyRead() inside slot connected
to readyRead().

Change-Id: Ie393fdd594c6691da6609ea18307589b7157c624
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-04-06 11:27:41 +03:00
Alexandru Croitor
0e6c4224f0 CMake: Build minimal subset of tests in desktop static builds
Add new configure option -make minimal-static-tests and CMake option
QT_BUILD_MINIMAL_STATIC_TESTS. In conjunction with QT_BUILD_TESTS
it will enable building a minimal subset of tests when targeting
a static desktop Qt build.

In qtbase the minimal subset includes all the auto tests of testlib,
tools, corelib and cmake. In particular this will also do cmake build
tests and qmake build tests (tst_qmake)

Adjust CI instructions to enable building a minimal subset of static
tests when a platform configuration is tagged with the
MinimalStaticTests feature.

Fix and skip a few tests that were failing.

Pick-to: 6.1
Task-number: QTBUG-87580
Task-number: QTBUG-91869
Change-Id: I1fc311b8d5e743ccf05047fb9a7fdb813a645206
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-04-06 09:15:37 +01:00
Nico Vertriest
6cf92f1382 Doc: Fix link errors qtbase
Task-number: QTBUG-90662
Change-Id: I17147d149d9f222c142853805443aff94c5a5ff7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-04-06 07:34:21 +01:00
Heikki Halmet
c87847db87 BLACKLIST tst_qfont for Red Hat
Task-number: QTQAINFRA-4363
Task-number: QTBUG-84248
Pick-to: 6.1
Change-Id: I791aba3bf2b26f9c90201b1dcd67c2a85d28f08b
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2021-04-06 07:35:24 +03:00
Volker Hilsheimer
a395372ccf Document change to QAbstractItemView::viewOptions in porting guide
We couldn't deprecate and add the replacement in 5.15, so list it
explicitly here.

Amends c501e09efa.

Pick-to: 6.0 6.1
Change-Id: I174a7b6214cd8b9579b029ebf57e4d5b2e28e574
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2021-04-04 11:02:42 +02:00
Thiago Macieira
451fb66212 QThreadPool: let the started thread have the same name as the pool
If the pool has a name. This should make identifying threads belonging
to different pools easier in process-inspection tools.

Fixes: QTBUG-92004
Change-Id: Id2983978ad544ff79911fffd167225902efeb855
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-04-03 16:15:29 -07:00
Ivan Solovev
33786e7b02 Fix Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS when using the signal
This commit amends 4ceaf22bed.
Signal parameter was not actually used, even is the signal was
specified.
This patch fixes it and also introduces unit-tests for this issue.

Change-Id: I029d413644eb6a72af3bdce27cc5f5bcadfe946a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-04-03 17:21:30 +02:00
Samuel Gaist
bc00daae71 Add support to set thread priority to QThreadPool
Currently, QThreadPool's generated threads inherit the priority from the
thread they are created and that cannot be changed. This merge request
adds a property to QThreadPool so that the priority of the threads can
be different.

The default behavior does not change.

[ChangeLog][QtCore][QThreadPool] QThreadPool can now be configured to
use a different thread priority when creating new threads than the one
it inherits from the thread it was created in. This will only apply to
the threads started after the property is changed.

Fixes: QTBUG-3481
Change-Id: Ic98d4312d055a3357771abb656516ebd0715918d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-03 09:14:55 +02:00
Thiago Macieira
c2a09242c8 QGenericAtomicOps: allow pointer-sized non-atomic atomics
Change-Id: Id2983978ad544ff79911fffd1671f696b8a9ca35
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-04-02 11:12:17 -07:00