Commit Graph

51115 Commits

Author SHA1 Message Date
Alexandru Croitor
cf27a23937 CMake: pro2cmake: Use latest project version for qml import version
Use PROJECT_VERSION instead of CMAKE_PROJECT_VERSION when setting the
version of a qml module, which extracts the version of the latest
project() call rather than the top-level one.

Using CMAKE_PROJECT_VERSION caused issues in top-level builds where
the qtdeclarative version is 6.2, but the top-level project version is
still 6.1 and hasn't been updated to 6.2, causing qml module import
errors.

This was probably an oversight during initial implementation of qml
support in pro2cmake.
So projects that define qml modules should be adapted accordingly.

Amends cce8ada814
Amends 28fff4a551

Pick-to: 6.1 6.0
Task-number: QTBUG-92861
Change-Id: I494784694e997501a5bc4fd0c0eac458ddc248aa
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-04-15 13:27:23 +02:00
Qt CI Bot
e7bdf7273c Merge integration refs/builds/qtci/dev/1618460978 2021-04-15 08:38:34 +00:00
Qt CI Bot
33e098704e Merge integration refs/builds/qtci/dev/1618451439 2021-04-15 04:58:02 +00:00
Qt CI Bot
cb3db09617 Merge integration refs/builds/qtci/dev/1618447824 2021-04-15 04:30:18 +00:00
Tasuku Suzuki
35886002d8 Fix build without features.textedit
Change-Id: I3702137451bd5022c454645b1198d63843778214
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-04-15 13:28:19 +09:00
Qt CI Bot
3556b2f753 Merge integration refs/builds/qtci/dev/1618441870 2021-04-15 03:12:49 +00:00
Zhang Hao
78c4d0c48f Add new enum value VisualTabCharacter into QChar
With this enumeration value, users can get the width of
the current font TAB character more conveniently

In addition, added some documentation about where
users may use this enumeration.

Fixes: QTBUG-92205
Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io>
Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Change-Id: I9794b7553e9299e351f9182de02866d07a1393fc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-04-15 01:43:46 +00:00
Tasuku Suzuki
d3638e18d3 Fix build without features.thread
Change-Id: I233808be77dbf1930ebf65b6f23298414eab1da7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-04-15 09:48:59 +09:00
Giuseppe D'Angelo
86ad338aa4 Q{*String,ByteArray}View::length(): use qsizetype, not int
Looks like these ones have been forgotten in the Qt 5 -> 6 upgrade
to qsizetype. Change them to return qsizetype as well,
and fix the docs. Being entirely inline, non-exported classes, we
should be able to get away with it without affecting binary
compatibility. Moreover, there's no reason for keeping them
deprecated.

Requires some minor adjustments, just like the ones done for
size()'s changes.

[ChangeLog][QtCore][QStringView] The length() function
now returns `qsizetype`, not `int`, for consistency with the
other string and container classes in Qt. Following this
change, it has been un-deprecated.

[ChangeLog][QtCore][QAnyStringView] The length() function
now returns `qsizetype`, not `int`, for consistency with the
other string and container classes in Qt. Following this
change, it has been un-deprecated.

[ChangeLog][QtCore][QUtf8StringView] The length() function
now returns `qsizetype`, not `int`, for consistency with the
other string and container classes in Qt. Following this
change, it has been un-deprecated.

[ChangeLog][QtCore][QByteArrayView] The length() function
now returns `qsizetype`, not `int`, for consistency with the
other string and container classes in Qt. Following this
change, it has been un-deprecated.

Fixes: QTBUG-92496
Change-Id: Ie0f4939d1083884e95d4725f891b6c6764532cb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-15 01:09:44 +02:00
Alexandru Croitor
ed5543475e CMake: Fix hardcoded iOS SDK when finding OpenGLES
The find script checked for UIKIT which is set during a Qt build
in QtPlaformSupport.cmake but is not set when building a user project.
This casused the find script to skip the iOS specific code that
passed the -framework OpenGLES linker flag.

This broke SDK switching in Xcode.

Check the IOS variable instead which is set by CMake for all projects
that pass -DCMAKE_SYSTEM_NAME=iOS.

