Commit Graph

48244 Commits

Author SHA1 Message Date
Sona Kurazyan
5cae73217a Improve docs for QFuture::{result*, takeResult*}
Change-Id: I559f2fd73a9aae3d126be18cb259f8a9abe0efaf
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-09-29 22:18:01 +02:00
Sona Kurazyan
a6930724f0 Improve docs for QtConcurrent::{filter, blockingFilter}
Change-Id: Ibe3a038ad6853da1a6c9246b1157cd7ada4b9f32
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-09-29 22:17:55 +02:00
Tony Sarajärvi
8c5eb647cf Further blacklist network tests on Windows MinGW
Task-number: QTBUG-87009
Change-Id: Ic855ae87b69c02f76519a2957de05f4af7bf9a6d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-29 19:56:45 +00:00
Giuseppe D'Angelo
98ae35acd6 QObject: use more categorized logging
Introduce a category for debug/warning prints coming from connect()
and related functions. As a drive-by, rename and complete the
usage of logging categories for connectSlotsByName().

Change-Id: Ieb2d8641df856c8c60317757eda80dc5f9375130
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-09-29 21:46:00 +02:00
Laszlo Agocs
9152e3babc rhi: vk: Do not copy the entire BufferOp struct for host writes
Take only the three things we need. Otherwise we waste time on copying
data that is not even relevant to buffer updates at all.

Change-Id: I5ed6ae647e23c6f1d0f5f1d973bead2e008f06cc
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-09-29 21:24:51 +02:00
Laszlo Agocs
80626a057e rhi: gl: Skip nice but not essential uniform checks in release
Change-Id: Ic258f128d691a221670d930d2bfe90cda74a4c75
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-09-29 21:24:45 +02:00
Laszlo Agocs
848ed9644c rhi: Drop QBitArray usage
Change-Id: I4ae92e6c8c91111a4593c51ee05443b3bc806c35
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-09-29 21:24:38 +02:00
Laszlo Agocs
868866cecd rhi: Improve layout compatibility test performance
Also bump the non-heap buffer size in the binding list to 16,
in order to accommodate complex Quick3D materials with many
associated texture maps.

Change-Id: Id190e5f8304f5941cffc41a2605fce45dfeb72f0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-09-29 21:24:32 +02:00
Laszlo Agocs
331c8cd5b4 rhi: gl: Pre-sort uniform metadata based on offset
Because we will iterate through this list and issue a memcpy
for each entry. Better to keep it sorted based on offset to
be more cache friendly.

Change-Id: Ie9dcb259e9a543937cbdcdea85aec9eb92dba1b1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-09-29 21:24:27 +02:00
Lars Knoll
04641454be Disable moving of QProperty
The semantics are not very intuitive, and it opens a can of worms
with regards to what should happen with observers that observe
that property.

Change-Id: I6fb00b7693904b968224cc87d098bbd0ea776ba3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-09-29 20:32:42 +02:00
Fabian Kosmale
6b4e0c5803 QProperty: fix QBindingStoragePrivate::reallocate related code
In the internal hash map implementation, we have to ensure that the
index is in the interval [0, size - 1].
Moreover, in setBinding we have to refetch the binding storage in case a
reallocation happened.

Change-Id: I11c6264f16537699c8908b647e2355a39ce87648
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-29 20:32:32 +02:00
Assam Boudjelthia
7a41b928d4 CMake: fix sdkBuildToolsRevision not being set for user apps
Add qt6_android_get_sdk_build_tools_revision() function to get the
Android SDK build tools revision, the logic is moved from
QtPlatformAndroid to Qt6AndroidMacros. The update QtPlatformAndroid
header comments.

Task-number: QTBUG-85982
Change-Id: If3e5b46fa583f929a24794792c9d5a52beb83990
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-29 19:28:12 +03:00
Allan Sandfeld Jensen
2271d998d4 Do not parse low-level PNG colorspaces if they are not used
Minor cleanup.

