Commit Graph

49610 Commits

Author SHA1 Message Date
Joerg Bornemann
21e7777230 Fix undefined behavior in ProString/ProKey::appendTo
We must not pass null pointers to memcpy.

Pick-to: 6.0
Fixes: QTBUG-88780
Change-Id: Ic1d77b4672310a3f6d0d4fbee5f2889e3e4d219d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-12-02 10:21:45 +01:00
Mårten Nordheim
c19695ab95 QDuplicateTracker: remove the appendTo && overload
As a requirement for unordered_set (and QSet) both "iterator" and
"const_iterator" are const, so we cannot reassign or move the key.
That means this overload is no different to the const & overload, so
we can just remove it.

Pick-to: 6.0
Change-Id: Ia14dccf7f610967649bab38161ce6d963509316b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-12-02 09:17:14 +00:00
Mårten Nordheim
def1b97849 Http2: don't call ensureConnection when there's no request available
Previously we only checked if there was something in the h2 queue or
if we had not yet switched to http2. These means in some cases that
following an error it would enter this branch and, because it had not
yet switched to http2, it would call 'ensureConnection' which would try
start a reconnection. This could make the proxy socket engines try to
emit 'auth required' with no replies, meaning nothing happens.

Fixes: QTBUG-88417
Pick-to: 5.15 6.0
Change-Id: If37b8c71ac36597adc305fb1b1ea4fa7b48b0d28
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-12-02 10:17:13 +01:00
Mårten Nordheim
65bcac95a7 Http2: Remove errored-out requests from queue
The requests will remove themselves once they get deleted
but since the deletion is done through a _queued_ invokeMethod
to 'deleteLater' we will call
QHttpNetworkConnection::_q_startNextRequest first which may
end up starting a reconnect of the TCP socket which we had the error on.

In this specific instance it manifested as a race condition where we
either don't get a proxyAuthorizationRequired signal at all (it was
emitted while we didn't have any valid replies), or we get the signal
emitted too late and it gets emitted on whatever the next reply was.

Task-number: QTBUG-88417
Pick-to: 5.15 6.0
Change-Id: If3f8ececc5550f1868c90124559cb8e3029646d8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-12-02 10:17:12 +01:00
Mårten Nordheim
734c8aa9d9 QSet: add insert(T&&)
We already have all we need in QHash to support this, so the addition
is simple enough.

Add test checking how many copies and/or moves are needed for a single
insert.

As a drive-by: remove some unneeded static_cast

Change-Id: Iaf768657644afa45f78f5c81ffcf89ba9607be96
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-02 10:17:11 +01:00
Ivan Solovev
6364194456 QList docs: extend prepend() description
Current description was confronting the general description of the
class, which states that prepend() is fast.
The updated description gives more information about the method's
behavior in different conditions.

Pick-to: 6.0
Task-number: QTBUG-87962
Change-Id: I7b6dfb536d143d78c441214f83320c1bf1263e0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-02 09:30:29 +01:00
Ivan Solovev
5545b0f1d3 QLatin1String: documentation updates
Some updates for QLatin1String documentation:
- Update signatures of some methods
- Update outdated description for several methods
- Add missing docs for friend operators
- Wrap descriptions at 80 characters

Pick-to: 6.0
Task-number: QTBUG-87962
Change-Id: I1c3c5ce2a6f4f57f92ab503a734c8244fe7cd7c5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-02 09:30:11 +01:00
Andreas Buhr
ca5ec3d6b9 Add qt5compat as a dependency to qtxml documentation
QXmlSimpleReader was moved to qt5compat. In the qt6 migration guide, we
would like to point to it. This patch adds qt5compat to the dependencies
of QtXml documentation in order to be able to do this.

Task-number: QTBUG-88533
Pick-to: 6.0
Change-Id: Ifaad595862b80d31310ed594e21168cec56133a0
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
2020-12-02 06:01:20 +01:00
Volker Hilsheimer
0cc9a99865 Fix links to Application Example
The example was renamed in 6cb36d825d.