Pick-to: 6.1
Change-Id: I9bd088f317917544ccfeff61fc4ff90f18f0f3d8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-04-15 00:07:51 +02:00
Qt CI Bot
1d59fe368a Merge integration refs/builds/qtci/dev/1618405176 2021-04-14 16:39:38 +00:00
Qt CI Bot
5341569b41 Merge integration refs/builds/qtci/dev/1618401544 2021-04-14 15:08:32 +00:00
Qt CI Bot
fb0fcd7fe3 Merge integration refs/builds/qtci/dev/1618397939 2021-04-14 14:29:23 +00:00
Qt CI Bot
3766cd6ff5 Merge integration refs/builds/qtci/dev/1618392398 2021-04-14 13:33:24 +00:00
Volker Hilsheimer
1d3fe418e2 Replace deprecated APIs in metatype/variant benchmarks
Fix compiler warnings.

Change-Id: Id09b414f530a0d35c1a79e32112ff59185be2bc3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-04-14 14:38:42 +02:00
Assam Boudjelthia
1359238572 Replace conversion operator by operator* in QJniEnvironment
Since conversion operators do implicit conversion that might bring
some potential issues while using the API, let's stick to having
an operator* instead.

Pick-to: 6.1 6.1.0
Change-Id: Ie7ad5537958944b8d1c11d69fbd30284b4b0344d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2021-04-14 12:38:20 +00:00
Allan Sandfeld Jensen
004189b2d8 Fix partial pixel coverage calculation
We want right - left, but the numbers we have are (1 - left) and right,
so we need right - (1 - left) = right + left - 1.

Pick-to: 6.1 6.0
Fixes: QTBUG-91957
Fixes: QTBUG-92485
Change-Id: I238cbbe1eebddff1ce56da38127899cdbd21db0e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2021-04-14 14:28:54 +02:00
Eirik Aavitsland
f4d791b330 Avoid processing-intensive painting of high number of tiny dashes
When stroking a dashed path, an unnecessary amount of processing would
be spent if there is a huge number of dashes visible, e.g. because of
scaling. Since the dashes are too small to be indivdually visible
anyway, just replace with a semi-transparent solid line for such
cases.

Pick-to: 6.1 6.0 5.15
Change-Id: I9e9f7861257ad5bce46a0cf113d1a9d7824911e6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2021-04-14 13:52:37 +02:00
Mårten Nordheim
a7dac8e35b QNetworkCookie: Rename sameSite to sameSitePolicy
As suggested in the API review.
Amends 37bd7b5733

Pick-to: 6.1 6.1.0
Change-Id: Ic3e8567f349568dc3b4dbf79be27c304b39480cf
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-04-14 13:44:26 +02:00
Alexandru Croitor
e379147f95 CMake: Fix default architecture selection for macOS and iOS
Before this change, we created a CMake toolchain file for iOS and
macOS universal which propagated the initially configured
CMAKE_OSX_ARCHITECTURES values to user projects.

So if Qt was configured with 2 arches, configuring a CMake user
project using the generated toolchain file would also build the
user project targeting those 2 arches.

The reason for this that the same toolchain file is used for
configuring both Qt and users projects and we needed to ensure that
other Qt repos are built with the same set of arches. That
unfortunately led the multiple arches to carry over into user
projects.
This is different from qmake behavior which configured user projects
with 1 arch only.

Instead of the toolchain file explicitly setting
CMAKE_OSX_ARCHITECTURES for all projects, save the initial list of
arches into QT_OSX_ARCHITECTURES.
Then if the toolchain file detects that we're building a Qt repo (by
checking for the presence of QT_REPO_MODULE_VERSION) set
CMAKE_OSX_ARCHITECTURES to QT_OSX_ARCHITECTURES to propagate the
initial list of arches.

For user projects we want to have some sensible defaults.
For macOS projects, leave the decision of the architecture to build
to CMake.
For iOS Xcode projects, leave the decision to Xcode.
For iOS Ninja projects, set the architecture to the first value of the
architectures used when configuring Qt.

As a side note this fixes an issue in our CI where we configured macOS
Qt with 2 architectures and then tried to run CMake build tests for
both architectures on a machine that doesn't have the universal SDK.
This led to build failures.
Because the CMake build tests act as regular user projects, now they
are configured with a single architecture that is automtically
detected by CMake.

Pick-to: 6.1
Task-number: QTBUG-85447
Change-Id: Id1b7e78d7e67c1796efed10751416e5f857c16d2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-04-14 13:38:31 +02:00
Edward Welbourne
964f91fd25 Make POSIX transition rule parser more robust
The POSIX rule parser used by QTzTimeZonePrivate recklessly assumed
that, if splitting the rule on a dot produced more than one part, it
necessarily produced at least three. That's true for well-formed POSIX
rules, but we should catch the case of malformed rules.