Change-Id: I92c271f737d82c5f853b79c418db5a6cedfaa399
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-09-29 13:16:48 +02:00
Allan Sandfeld Jensen
81008ef4b9 Reimplement non-antialiased cosmetic pen
Simplify rounding to get rid of hacks to make lines meet up again. This
also results in better looking drawing results in general.

Task-number: QTBUG-25896
Change-Id: I48f08f0e7bd7ff869d6767f7bac2a18c2d280615
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2020-09-29 13:16:36 +02:00
Mårten Nordheim
19a95c5e21 QSsl: Remove enum value gaps
These value gaps were there for binary compatibility, but we don't need
those in Qt 6.

Change-Id: I72a40d601b61f90e14562578e88493b0d54ff398
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-29 10:27:10 +02:00
Mårten Nordheim
8c60af6d22 Docs: Update default redirect policy enumeration
Change-Id: Ia72151cc0fbcb325572e7b623ef9a4b3236d797f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-29 10:27:08 +02:00
Andreas Buhr
f8474306e5 QPrinter: fix unit tests for special case when no printer is default
The unit tests of QPrinter assume that a printer which is default-
initialized is the same printer as the default printer. However, when
no printer is set to default, this is not the case. When no printer
is the default printer, a default-initialized QPrinter will be the
first printer found.
This patch adapts the unit tests to work also when no printer is the
default printer, even though printers are available.

Change-Id: I4967e5b1c4fb8a7c33c911184289ec5cd283fc58
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-29 09:59:02 +02:00
Liang Qi
b05e444a92 tests/xcb: fix tst_QWidget::updateWhileMinimized() - again
This amends 4403ec3bc1.

CentOS 8.1 uses GNOME in XDG_CURRENT_DESKTOP.

Pick-to: 5.15
Task-number: QTBUG-68862
Change-Id: Ia9a6f7f4c47853fc53d9860dad070109271a438e
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2020-09-29 07:28:58 +00:00
Tony Sarajärvi
036eb54e60 Blacklist QTcpSocket::connectToHostErrors in Windows 10 builds
Task-number: QTBUG-87009
Change-Id: I63c1bcb77a359cea82f2831b02f1e29b46060a66
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-29 07:13:46 +00:00
Topi Reinio
fc141be890 Doc: Qt GUI: Depend on qtprintsupport documentation module
This adds 'Inherited by:' links to print support classes deriving from
Qt GUI types.

Pick-to: 5.15
Task-number: QTBUG-77126
Change-Id: I84ecee5df8cae0635d42653b1483db6b3c6074ee
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-09-29 08:53:52 +02:00
Martin Smith
32468c075f doc: Make QtCore depend on all modules
Class QObject is the most widely used base class in Qt. It is
inherited by a great many Qt classes.This update sets the depends
variable in qtcore.qdocconf to '*' so that QDoc will load all the
index files for all of Qt, when it generates the documentation for
QtCore. In particular, this will ensure that the "Inherited By"
list for class QObject will show all the Qt classes that inherit
QObject.

Pick-to: 5.15
Task-number: QTBUG-77126
Change-Id: I5f38400ccc798ec34e2ee80472f1fe9bb7b1877d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-09-29 08:53:50 +02:00
Allan Sandfeld Jensen
adc7e1af2a Add checks for new QBitArray version
Add a few checks for the new longer length.

Change-Id: I642a64b91361d236457e7a89a02feb812b4e1cf8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-29 08:53:04 +02:00
Allan Sandfeld Jensen
a45920c86c Switch QBitArray to qsizetype
To make it consistent with other containers in Qt6.

Change-Id: I5578845390248baf80daa282237b706857e57661
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-29 08:53:00 +02:00
Allan Sandfeld Jensen
92e108bff8 Switch QCache costs to qsizetype
Since size is already qsizetype and costs is multipla of size, it seems
costs should be qsizetype as well.

