Commit Graph

50949 Commits

Author SHA1 Message Date
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
Sze Howe Koh
30ac9d5db4 Doc: Fix return type of QCursor::shape()
QCursor::shape() returned an int in Qt 3 but returned Qt::CursorShape
since Qt 4.

Change-Id: I6da9da9bed35c09943a074e7e3a618bce7797ceb
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-04-02 21:18:31 +08:00
Christian Ehrlicher
d1946a0ca2 QTable/ListView: mark functions as reimp instead internal
Some public accessible functions were wrongly marked as \internal
instead \reimp.

Change-Id: I6196427fc1b6535f6725107a00be82ab4cc821c3
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-04-02 14:18:07 +01:00
Alexandru Croitor
659817e287 CMake: Fix building multi-arch universal macOS Qt
Use the same approach we use for iOS, which is to set multiple
CMAKE_OSX_ARCHITECTURES values and let the clang front end
deal with lipo-ing the final libraries.

For now, Qt can be configured to build universal macOS libraries by
passing 2 architectures to CMake, either via:

  -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"

or

  -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"

Currently we recommend specifying the intel x86_64 arch as the first
one, to get an intel slice configuration that is comparable to a
non-universal intel build.
Specifying the arm64 slice first could pessimize optimizations and
reduce the feature set for the intel slice due to the limitation
that we run configure tests only once.

The first specified architecture is the one used to do all the
configure tests.

It 'mostly' defines the common feature set of both architecture
slices, with the excepion of some special handling for sse2 and
neon instructions.

In the future we might want to run at least the Qt architecture config
test for all specified architectures, so that we can extract all the
supported sub-arches and instruction sets in a reliable way.

For now, we use the same sse2 hack as for iOS simulator_and_device
builds, otherwise QtGui fails to link due to missing
qt_memfill32_sse2 and other symbols.

The hack is somewhat augmented to ensure that reconfiguration
still succeeds (same issue happened with iOS). Previously the sse2
feature condition was broken due to force setting the feature
to be ON. Now the condition also checks for a special
QT_FORCE_FEATURE_sse2 variable which we set internally.

Note that we shouldn't build for arm64e, because the binaries
get killed when running on AS with the following message:

  kernel: exec_mach_imgact: not running binary built against
  preview arm64e ABI.

Aslo, by default, we disable the arm64 slice for qt sql plugins,
mostly because the CI provisioned sql libraries that we depend on only
contain x86_64 slices, and trying to build the sql plugins for both
slices will fail with linker errors.
This behavior can be disabled for all targets marked by
qt_internal_force_macos_intel_arch, by setting the
QT_FORCE_MACOS_ALL_ARCHES CMake option to ON.
To disble it per-target one can set
QT_FORCE_MACOS_ALL_ARCHES_${target} to ON.

Task-number: QTBUG-85447
Change-Id: Iccb5dfcc1a21a8a8292bd3817df0ea46c3445f75
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-04-01 18:14:59 +02:00
Alexandru Croitor
6fd8748f88 CMake: Teach qt_internal_add_simd to exclude given osx architectures
qt_internal_add_simd can now take an EXCLUDE_OSX_ARCHITECTURES list of
values which specifies for which architectures the simd compile flags
should not be added.
This is relevant for macOS universal builds.

Example

CMAKE_OSX_ARCHITECTURES is "x86_64;arm64"
EXCLUDE_OSX_ARCHITECTURES is "arm64"
SIMD is avx2
the final compiler flags that will be added are "-Xarch_x86_64 -mavx2"

Slightly, clean up the function implementation and document its
arguments.

NAME handling has been removed because it's dead code that hasn't been
removed as part of 1b7008a3d7.

Task-number: QTBUG-85447
Change-Id: I395c19bdd67219bebb6b5b8d9f418b6e6488e09b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-04-01 18:14:56 +02:00
Shantanu Tushar
0592123a0c Add std::chrono overloads for QLockFile functions
This makes it convenient to use QLockFile for projects which are able to
use std::chrono to denote durations.

Change-Id: Ib4520f6142412bdefe659fccc1e6d15b81af2f25
Reviewed-by: David Faure <david.faure@kdab.com>
2021-04-01 15:38:08 +02:00
Qt CI Bot
b3281eb6f4 Merge integration refs/builds/qtci/dev/1617269094 2021-04-01 11:38:27 +00:00
Qt CI Bot
bf6f0c6cac Merge integration refs/builds/qtci/dev/1617264361 2021-04-01 10:32:08 +00:00
Lorn Potter
4972fdb350 wasm: add cmake build support
A few configure defines get changed:
QMAKE_WASM_PTHREAD_POOL_SIZE is now QT_WASM_PTHREAD_POOL_SIZE
QMAKE_WASM_TOTAL_MEMORY is now QT_WASM_INITIAL_MEMORY
QMAKE_WASM_SOURCE_MAP_BASE is now QT_WASM_SOURCE_MAP_BASE