Pick-to: 6.0
Change-Id: Ic9daac60002c9988dfeb5c7dcde74edb69388f37
Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2020-12-02 05:59:56 +01:00
Giuseppe D'Angelo
bec8f9ca92 Add tests for the new erase/erase_if for sequential containers
Change-Id: I3bac5f6f04f3028fbc21f1b4b15b00252a7accb1
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-01 23:03:32 +01:00
Giuseppe D'Angelo
dc091e7443 tst_containerapisymmetry: use an algorithm
In preparation for the next changes.

Change-Id: Ibe0635dfa040842073749aa3e2ae140f27dc983a
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-01 23:03:31 +01:00
Giuseppe D'Angelo
b2ea30dde0 QString/QByteArray: add erase/erase_if
[ChangeLog][QtCore][QString] Added erase() and erase_if()
for consistent container erasure.

[ChangeLog][QtCore][QByteArray] Added erase() and erase_if()
for consistent container erasure.

Change-Id: I23e8565d39044c1f1d756500589c1f2b65e1a88f
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-01 23:03:28 +01:00
Volker Hilsheimer
11bde366e8 Fix link to qHash documentation
Change-Id: Idd72530464aae24fd0e5c144d0de663609632f68
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-01 21:30:47 +01:00
Shawn Rutledge
8e74ee0791 Update Drop Site Example docs: mention the new markdown support
Amends 4edcea762d

Change-Id: Ide3e7a67b6604d07b76edcfe484c8d29e4e848fb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-12-01 20:20:18 +01:00
Shawn Rutledge
2e0f7117b6 Fix deprecations in manual tests
QEventPoint instead of TouchPoint:  we have source compatibility for that,
but we can use the new type to avoid the deprecation warnings.
Some position accessors have been renamed too.

Change-Id: I5bfe5bc853931127a883d2bd61fab122495fd427
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-12-01 20:20:11 +01:00
Giuseppe D'Angelo
62dad9be9e QSet: add erase_if
[ChangeLog][QtCore][QSet] Added erase_if() for consistent
container erasure. Added removeIf() as a method.

Change-Id: I4af57b654036aa08bee3f769ab2f60be37115094
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-12-01 18:55:55 +01:00
Giuseppe D'Angelo
c176525f13 Sequential general purpose containers: add erase/erase_if
This is refactor/revisit for Qt 6 of the original commit [1]
by Marc, limited to QList and QVLA.

[1] see 11aa9a2276ba5367adbbd96d0ba13111d58145f8

[ChangeLog][QtCore][QList] Added erase() and erase_if(),
for consistent container erasure. Added removeIf() as a
method, complementing removeOne() / removeAll().

[ChangeLog][QtCore][QVarLengthArray] Added erase() and erase_if(),
for consistent container erasure. Added removeIf() as a
method, complementing removeOne() / removeAll().

Change-Id: I2499504e221431ead754dd64cc8a4d4e9f116183
Done-by: Marc Mutz
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-12-01 18:55:49 +01:00
Giuseppe D'Angelo
6025ecfaa1 QMap: code tidies
Change-Id: I3a88cb2d307a44022df6d6045d99acfc9b1a1a0e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-12-01 17:39:29 +01:00
Alex Trotsenko
6e07edb260 QProcess/Unix: remove redundant checks in waitForReadyRead()
QProcessPrivate::tryReadFromChannel() returns 'true' only if we emitted
readyRead() signal on the current read channel. Thus, these additional
checks are unnecessary.

Change-Id: Id98620cd08ee8808f60539c009986b869e517ef0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-12-01 18:39:12 +02:00
Lars Knoll
97abbf3f1f Silence code checker warnings
Pick-to: 6.0
Change-Id: I8bd8d830ade3e194f423e00f180c50b176a8adc8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-12-01 15:03:22 +00:00
Lars Knoll
60ea10e70b Add a way to check whether a metatype has datastream operators
Add QMetaType::hasRegisteredDataStreamOperators() to complement
the method to check whether a data stream operator exists.

Fixes: QTBUG-82916
Change-Id: Ib2f841131b7c401d5a3ae76d49104e41697c4eac
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-12-01 16:01:08 +01:00
Sona Kurazyan
95cea24fa2 Fix memory leaks in QFuture's continuations
There were two issues:

- Some of the continuations were allocating memory for the
continuation's context dynamically, but deleting the allocated memory
only if they were actually invoked. Since the continuations may not be
invoked at all, this could cause memory leaks. Fixed by postponing the
allocations to the point when the continuations need to be invoked.