Likewise, when calculating the dates of transitions, splitting the
date rule on dots might produce too few fragments; and the fragments
might not parse as valid numbers, or might be out of range for their
respective fields in a date. Check all these cases, too.

Added a test that crashed previously. Changed
QTimeZone::offsetFromUtc() so that its "return zero on invalid"
applies also to the case where the backend returns invalid, in
support of this.

Fixes: QTBUG-92808
Pick-to: 6.1 6.1.0 6.0 5.15
Change-Id: Ica383a7a987465483341bdef8dcfd42edb6b43d6
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2021-04-14 12:57:30 +02:00
Qt CI Bot
b7a3aa39e7 Merge integration refs/builds/qtci/dev/1618388786 2021-04-14 10:52:21 +00:00
Qt CI Bot
38abdd33f1 Merge integration refs/builds/qtci/dev/1618385170 2021-04-14 10:37:33 +00:00
Mårten Nordheim
e875c071ec QNetworkInformation: delete the instance as a post-routine
On Windows, on exit, the backend will deref (and then implicitly start
deletion of) a COM object. This object tries to communicate with an
object in another thread, though it seems this other thread quits before
the main thread in _most_ cases.

To get around this we move the deletion to earlier in the program. While
this is only reported as a Windows issue it makes for more consistent
behavior if all platforms behave the same.

Document and test that recreation of QNI works as expected after the
destruction (and recreation) of QCoreApplication.

Amends: 0875626e22

Fixes: QTBUG-92568
Pick-to: 6.1 6.1.0
Change-Id: Iffc07f38673019aa059efd4d64d2ad706a03f6fe
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2021-04-14 10:47:20 +02:00
Qt CI Bot
d61dc9a8cd Merge integration refs/builds/qtci/dev/1618381531 2021-04-14 08:43:26 +00:00
Juha Vuolle
ec3e90a9e4 Add CoreMotion to the list of looked-up frameworks (Mac/iOS)
The CoreMotion is required by the QtSensor module.

Task-number: QTBUG-92502
Change-Id: I7f1853131aa96b2cb052862d5bf492df5ec18150
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-04-14 11:16:52 +03:00
Mårten Nordheim
7ddf834b86 QNetworkInformation(Win): cleanup dtor
I don't like how it looks, so make stop() work even if it's not
monitoring so that the dtor can call it unconditionally, and without
needing a CoUninitialize call of its own.

Change-Id: I06832d7e1d34317ff49ea2c425c79588719d7cd0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-04-14 07:51:38 +00:00
Fabian Kosmale
d5b79e876e QBindable: Mark non-modifying methods as const
A few methods in QBindable which do not modify anything were not marked
as const so far. This adds the missing const, and a test to verify that
they work.

As all methods are fully inline, this does not cause any binary
compatibility issues.

Fixes: QTBUG-89508
Change-Id: If06d33bc405232887b8c371c268840ba34dbadf6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2021-04-14 09:24:33 +02:00
Tasuku Suzuki
865f3c2a11 Fix build without features.systemsemaphore
Change-Id: I73059f48d37253b5f962f96f693f26c7d55a31e1
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2021-04-14 16:24:33 +09:00
Qt CI Bot
62efc8990d Merge integration refs/builds/qtci/dev/1618376490 2021-04-14 07:24:31 +00:00
Friedemann Kleint
0e69349f6f Brush up the mandelbrot example
The example refines the image by running a number of passes
with increasing number of iterations, which is not really
visible to the user. Set an informational text string on
the generated image which provides this information
along with the elapsed time.
The idea is to do the same to the corresponding
Qt for Python example to have some sort of speed comparison
for number crunching.

Add a command line option for the number of passes.

Make the window a bit larger to accommodate the
information.

Change-Id: I2afc1009ab53b580123d82a6aa645d9ffaa63ea2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-04-14 08:24:04 +02:00
Tasuku Suzuki
a63ceffa80 Fix build without features.im
invalid conversion from ‘int’ to ‘Qt::InputMethodHint’ [-fpermissive]

Change-Id: Icc67470ff6ef788b4f1b2eae46c6372b7f40c0d2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-04-14 13:59:22 +09:00
Tasuku Suzuki
2df3d8ed41 Cleanup leftover QWS
QWS is replaced with QPA in Qt5