device-option EMSCRIPTEN_ASYNCIFY=1 is QT_EMSCRIPTEN_ASYNCIFY=1

To create source maps for debugging. use
device-option QT_WASM_SOURCE_MAP=1

Task-number: QTBUG-78647
Change-Id: If9f30cd7fb408c386d6d69b5f7b1beecf1ab44b5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-04-01 19:23:42 +10:00
Qt CI Bot
5bf4133c17 Merge integration refs/builds/qtci/dev/1617260319 2021-04-01 09:23:38 +00:00
Fabian Kosmale
29ef667a69 QObjectCompatProperty: Reintroduce operator=
This is a partial revert of a1a2d97e34.
Reason: The new design does not notify automatically anymore, so using
operator= is safe to use.

Change-Id: I6cb735e40c0da72d22fcc426423eb7830901e5f4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-04-01 10:04:35 +02:00
Fabian Kosmale
4ceaf22bed QObjectCompatProperty: Emit signal in notfiy
There is no need to write emit and notify at the same time, as not
emitting after notify does not make sense.
This naturally only applies to properties with a changed signal.

Change-Id: I99ff7863a509262ad9d4f7c9c5afbc66fd37001c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-04-01 10:04:31 +02:00
Fabian Kosmale
2ffb91ac59 QObjectCompatProperty: Require explicit notify
For QObjectCompatProperty, which allows to do basically anything in its
setter, it is actually easier to manually specify when the change should
become visible. This is in line with manually writing emit calls in the
old property system, and allows the preservation of class invariants.

Change-Id: I585bd3f25d722ca3fd721ead85fe73dbee26c5f6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-04-01 10:04:27 +02:00
Pasi Petäjäjärvi
d8347bd9fe eglfs: Newer Nvidia libdrm provide device instead driver module name
In newer Nvidia proprietary libdrm binaries display device name is
actual device and not driver module name. Check which provided device
name has been returned with EGL_DRM_DEVICE_FILE_EXT to choose correct
function to open device.

Pick-to: 5.15
Fixes: QTBUG-91184
Change-Id: I95f907dfa30057da0dca4ff32e0605c6bb10e0a5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2021-04-01 06:37:35 +00:00
Piotr Mikolajczyk
2e3f48637e Linux: Add abstract address support for QLocal{Socket,Server}
Takes advantage of Linux's and Android's support for abstract namespace
when binding sockets, which is independent of the filesystem (see man
entry for unix domain sockets).

To make QLocalServer and QLocalSocket use an abstract socket address,
one needs to set the socket options to QLocalServer::AbstractNamespaceOption.

Fixes: QTBUG-16090
Change-Id: Ia9f9c9cc1ac5c28f9d44b0a48d854a7cfbd39b11
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-01 06:57:04 +01:00
Qt CI Bot
aa84de1afa Merge integration refs/builds/qtci/dev/1617226155 2021-03-31 23:39:10 +00:00
Alexandru Croitor
8f2795b17f CMake: Expose sub-arch test results as features
Needed for QT_FEATURE_foo checks in repos other than qtbase when
building SIMD specific files (e.g. qtimageformats).

Task-number: QTBUG-85447
Change-Id: Ibd2200fe24cecbb0b2a092f645ca622baf738601
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-03-31 23:27:54 +02:00
Alexandru Croitor
f5f56caa39 CMake: Regenerate stale prev_configure.cmake files
Change-Id: I75d7f2f3d9b40ad392bb598b466fec4708b51a61
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-03-31 23:27:51 +02:00
Alexandru Croitor
f454cd8d15 CMake: Make architecture detection failures more verbose
Whenever something went wrong with building the arch test or extracting
info from it, the failure messages lacked useful details.
It's especially hard to figure out what went wrong if the failure
happened in the CI.

Print a bunch of useful information in case of failure.