- In other cases the parent future is captured by copy in the
continuation's lambda, which is then saved in the parent. This causes
the following problem: the data of the ref-counted parent will be
deleted as soon as its last copy gets deleted. But the saved
continuation will prevent it from being deleted, since it holds a copy
of parent. To break the circular dependency, instead of capturing the
parent inside the lambda, we can pass the parent's data directly to
continuation when calling it.

Fixes: QTBUG-87289
Change-Id: If340520b68f6e960bc80953ca18b796173d34f7b
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
(cherry picked from commit 5d26d40a5596be048be87f309df9264bac741be9)
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-12-01 15:59:12 +01:00
Giuseppe D'Angelo
b5b2640a65 QHeaderView: fix spurious sorting
QHeaderView sorting may be triggered when the user performs
some mouse interactions that should really not result in sorting.

Generally speaking, this happens when the user:

* presses on a non-movable section (A)
* moves on another section (B)
* releases on that section

resulting in B becoming sorted / flipping sorting.

(Non-movable is required, otherwise dragging would cause section moving,
not sorting.)

To make the matter worse, QHeaderView doesn't check that the release
happens within its geometry. This makes sense when moving sections: one
is able to drag a section horizontally/vertically even if the mouse
leaves the QHeaderView.

But when not moving sections, this means that one can

* press on section (A),
* move the mouse anywhere vertically (for a horizontal bar, mut.mut
  for a vertical) above or below another section (B), that is,
  outside QHeaderView's geometry
* release the mouse

and cause B to be sorted.

Fix it by

1) remembering which one was the section that the user originally
clicked on; that's the only one that can possibly become sorted
(if we're not moving and other conditions hold). No other variable
seemed to remember this.

2) on release, check that it happens within that section's geometry.
If so, sort.

Pick-to: 6.0 5.15
Change-Id: Icfb67662221efbde019711f933781ee1e7d9ac43
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-12-01 15:57:10 +01:00
Andreas Buhr
10b6a87679 Fix documentation links to High DPI documentation
The documentation on High DPI was recently rewritten, renaming
several sections. This patch fixes the links which were broken
by this change.

Task-number: QTBUG-88533
Pick-to: 6.0
Change-Id: I5e9417554270a6740986d7cec5e3433d043e5560
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-12-01 15:48:53 +01:00
Fabian Kosmale
b21dba98e3 QProperty: Avoid spurious dependencies by suspending binding state
Avoid spurious bindings by resetting the binding state before calling
the setter of eager properties.

Fixes: QTBUG-88999
Pick-to: 6.0
Change-Id: I1e3b5662307d906598335a21d306be9c606529d4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-12-01 15:06:35 +01:00
Fabian Kosmale
cea8b5832c QProperty: add test case for spurious dependency issue
Task-number: QTBUG-88999
Pick-to: 6.0
Change-Id: Ifcbf23fedfb795771550762dfed8fc38bce65794
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-12-01 15:06:31 +01:00
Lars Knoll
5494f0af32 Add a note about where to declare the streaming operators
Streaming operators for types used together with QMetaType should
get declared in the same namespace as the type itself because
of C++s ADL rules. Add a note about that to the documentation.

Pick-to: 6.0
Fixes: QTBUG-88990
Change-Id: I5d687576c6d926823dd0f1fec0743e877ae271af
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-12-01 14:53:23 +01:00
Andreas Buhr
c4d488eeb9 Fix documentation of QPartialOrdering
qdoc did not find the hidden friend comparison functions at gave
errors like
qcompare.qdoc:82: (qdoc) warning:
clang couldn't find function when parsing
\fn bool operator==(QPartialOrdering p1, QPartialOrdering p2) noexcept
This patch documents them as if they were class members to fix this.

Document the constants as \variables.

Task-number: QTBUG-88533
Pick-to: 6.0
Change-Id: Ife56f16894e454f324060aeb73f66aba2d45e530
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-01 14:52:46 +01:00
Alex Trotsenko
80b7ef559a QProcess/Win: improve reading in waitForBytesWritten()
On Windows, tryReadFromChannel() just publishes the data that was
already buffered by the pipe reader. Reading from the pipe was still
possible only because the pipe writer enters an alertable wait state
which can trigger an I/O callback for the read operation as well. This
made the implementation unclear and tied to APC behavior.