Change-Id: Iccec38e55ae23a27ebecd8010e1df7bba8aa5a33
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-04-14 13:00:12 +09:00
Zhang Hao
94e03e506a Only scroll QMenu when there is a valid active action
When changing the active action via QMenu::setActiveAction
the menu will scroll to the active action, but we were
scrolling the menu also when the active action was null,
resulting in the menu scrolling back to the top.

We fix this by guarding the call to scrollMenu.

Fixes: QTBUG-92096
Pick-to: 5.15 6.0 6.1
Change-Id: I998f99ddacec32640834d59a907d569fdda458f0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-04-14 01:05:14 +00:00
Andreas Buhr
edcb5ed697 Document how bindable properties can be used in a multithreaded context
Add documentation which specifies that bindable properties cannot
be used in a multithreaded context.
Actually, they can be read when the owning thread is suspended
completely, but this should only be used by Qt internally.

Task-number: QTBUG-90511
Change-Id: I87effac3aea35205f05151cba3c95816da9a5c9d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-04-13 23:41:45 +02:00
Qt CI Bot
d197ad0e2a Merge integration refs/builds/qtci/dev/1618334477 2021-04-13 21:33:41 +00:00
Qt CI Bot
fb636832a1 Merge integration refs/builds/qtci/dev/1618328561 2021-04-13 19:35:34 +00:00
Tasuku Suzuki
f87a541e26 Fix build without features.highdpi
Add four template functions missing in stub.

Change-Id: I7ca126f866a76efc26167340ff2e35a60775078b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-04-14 02:20:07 +09:00
Qt CI Bot
e8c1cd5d88 Merge integration refs/builds/qtci/dev/1618321030 2021-04-13 17:09:35 +00:00
Qt CI Bot
7ce274d95d Merge integration refs/builds/qtci/dev/1618317407 2021-04-13 16:09:24 +00:00
Allan Sandfeld Jensen
a7fabe2328 Light cleanup in QSemaphore Futex implementation
Gets rid of a goto, fixes overflow detection with wakeAll set,
and fixes 64-bit futex mode with futexHasWaiterCount = false.

Change-Id: I8bb98118013fc1dc2a8a405845bec0cb3350494f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-13 17:41:39 +02:00
Marianne Yrjänä
9c6721c106 Add QNX qpa to builds
Task-number: QTBUG-91234
Pick-to: 6.1 6.1.0
Change-Id: I978aff101ce29d2df74ced801911426ccd56e997
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
2021-04-13 16:18:53 +03:00
Tasuku Suzuki
d84bf703b5 Fix build without features.menu
Change-Id: If7947839b8da5abc8ee84aace60cc7de7a053e04
Pick-to: 6.0 6.1
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-04-13 12:51:02 +00:00
Qt CI Bot
385e242ba9 Merge integration refs/builds/qtci/dev/1618310175 2021-04-13 12:50:59 +00:00
Sona Kurazyan
726330c9c0 QAbstractAnimation: initialize the private members while declaring them
Change-Id: I5de0510d06b7d8e10c3cb0d4f23fb7991b8d6c51
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-04-13 13:47:46 +02:00
Qt CI Bot
2c5a35f6ed Merge integration refs/builds/qtci/dev/1618306545 2021-04-13 11:46:39 +00:00
Eskil Abrahamsen Blomfeldt
cd9bbcd97a Adapt to Harfbuzz 2.8.0 update
The Unicode 13 language tags are available since Harfbuzz
2.6.7.

For compilation with earlier versions, also update the
hardcoded tags to match the ones in Harfbuzz (and in
iso-15924):

https://unicode.org/iso15924/iso15924-codes.html

Task-number: QTBUG-90217
Change-Id: I4e2cfdf61a5c4189b8aac51644c9d80c816aeebc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit 910ac477f013f2af690b66f1ac41d65ab7527843)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2021-04-13 10:02:02 +00:00
Qt CI Bot
7fe1114dc7 Merge integration refs/builds/qtci/dev/1618299310 2021-04-13 09:45:54 +00:00
Volker Hilsheimer
742ecf83e5 Silence qdoc warnings
These are internal APIs, so silence qdoc which seems to get confused
by the missing CALLBACK annotation in the implementation.

Change-Id: Iddd9f87257843cc3d43597fe7e6c103aa5e1a646
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
2021-04-13 10:49:02 +02:00
Volker Hilsheimer
ae3d4b8f6b Fix qdoc warnings from new QLockFile members
Change-Id: I06210fe37a3d90a958064fff48331a34bced2a8b
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
2021-04-13 10:48:50 +02:00