Change-Id: Iafe287f951880c1441e57924ae372d6a9029a9a7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2021-03-31 23:27:47 +02:00
Alex Trotsenko
007addc0cc QWinEventNotifier: migrate to new thread pool API
Change-Id: I2fb1ba7254ecfd502a22c706404f92dd1bc3a584
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-03-31 22:52:22 +03:00
Qt CI Bot
8f6d8d7cd8 Merge integration refs/builds/qtci/dev/1617208505 2021-03-31 18:42:29 +00:00
Qt CI Bot
6cc69b6b0b Merge integration refs/builds/qtci/dev/1617204886 2021-03-31 17:42:26 +00:00
Alex Trotsenko
64f02ebf05 QLocalSocket/Win: fix possible UB in _q_pipeClosed()
We must stop the pipe writer before closing the handle on which it
operates.

Pick-to: 5.15 6.0 6.1
Change-Id: I4765dd8393167fe2453653aba76a097b8ace8e3d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-03-31 19:02:33 +03:00
Alex Trotsenko
97877d7948 QLocalSocket: fix signal name in docs
It should be disconnected() instead of disconnectedFromServer().

Pick-to: 6.0 6.1
Change-Id: I2b816e9c92d675ea5a7a26b4752e831c30950ef2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-03-31 18:49:20 +03:00
Volker Hilsheimer
15b0809f06 Remove QEXPECT_FAIL for tests that pass now on Android
Fixes: QTBUG-69214
Fixes: QTBUG-69218
Fixes: QTBUG-69220
Change-Id: I8b780db8d9dad1a877bc16e802e6ae92de0c8f23
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-03-31 17:31:12 +02:00
Joerg Bornemann
f584356eef Fix DESTDIR support on Windows for versioned hard-links
On Windows, we need to strip drive letter and colon before prepending
DESTDIR when creating our versioned hard links.

This fixes CI submodule updates.

Change-Id: I41bc5f27b714ef74d3fadc4a0fb16c3d8b20da1a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 88886f193230292f38987ac4f1503753f50786f0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-03-31 15:17:51 +00:00
Joerg Bornemann
f64ccc5f53 Make find_package in configure.cmake a hard error
qt3d/9a473a3c9b246f4895ae73d7060745b8b199a6c5 introduced a find_package
call in a configure.cmake file, very subtly breaking top-level builds
with configure.

The find_package call results in errors of the cmake call that runs
QtProcessConfigureArgs.cmake (see bug report for details).

Create a find_package stub that errors out with a helpful message.

Task-number: QTBUG-92163
Change-Id: I06db0bf219b965e93b78c690e9f7ad868196ddb9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-31 16:37:39 +02:00
Joerg Bornemann
1aba26eeae Add reference to CMake issue in qt-cmake-private-install-cmake.in
The original issue #20713 is fixed, but there's still #21475 to be fixed
before we can remove qt-cmake-private-install-cmake.
Extend the comment to mention this.

Change-Id: I7a2d794ae23e2b8bc7bd27527cbc8a32b1e78e1b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-31 15:32:30 +02:00
Qt CI Bot
293d556fb4 Merge integration refs/builds/qtci/dev/1617183127 2021-03-31 11:47:55 +00:00
Qt CI Bot
f8fe3d812c Merge integration refs/builds/qtci/dev/1617179524 2021-03-31 10:45:07 +00:00
Andreas Buhr
2b8f7c9b15 Fix some warnings
Change-Id: Ief00228f83e16421fb4eec4c678632d5c996624f
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
2021-03-31 10:51:50 +02:00
Volker Hilsheimer
83d4ca3f66 Remove QEXPECT_FAIL from passing test
The test is blacklisted in dev and 6.1, let it fail properly. We can
watch the history of the test and remove the blacklisting if/when it
passes consistently on supported macOS versions.

Pick-to: 6.1
Task-number: QTBUG-20984
Change-Id: I3211ecf565995578c83a092c637890c0e8bfd766
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2021-03-31 10:20:07 +02:00
Craig Scott
256dea0df7 Avoid using prohibited target property names with INTERFACE targets
CMake 3.19 removed the restrictions on allowable names for properties
on INTERFACE targets. With earlier CMake versions (back to CMake 3.11),
names for custom properties must begin with either a lowercase letter
or an underscore.

In 5807e1ae81 (Add plugins to Qt tools and executables for static
builds, 2021-03-19), the names QT_REPO_PLUGIN_CLASS_NAMES and
QT_REPO_PLUGINS were used, but in some cases, the targets on which they
were being set are INTERFACE targets. Replace these with names that
are supported with CMake 3.11 or later.

Amends 5807e1ae81