Change-Id: Iae85baaba5842460358e369a666fef6ebb7e52b4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-29 08:52:52 +02:00
Heikki Halmet
cf0f1e0860 Blacklist tst_QUdpSocket::writeDatagramToNonExistingPeer
tst_QUdpSocket::writeDatagramToNonExistingPeer is also failing with
MinGW

Task-number: QTBUG-74542
Task-number: QTBUG-80328
Change-Id: I44b886a1fc1eac34deefc34690c6701063a49d8f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-29 09:41:23 +03:00
Oswald Buddenhagen
b9290cb6e5 make {QString,QByteArray}::squeeze() work without prior reserve()
string-shortening operations never throw away capacity (unless
detaching), so it may very much make sense to squeeze a string whose
capacity was not explicitly reserved.

this does in fact restore the behavior prior to commit a3aa2fcf, which
changed it presumably only due to not considering the case above.

Change-Id: I0d7919a1724dd3ecc6cd4cbd7236eb52067f0a1c
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-09-28 22:08:40 +02:00
Timur Pocheptsov
7ee9bfc158 QCocoaDrag - set image only on the first drag item
This image is already a combined image of all urls that we drag.

Pick-to: 5.15
Change-Id: I8fe45f64a6022881320d100f8a6f4a25fcac73b9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-28 21:43:47 +02:00
Assam Boudjelthia
bfd07072fe CMake: make QT_ANDROID_DEPLOYMENT_SETTINGS_FILE consistent with qmake
Make name format of QT_ANDROID_DEPLOYMENT_SETTINGS_FILE consistent with
qmake, that is android-${target}-deployment-settings.json.

Task-number: QTCREATORBUG-24678
Change-Id: I2bdb056cf7a82fd83aaf658f3a405a0c9ef05756
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-28 17:25:19 +00:00
Joerg Bornemann
3d54f47cea CMake: Generate *AdditionalTargetInfo.cmake for tools
This ensures that we have the configuration-independent IMPORTED_*
properties set on tools.

Fixes: QTBUG-86893
Change-Id: I2b772c21341e6e4631379d4a5a99580ec96909ed
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-28 17:29:38 +02:00
Joerg Bornemann
347d2163b2 CMake: Write proper *AdditionalTargetInfo file in debug-only build
To provide the IMPORTED_LOCATION target property we must write
the *AdditionalTargetInfo.cmake file for all debug-only builds, not only
the ones containing a release configuration.

Task-number: QTBUG-86893
Change-Id: I9ecd01483660f434a3f1ea12fa2af756cdcf9932
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-28 17:29:35 +02:00
Lars Knoll
0902508411 Fix compiler warnings from QKeyCombination
Change lots of code to avoid the deprecated operator+() or implicit
casts to int.

Change-Id: I0c343cd5b28603afdf1214eefb85e928313345e2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-28 17:23:20 +02:00
Timur Pocheptsov
673da7d460 QSslConfiguration::setAllowedNextProtocol - remove the old signature
Change-Id: I0b4b18e6ea2b78917220e77865fd92eb7a684179
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-28 15:48:49 +02:00
Sona Kurazyan
a6e1f67937 Fix QtConcurrent algorithms to work with temporary sequences
QtConcurrent algorithms are making an internal copy of the passed
sequence, to make sure it won't be destroyed before the execution
is finished. However, they were using iterators of the originally
passed sequence. So, if the original sequence is deleted, QtConcurrent
algorithms would use invalid iterators to a deleted sequence. This
might work with Qt containers thanks to implicit-sharing, but with
other containers will lead to unexpected results. Fixed them to work
on the internal copy of the original sequence.

Change-Id: I1d68692ed9746223c85f51bb05977bc1443b681d
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
2020-09-28 15:48:17 +02:00
Edward Welbourne
b12d6c6a8a Don't guess UTC when we can't find a system zone name
If we're able to load a system zone without knowing its name, we
shouldn't claim that its name is UTC.  Instead, use the system zone
information's name for the zone.