To avoid this, we now call the "proper" pipe reader wait function
instead, which also unifies the code with the other waitFor...()
implementations.

Change-Id: I7376d7973477a722472ff8763f95f39e6ea2fce9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-12-01 15:45:17 +02:00
Mårten Nordheim
6035fd8f2c tst_qtcpserver: Test pauseAccepting/resumeAccepting
Currently untested

The socks case is odd: after accepting the first connection it shows as
unconnected. Details as for why is unknown, out of scope of adding this
test.

Pick-to: 6.0
Change-Id: I0e7658f23b89f3af8db379b001ee33a844f3bec4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-12-01 14:42:56 +01:00
Mårten Nordheim
f7d7060b60 QNetworkDatagram: Test copy ctor and clear()
As they were not currently tested

Change-Id: I91bc8dead2c098376001a8502d29bfc746d33f73
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-12-01 14:42:54 +01:00
Mårten Nordheim
fecacfb032 qsocks5socketengine: use qintptr when referring to socket descs
One patch from many years ago already did most of it, but the key of
the hash was still int.

Change-Id: I557fa19d2573addbef7557d1a16fdd6554a117cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-01 14:42:53 +01:00
Mårten Nordheim
ffea715605 QSocks5SocketEngine: Add missing return on error
Change-Id: I199b7156c280e02c3ce37bd72ba0dc1febf10fe9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-12-01 14:42:53 +01:00
Mårten Nordheim
1911a4d40a QDuplicateTracker: add tests
It didn't initially have tests. To avoid relying on realizing
breakage implicitly through other classes we'll just add tests instead.

Task-number: QTBUG-88183
Pick-to: 6.0
Change-Id: I7449dc1f9a118d4b7a8158a2c34563dbd9c43c66
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-12-01 14:42:52 +01:00
Cristian Adam
7b5fd05e8b CMake: Allow WIN32 and MACOSX_BUNDLE arguments for qt6_add_executable
qt6_add_executable will forward all arguments to add_executable, which
works fine on Windows and macOS in regards of WIN32 and MACOSX_BUNDLE
arguments.

On Android however add_library is being used, and those arguments need
to be removed otherwise they will be consided as source files.

Pick-to: 6.0
Fixes: QTBUG-88926
Change-Id: Id22fdf91d58d9053eaad2d3c080ea72060d928c0
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-01 14:24:48 +01:00
Eirik Aavitsland
cfad8a352a Cosmetic stroker: avoid overflows for non-finite coordinates
int overflows are usually avoided by clipping the qreal coordinates to
the device rect. However the clip function did not handle inf or nan
coordinates, so such values would be passed on. Fix by treating any
line with such coordinates a fully clipped away, i.e. rejecting it,
since it cannot be meaningfully stroked anyway.
Fixes oss-fuzz issue 25330.

Pick-to: 6.0 5.15 5.12
Change-Id: I4646172fc7a7e0a3a5f5cf03ce10ff0fb56b0d03
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-12-01 14:17:36 +01:00
Andreas Buhr
caa632803d Disable some OpenGL and QRhi tests for offscreen backend
This patch disables four failing unit tests when executed with the
offscreen backend.

Change-Id: Ie67341b886984e6de19cd8dd8a8a237a620a1b7a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-12-01 14:14:45 +01:00
Andreas Buhr
bb3a53d917 Fix documentation of QMetaType::TypeFlag
QMetaType::TypeFlag::IsQmlListType was renamed to
QMetaType::TypeFlag::IsQmlList . This change was not reflected in
the documentation. This patch adapts the documentation to this change.

Task-number: QTBUG-88533
Pick-to: 6.0
Change-Id: I70be218f5f72b42aacb15ecd46972d5c808d86de
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-12-01 14:13:10 +01:00
Assam Boudjelthia
a8f6bad131 CMake: fix indentations in Qt6AndroidMacros.cmake
Pick-to: 6.0
Change-Id: I1403101fb2ab6a25ab1a2258f9a832f706b8b547
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-01 15:13:10 +02:00
Assam Boudjelthia
c730a29260 Android: print tailored warning if qml dependency path is a dir
androiddeployqt might be misleading when the path is adir
and the warning says that the file does not exist.