Task-number: QTBUG-91915
Pick-to: 6.1
Change-Id: Ife702a1fb339b190d46a8dafb380253219199ba6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-31 18:30:04 +11:00
Qt CI Bot
87a4841cb6 Merge integration refs/builds/qtci/dev/1617158905 2021-03-31 04:56:23 +00:00
Alexandru Croitor
4ffaaaf118 CMake: Semi-handle non-current repo qt modules when creating plugins
In the recent refactoring of qt_internal_add_plugin, a new target
existence check was added when associating a plugin with a qt module.
That check didn't account for a qualified qt module target name.

This failed configuration of qtsvg which checked for the existence of
a namespace-less 'Gui' in a per-repo build.

Make sure to prepend the Qt namespace to the qt module name and also
handle aliased target names.

As a drive-by, add a TODO item to figure out how to link executables
to plugins who's plugin type belong to a different repo, but both the
executable and plugin are built in the current repo.

Amends aa4a1006cb

Fixes: QTBUG-92235
Change-Id: I1c0f83672ab00f4702be9bad9a66ccc35e82f5c8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 734d2cdbc4ff6db6b3df8fffbb23dbbb565c076b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-03-31 02:38:02 +00:00
Xing LinKun
6a7d2da7dd Fix coding style in android platform and style plugins
Change-Id: Ic0a1150178c571ea0c20a045ad7520d23d6d878c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-03-31 01:09:24 +00:00
Qt CI Bot
ae0fe7d4da Merge integration refs/builds/qtci/dev/1617116580 2021-03-30 17:19:59 +00:00
Qt CI Bot
18b9b5c560 Merge integration refs/builds/qtci/dev/1617112958 2021-03-30 16:45:45 +00:00
Qt CI Bot
5d5cc3c7c7 Merge integration refs/builds/qtci/dev/1617109351 2021-03-30 16:02:41 +00:00
Laszlo Agocs
7ccd2d0246 rhi: Add support for custom bytes-per-line for uncompressed raw data
Fixes: QTBUG-90770
Change-Id: Icba328c417bcce256e7b44f1d540af7f8e83376b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2021-03-30 16:43:35 +02:00
Qt CI Bot
5ce367a552 Merge integration refs/builds/qtci/dev/1617105725 2021-03-30 14:36:19 +00:00
Joerg Bornemann
4ae9922166 Move bin/qt-internal-configure-tests to libexec
Pick-to: 6.1
Task-number: QTBUG-88791
Change-Id: I78613128760b5820e6db17b0c09462e34f7c7bb2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-30 14:39:12 +01:00
Qt CI Bot
31c81e08c6 Merge integration refs/builds/qtci/dev/1617098611 2021-03-30 13:30:26 +00:00
Alexey Edelev
856fadf85c Fix processing of list arguments passed to the 'configure' script
list(TRANSFORM ...) unexpectedly removes semicolon escaping in list
items. So the list arguments seems to be broken. The 'bracket argument'
suppresses this behavior. Right before forwarding command line
arguments to the cmake call, 'bracket arguments'are replaced by escaped
semicolons back.

Recent fix escapes all semicolons of the 'configure_args' and glues
all arguments to a single 'list'.

Amends df8e1c8e58

Change-Id: I4a458b9e3add307b36924c4c7c7f739d348f9343
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-30 14:33:26 +02:00
Alexey Edelev
9466b3629a Add missing compile definitions to the resource object library
The resource object library must be compiled with the definitions
specified in Qt::Core. Missing the required definitions causes linker
problems when QT_NAMESPACE is defined.

Change-Id: If0ca20604e251822279e0d4906c47b94d3b4ceb4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-30 14:32:28 +02:00
Giuseppe D'Angelo
0e778b96f1 tst_qobject: enable some tests for narrowing
Compilers are catching up, so some #if 0 codepaths can now be
conditionally enabled.

Change-Id: Ia9e87a096bc2ae4789ab390a9170d9c1eb9690d6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-30 13:27:14 +01:00
Qt CI Bot
7ae037bc82 Merge integration refs/builds/qtci/dev/1617094992 2021-03-30 12:22:15 +00:00
Bartlomiej Moskal
06b0b2be16 Android: Fix Touch event position depending on Surface
Touch event position is counted from begin of Surface. Later method
QAndroidPlatformScreen::topLevelAt(..) is trying to return the top level
window at the touch event position.

In case when Surface is moved, we should also add this move to event
position. If it is not happening, touch event will not be assigned to
correct window.

Fixes: QTBUG-65927
Pick-to: 5.15
Change-Id: I549b9ec964cb09607153c60b9d9f6e0068a04cc2
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2021-03-30 12:01:02 +00:00
Qt CI Bot
32fd331bce Merge integration refs/builds/qtci/dev/1617091379 2021-03-30 10:52:16 +00:00