Let the backend return an empty string if it can't determine the
system zone ID, provided it has some way to get system zone info
despite not knowing its name. This can happen on Windows if the system
zone is one of Microsoft's idiosyncratic names that we don't
recognize; or on Linux if /etc/timezone is a copy of a zoneinfo file,
instead of a symlink. In support of that, handle empty ID as a request
for system zone info, so that the backend constructors taking an IANA
ID never get passed an empty ID; that gets routed to the default
constructor instead.

This incidentally restores QTzTimeZonePrivate's behavior, for empty
ID, of reading the content of /etc/timezone if we are unable to
determine the name of its zone any other way.

Fixes: QTBUG-86306
Pick-to: 5.15 5.15.1
Change-Id: Iad57c18199124f651ebc3d32c3deffca6eaab512
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-28 15:48:17 +02:00
Julien Schueller
32309fb446 CMake: FindGLIB2 to include gthread2 sub-library
Avoids undefined references to g_thread_init.

Fixes: QTBUG-86727
Change-Id: Ic41b0dab9e4e23083faf4e9abcf7acc517172e49
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-28 15:48:17 +02:00
Alexandru Croitor
9bcabd71a7 By default don't try to use pkg-config when targeting Android
It causes issues in our Windows CI, because the strawberry perl
pkg-config is found. And even that one is unusable, due to a bug in
CMake which is tracked at
https://gitlab.kitware.com/cmake/cmake/-/issues/21239

Change-Id: I58816195d35459e8a44c923399c35a4956c222a2
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
2020-09-28 15:48:17 +02:00
Alexandru Croitor
a9f352cce3 CMake: Regenerate configure.cmake files
Change-Id: I165c633d7c052fb80419d4b2c57561de40217ade
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-09-28 15:48:17 +02:00
Alexandru Croitor
7bb91398f2 CMake: Allow finding Qt CMake packages in additional locations
By default, when using the Qt6 CMake package to look for components,
the find_package() calls for the components use NO_DEFAULT_PATH to
ensure that CMake doesn't accidentally find system (distro) packages.
Instead we limit the paths to one level up from where the Qt6 package
is.

Unfortunately that doesn't quite work for finding Qt packages that
might have been installed into a different prefix than where the main
Qt prefix is.
This happens when Qt addons are built by Conan, and installed into
a separate prefix.

To allow calls like find_package(Qt6 COMPONENTS ConanAddon) to work
in a scenario as described above, introduce a new variable called
QT_ADDITIONAL_PACKAGES_PREFIX_PATH which can be used to specify
additional paths where Qt CMake packages should be found.

This is similar to previously introduced QT_EXAMPLES_CMAKE_PREFIX_PATH
variable which was meant for a similar case, but only for examples.

Additionally, allow disabling the NO_DEFAULT_PATH option by setting
the QT_DISABLE_NO_DEFAULT_PATH_IN_QT_PACKAGES cache variable to TRUE.
This would allow regular usage of CMAKE_PREFIX_PATH to work, at the
risk that system Qt CMake packages might be found.

Augments 5cd4001bf2
and ffe0889413.

Fixes: QTBUG-86882
Change-Id: Ia8e060cbba6d2a10c3d63d81892f2c71e4236a9a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-28 15:48:17 +02:00
Fabian Kosmale
1e883cf9b5 Prevent endless markDirtyAndNotifyObservers <-> notify loop
Before we had the option of eager evaluation, we were able to use the
dirty flag to detect whether we are recursing. However, eager properties
will lead to a evaluateIfDirtyAndReturnTrueIfValueChanged call, and that
in turn will clear the dirty flag.
Introduce a new member to detect that situation, and set the bindings
error state to BindingLoop if we detect that kind of loop.