Pick-to: 5.15
Change-Id: I1129f49af58a0637a240fcfd425a61b2ed15c840
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2020-12-01 15:13:10 +02:00
Assam Boudjelthia
27dbb3ee54 Android: avoid reflection with ClipData addItem
Task-number: QTBUG-81687
Pick-to: 6.0 5.15
Change-Id: If07fff6f371d2c05cb61a1a7695c96219d0260d2
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-12-01 13:13:10 +00:00
Assam Boudjelthia
8499718351 CMake: don't add empty QT_ANDROID_APPLICATION_ARGUMENTS to Json
Pick-to: 6.0
Change-Id: I471da3f733046aeaa8381bbdeeba3ee2775b97eb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-01 15:13:09 +02:00
Andreas Buhr
20e341d495 Fix qdoc warning about unknown commands
Qdoc generated warnings like the following:
qt6-changes.qdoc:771: (qdoc) warning: Unknown command '\w'
This patch correctly escapes backslashes to fix these warnings.

Task-number: QTBUG-88533
Pick-to: 6.0
Change-Id: I7849f49fd0e950c3c366cfa88b299f827b39c05a
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
2020-12-01 14:13:09 +01:00
Volker Hilsheimer
2885a99c32 Fix compiler warnings from mixing signed/unsigned ints
Change-Id: I146203dd8b6dddabc0a7cf4b3db8a3fd379fc0c6
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-12-01 09:12:10 +01:00
Timur Pocheptsov
fe009bd514 tst_QSslError: improve the code coverage, as pointed at by LCOV
And also, reduce the utter sloppiness, weirdness of the test and
make it more a test and not a joke. Since the test itself depends
on !QT_NO_SSL, why bother building and running its main, to create
a useless tst_QSslError and do nothing then? Exclude test from
no-ssl build.

Pick-to: 5.15
Pick-to: 6.0
Change-Id: I67879b0de036cbc8c2f75a18f4cf94e6c43c5af0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-12-01 09:12:10 +01:00
Topi Reinio
ca8e9ff2ef Doc: Make \youtube macro work with litehtml help backend
Unlike the QTextBrowser backend, litehtml does not render elements
inside <iframe> correctly. This prevented external links to
YouTube from working in offline documentation.

Move the <iframe> to a macro override specific to online doc builds.

Pick-to: 6.0 6.0.0
Fixes: QTBUG-88975
Change-Id: Iff7828ddeed353620eaa9ac669a3e0c03749daa2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-12-01 08:12:09 +00:00
Toni Saario
7fd89ed63b Add instructions to build documentation
This enables documentation building in add-ons and other modules that
need to build docs.

Task-number: QTQAINFRA-3972
Change-Id: Ic2763d6d36d26e5a1267b312727c3c268ad6d114
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit e84e85dd4c59f2c79f81ba4d8d7f04397eb0003c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2020-12-01 08:12:09 +00:00
Ole-Morten Duesund
3c3737f88b Discourage the foreach keyword
Stop endorsing the foreach keyword, suggest C++11 range-based loops
instead.

Task-number: QTBUG-86584
Pick-to: 6.0
Change-Id: Icaf537aded6557b7864d731217e967ac56a84928
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-12-01 08:12:09 +00:00
Sona Kurazyan
bc46c7b8ea Fix perfect forwarding of callables in QFuture's continuations
Use universal references instead of rvalue references for passing
callables in the implementations of QFuture's continuations.

Change-Id: I1288c78f78f84f30c6607e505e7f9807a9272071
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit b002722dabef794da0e80010b115b2c6cd6dc6b8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2020-12-01 08:12:09 +00:00
Fabian Kosmale
a9ba5fe7aa QMetaProperty: Enable constructing only Data
Constructing a QMetaProperty can be unnecessarily expensive due to the
QMetaEnum resolution. Add a private method to construct only
QMetaProperty::Data. Make us of it in indexOfProperty.

Task-number: QTBUG-82931
Change-Id: If954538106bcfaa7d088db26591f6bd6eeaf3731
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-12-01 09:12:09 +01:00