Commit Graph

49775 Commits

Author SHA1 Message Date
Giuseppe D'Angelo
427da06414 QRE: discourage users from assuming that QRE stores the subject
When matching over a QString we store a (shallow) copy of it.
That has always been an implementation detail and people should've
never relied on it, but Hyrum's law, we don't want to actually
exploit this by NOT taking the copy.

Converesely, matching over QStringView already requires that
the string data is kept alive as long as QRE(Match) objects
are alive.

Add a doc note to give us the freedom to do the change in Qt 7.

[ChangeLog][QtCore][QRegularExpression] QRegularExpression takes
a shallow copy of a QString subject when matching over it. This
means that users can destroy or modify the string data while
still having match results over it. This behavior is deprecated;
in a future version of Qt, QRegularExpression will no longer
take a copy. Note that behavior has always been undocumented and
users were never supposed to modify a subject string while
match objects were alive on it. In practice, it's very unlikely
that your code is relying on the existing behavior.

Change-Id: Ibc5f900c09a007139fb12fc4d7f11e4a8f31bf38
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-03 06:51:14 +01:00
Giuseppe D'Angelo
1ebccf3426 QString::fromUtf8: remove a stray cast to int
Change-Id: I0dba7ba130c3fa96eda63a0fa1a39c5f0bb863b7
Pick-to: 6.0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-03 06:50:54 +01:00
Giuseppe D'Angelo
53b7cb1bd7 QRegularExpression: plaster some [[nodiscard]]
On some of the "most important" API.

Change-Id: I800b53bb7b9a95d0184f813e7ba501a7ebd485c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-03 06:50:46 +01:00
Giuseppe D'Angelo
553d4ec464 QString: plaster more and more [[nodiscard]]
The situation was quite inconsistent. Use the attribute more.

Change-Id: If21817b4c2ea1148ad4ad80e7a50fab721a58b65
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-03 06:50:37 +01:00
Yuya Nishihara
d9a6517076 Dialog: Fall back to transient parent to make dialog window get centered
Unlike QWidget-based application, a dialog displayed in QML app doesn't
have QWidget parent, so it would be centered in the current screen.
Let's fall back to transient parent window if widgetParent() is missing.

It's tempting to rewrite adjustPosition() to not depend on QWidget at all,
but that seems not easy. Lookup path of window() and transientParentWindow()
is slightly different for example, and QWidget::pos() is used instead of
mapToGlobal({0, 0}) if the widget is embedded into a native window.

Fixes: QTBUG-63406
Change-Id: If72d90aee8d972240243184de4d3c09d77f704ff
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-12-03 14:43:42 +09:00
Qiang Li
d6dcf508a6 Adjust the format of code blocks in function mouseReleaseEvent
Pick-to: 6.0
Change-Id: I8441b1c4f22ec04e34e8c2c5e9ccc69d34c67e01
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-03 02:19:15 +00:00
David Skoland
3ca921293a Add test for qRound
Add test for qRound that covers some edge cases for rounding. Note that
as of right now, this test fails and the docs have been updated to warn
that it should not be depended on for strict correctness.

Change-Id: I1a61bca47abd77855fe7c13ded44e913cc7e8722
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-02 21:24:19 +01:00
Andreas Buhr
c3ffa6036b Fix QSet::insert documentation
Documentation for QSet::insert was wrong, leading the warning
qset.qdoc:510: (qdoc) warning: clang couldn't find function when parsing
\fn iterator QSet::insert(const_iterator it, const T &value)
This patch fixes it.

Task-number: QTBUG-88533
Change-Id: I587cbae5674b9f38e37753a20c3c3f0d770980d6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-02 17:08:50 +00:00
Andreas Buhr
3c0614b779 Document QMultiHash::clear function
When QMultiHash derived from QHash, it inherited the clear function
and no separate documentation was necessary. Now, QMultiHash::clear
needs its own documentation. This patch adds it.

Task-number: 88533
Pick-to: 6.0
Change-Id: I93c59b66aa3d8ccf1888b6e24a4cc47004318e37
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-02 18:08:38 +01:00
Timur Pocheptsov
89734289d5 tst_qnetworkreply: cleanup BLACKLIST
Which contains a lot of 'macos'/'osx' black-listed auto-tests. They
mostly fail with SecureTransport (on BigSur) because SecTrustEvaluate()
does not like our old certificate. Instead, since SecureTransport
is deprecated anyway and we are not planning to develop it in future,
skip the related auto-test depending on QT_CONFIG(securetransport).

Task-number: QTBUG-88943
Change-Id: I5f6cb7b2d0ea15c445603c1ff3e1700f123c28d1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-12-02 17:39:06 +01:00
Mårten Nordheim
dcb10dfe81 Unblacklist tst_qnetworkreply getFromHttp
It was blacklisted due to the issue there. The issue is resolved, but
the blacklist stayed.

Task-number: QTBUG-88943
Change-Id: I7d9a660a17c1463dd8b654752ed5787fe5f5af24
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-12-02 17:39:04 +01:00
Giuseppe D'Angelo
b70ddde4b6 CMake: mention the QT_BUILD_X_BY_DEFAULT=OFF
Which is probably the direct port of -nomake XXX, as qmake
always offered the way to build tests/examples/etc. after
configuring without, while cmake doesn't.

Pick-to: 6.0
Change-Id: I85b039e56cde3ddfaf661385100d3c3a8cc2ac16
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-02 17:22:27 +01:00
Eskil Abrahamsen Blomfeldt
34fa01be82 Fix tst_QFontDatabase::aliases failure with ambiguous font
If the first font in the families list happens to have been
disambiguated because of duplicates, two things went wrong:

1. hasFamily() would return false for the font family, because
it does not disambiguate when checking for the family name and
only checks if the families list contains the exact string.

2. Adding aliases to the full disambiguated string is not supported,
only the family name.

The first issue has been reported separately as QTBUG-89068.

The test failure is fixed by just avoiding the fonts that
are ambiguous in the test, as it really doesn't matter which
font we pick.

Fixes: QTBUG-89008
Pick-to: 5.15 6.0
Change-Id: I829778c2e7bb6090475c34dcf9cdce58862729d6
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-12-02 16:22:27 +00:00
Giuseppe D'Angelo
e12e2b43b7 Associative containers: add erase_if
Use a trick similar to the one we use for their ranged
constructors: support predicates that either take a
container's iterator, or that take a std::pair (for STL
compatibility).

[ChangeLog][QtCore][QMap] Added removeIf() and erase_if().

[ChangeLog][QtCore][QMultiMap] Added removeIf() and erase_if().

[ChangeLog][QtCore][QHash] Added removeIf() and erase_if().

[ChangeLog][QtCore][QMultiHash] Added removeIf() and erase_if().

Change-Id: Ie40aadf6217d7a4126a626c390d530812ebcf020
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-02 10:35:14 +01:00
Wang Yu
9341f2e3d0 Reduce the scope of variable in focusInEvent()
The scope of the variable 'frm' can be reduced if the variable
'd->formatExplicitlySet' is true. So declare the variable when
the variable 'd->formatExplicitlySet' is false.

Change-Id: I27cea412af827d30ad9188106b7f14025e5ddb68
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-02 17:26:37 +08:00
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