Change-Id: If40b93221848bd9e9422502318d992fad95b0b74
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-28 09:11:16 +02:00
Volker Hilsheimer
de52ad0a0f Fix documentation for QStringList
Explicitly declare members in qdoc runs that are otherwise inherited
from QListSpecialMethods.

Note: Due to a bug in syncqt, those members need to be added in a
separate #ifdef Q_QDOC section.

Change-Id: I96850f3665359de4f97be1b8d10f8052ba252fab
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-09-28 08:16:59 +02:00
Toni Saario
f26d4def67 Read test specific configure arguments from environment
Reading configure arguments for tests from environment allows control
of CMake args from outside of the module itself. TEST_CONFIGURE_ARGS is
read and appended to host tests build and TARGET_TEST_CONFIGURE_ARGS
respectively for target's tests.

Change-Id: I8270b0254525aec24f7614cba2b90b291e5eb3d2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-28 05:28:22 +00:00
Volker Hilsheimer
258bf0c58e Fix qdoc warnings: supportedCiphers is a member of QSslConfiguration
... not of QSslSocket.

Change-Id: I9db5debe6a0aaa6a780b0047ae3f551ec3770fb4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-09-28 07:10:49 +02:00
Volker Hilsheimer
804ef8db7a Fix qdoc warnings: remove docs for inherited/implicit members
Change-Id: I8654dbc3c0d1b86690f805cc1282e581dbcc5c55
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-09-28 07:09:56 +02:00
Volker Hilsheimer
4ccebdf12d Fix some qdoc warnings from QStaticPlugin
Move all the documentation for that class into one place, and remove
rawMetaData documentation and references; it is a private variable, and
shouldn't be documented.

The instance member is a function pointer type variable, but should
be treated as a member function. Even with a Q_QDOC ifdef'ery we can't fix
that warning (we would get a lot of new warnings instead), so leave that
as is for now.

Change-Id: I951aaafad8dca5ed2533ace69931f002eb97996a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-09-28 07:09:48 +02:00
Volker Hilsheimer
7542638e0c Fix qdoc warnings from Q(Latin1)String
arg() is now a variadic template, already documented in
qstringview.cpp, so document that and remove the documentation for
the removed overloads.

QString has no member subString, so remove that as well.

Fix return type in QLatin1String member function documentation.

Change-Id: I32e7bcba770bcee77ae4a07c06ac61228ffa93a6
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-09-28 07:07:56 +02:00
Volker Hilsheimer
36df66591a Fix some qdoc warnings from QHash and QMultiHash
It's no longer possible to decrement an iterator, and the class uses
qsizetype, not int for sizes.

Fix incorrect function prototypes in the documentation, and remove
documentation for functions/overloads that don't exist.

QMultiHash doesn't have Java style iterators (not a new issue in
Qt 6), so remove the references to QMultiHashIterator.

Change-Id: I149b4620963f2087f3f66bb70a9c97b292a35378
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-09-28 07:07:56 +02:00
Volker Hilsheimer
7083ddb582 Fix qdoc warning: button(s) are members of QSinglePointEvent
... and documented there already.

Change-Id: Ie66362d3b668caf93b100befef08bc91ae8add2f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-09-27 14:09:47 +02:00
Friedemann Kleint
38a5b6212d qtabletevent/regular_widget manual test: Add a toggle for WinTab
Task-number: QTBUG-83218
Change-Id: I179f53c051c92dbb86fbac710d4a514c4e5d3c49
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-09-27 12:25:54 +02:00
Edward Welbourne
03c12974bb Simplify the preamble of QDateTimeEditPrivate::stepBy()
Repetition and needless complexity: eleven lines rewritten in three.

Change-Id: I1dadbbc5329b18d3e25f38f73b69abd2d7aac30d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-09-27 09:32:17 +02:00
Edward Welbourne
e0ff15ffd8 QCalendar: use LGPL like everything else, not GPL
Pointed out by Lars.

Change-Id: Idb8427d77b35c84eb3037703957cf7f93ea5f387
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-27 09:31:48 +02:00