Commit Graph

49584 Commits

Author SHA1 Message Date
Thiago Macieira
638171eb10 QCborValue: avoid allocating result if data is insufficient
Similar to the previous commit which applied to QCborStreamReader, don't
allocate too much data before checking that the stream actually has that
much.

Pick-to: 5.15 6.0
Fixes: QTBUG-88256
Change-Id: I7b9b97ae9b32412abdc6fffd16454b7568a063ba
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-12-06 07:51:19 +00:00
Thiago Macieira
9a55f40937 QCborStreamReader: avoid allocating result if data is insufficient
By calling the internal readStringChunk() function with a QByteArray
pointer, QCborStreamReader::readByteArray() can now avoid allocating the
resulting buffer until the internals have confirmed that there is
sufficient data in the incoming buffer. As a result, we first detect the
EOF condition before we conclude the payload would have been too big for
QByteArray (validation()) test. Meanwhile, the hugeDeviceValidation()
test ends up with a few conditions where it would have copied 1 GB of
data, so limit that too.

We make a choice of reporting OOM vs DataTooLarge only if QByteArray
fails to allocate in the first place (QByteArray::resize() ->
Q_CHECK_PTR -> qBadAlloc, QtCore is always built with exceptions on).

The QCborValue unit test needed a temporary work around until we apply
the same allocation fix (see next commit).

Pick-to: 5.15 6.0
Fixes: QTBUG-88253
Change-Id: I7b9b97ae9b32412abdc6fffd164523eeae49cdfe
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-12-06 07:50:57 +00:00
Thiago Macieira
c16ad16bd0 QCborStreamReader: move the readStringChunk code to the Private
And add a currently-unused QByteArray pointer parameter. This function
will resize the array as necessary as data comes in.

Pick-to: 5.15
Change-Id: I7b9b97ae9b32412abdc6fffd16451f5c6b280f3b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-12-05 01:26:51 -08:00
Ivan Solovev
2eb7d6073d QByteArray: update documentation
The QByteArray documentation is extended to align with QList and
QString regarding common wording and ideas:
- Extend general class description
- Revise description of several methods
- Wrap descriptions at 80 characters

Pick-to: 6.0
Task-number: QTBUG-87962
Change-Id: Ie9e8ef47a85d0867c2fa63889a60cafbe76ee47a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-05 05:06:28 +01:00
Thiago Macieira
aab5c8e548 QString/QByteArray: add missing Q_CHECK_PTR
So these two classes throw when trying to allocate silly sizes or in OOM
conditions.

We probably want to move these Q_CHECK_POINTER into QTypedArrayData but
I didn't want to do that in this commit.

Task-number: QTBUG-88256
Task-number: QTBUG-88253
Change-Id: Ifc61bb80b9bf48a386abfffd1648176111770174
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-12-04 20:04:14 -08:00
Aleix Pol
302254f90f Improve the documentation for QElapsedTimer::restart, include units
Specify that QElapsedTimer::restart returns milliseconds

Change-Id: I47d9ffde7b0f73c30b14d2ce8467ec0a553b58f8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-12-05 04:14:44 +01:00
Marc Mutz
105a66e654 Use (new) erase()/erase_if() algorithms
Change-Id: I45c18fd45c20b226e44d16315e3ebb6c305d4ab0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-05 00:47:44 +01:00
Alexey Edelev
f19266bd02 CMake: Add handling of TESTRUNNER and TESTARGS by Qt tests
Wrap Qt tests to handle TESTRUNNER and TESTARGS environment variables.
Variables are handled according to qmake build procedure. All test
now are wrapped by generated CMake script.

Fixes: QTBUG-88053
Pick-to: 6.0
Change-Id: I339977ce6ce11ddd38a4bf0bd26eb8f2ae463ba3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-04 21:42:53 +01:00
Allan Sandfeld Jensen
2b9a8b8d69 Add generic rb swap for RGB64 formats
Will also be needed by half-float formats.

Change-Id: Ia735b29b65287c63da5f1b5ec25428562d743800
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-12-04 19:21:38 +01:00
Giuseppe D'Angelo
a3e5efa8a2 Sequential containers: make removeIf/erase_if not detach unless needed
Employ the same kind of optimization existing for removeAll/erase.

Change-Id: I0781cc02d4430ceab60e6e50a5ffe6fde87be9ce
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-04 18:52:29 +01:00
Giuseppe D'Angelo
9ae0e21131 QList: make an indirect inclusion direct
Change-Id: Ief36ac375f5c26b4a5de6bc18ee3f2f777051024
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-04 18:52:16 +01:00
Andreas Buhr
987ee22690 Fix broken link to Zstandard library
The old link zstd.net is not working any more. Zstandard is now at
http://facebook.github.io/zstd/. To ease maintenance in the future,
those links now point to "Zstandard Site" which is maintained in
external-resources.qdoc.

Task-number: QTBUG-88533
Pick-to: 6.0
Change-Id: Ic8f067fd5d7ce1a088d0272797fca98fd506a26e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-04 18:47:13 +01:00
Tor Arne Vestbø
ecb61c17f5 doc: Remove dpiawareness command line argument
We don't want to (officially) expose customizations like this
to the user, now that high-DPI is always enabled and should
work.

Change-Id: I2f0bd7c625b565896b0766586f191ff5001eb60a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-12-04 17:45:20 +01:00
Mårten Nordheim
f8badeda72 QSslSocket: Don't call 'transmit' in unencrypted mode
At the same time I'll add a generic protection against being called in
unprotected mode in the schannel backend (openssl already has it in a
different form).

Pick-to: 5.15 6.0
Change-Id: I97c1be6239c27e306de0af7ad568fbcfde09da71
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-12-04 17:00:15 +01:00
Friedemann Kleint
e4395f3f68 Fix uic/rcc generating outdated export for Qt for Python
Bump version to 6.

Fixes: QTBUG-89124
Change-Id: Ifcf60552b5b6efb86f79da34da9c34b8efae9fa4
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit fc9cda5f08ac848e88f63dd4a07c08b2fbc6bf17)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2020-12-04 15:46:04 +00:00
Liang Qi
c48cb33810 tests: add a shortcut to quit app in allcursors
Pick-to: 6.0 5.15
Change-Id: I6b377cacfe05fc13c9f70e37247ed4da72f3f72e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-12-04 16:20:09 +01:00
Michal Klocek
5bad80173f Add qt chart mapping to cmake utils helper.py
Change-Id: I5d9e42dc221419c2f21a533f3fc27ce67ef84450
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-04 14:53:17 +00:00
Alexandru Croitor
24f12d0cef CMake: Build examples with qmake against a CMake built Qt
We want to remove the Qt .pro files for projects, except examples,
because examples are still meant to build with qmake.

To not lose coverage on examples built with qmake, add instructions that
will build the qtrepo/examples folder with qmake when the CMake
configuration has -DQT_BUILD_EXAMPLES=ON.

This means that such configurations will build examples both with CMake
and qmake.

Aside from making sure that our examples will still build with qmake, it
will gives us some some coverage that a CMake-built qmake works
correctly.

Implementation-wise, add new instructions files that can call qmake and
make depending on configuration and target type.

Pick-to: 6.0
Fixes: QTBUG-85986
Change-Id: Ie8f4cbcda03c94da2aef455e32f48dad41a4bdb0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-04 15:39:32 +01:00
Ivan Solovev
3d780c0d70 QtConcurrent: filter/map reduction without default ctor
Previously a default constructor was required for the result type
of mappedReduced() and filteredReduced(), even if a default value
was provided.

This patch fixes the problem.

The issue was in the ResultReporter type, that was calling
QList::resize() to adjust the size of expected reported results.
A default-value parameter was added to the class, so that
a corresponding overload of QList::resize could be invoked.

Task-number: QTBUG-88452
Change-Id: I51113753e314d76aa74d201b5a7e327a6ca75f47
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-12-04 15:36:50 +01:00
Allan Sandfeld Jensen
0c19e3f703 Fix QImage::setPixelColor on RGBA64_Premultiplied
QColors were not premultiplied before being set.

Pick-to: 6.0 5.15 5.12
Change-Id: Id3765b6932a72374ddfd788fae4bb628a4edf0b7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-12-04 15:09:47 +01:00
Edward Welbourne
0a01396e60 Purge double-spaces in qvectornd.cpp sentence-ends
Change-Id: I4b5692334a12374b8a6b4910d411d0eab240ce4b
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-12-04 15:09:47 +01:00
Edward Welbourne
c3ec3edb81 Indicate the limited locale selection in the POSIX backend
Change-Id: I82798de7ff313121144798969eed85c23e852d10
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-12-04 15:09:47 +01:00
Edward Welbourne
2b7c74d5ff Enable testing for whether a calendar registered its primary name
In registerAlias(), return true if this instance is already registered
with the given name.

Previously there was no way for a QCalendarBackend to tell whether its
primary name registration had succeeded, during instantiation (other
than by devious hackery using a QCalendar instance with the name and
some form of back-channel in the instance).

Use this in backendFromEnum() to catch cases in which (e.g. due to a
race condition) a new instance isn't the one that got registered.

Pick-to: 6.0 5.15
Change-Id: I468ac364a68bf3574cd7f8b8b1e672d8fd969111
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-04 15:09:46 +01:00
Andy Shaw
94c3c7a491 macOS: Make sure that the reserved characters are not escaped
The URL for the PAC proxy that is passed needs to be preserved for the
main URL part and not entirely percent encoded, only the query part
typically needs to be encoded. So use toEncoded instead for a URL to
ensure they are not percent encoded. This amends
c163ec1dbf

Pick-to: 6.0 5.15
Change-Id: Ie41ab55f71be8e25c18775e61ce7b4d110c2ddbf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-12-04 15:09:46 +01:00
Giuseppe D'Angelo
a1a55d5b93 QTestLib: add a abort-on-fail environment variable
When debugging a spurious failure it's extremely useful to
run the test repeadtly into a debugger until a failure appears.
When that happens, one wants to immediately start debugging.

In so far, this has only been possible by placing breakpoints
inside Qt itself (when a failure is logged). Add another way:
an env variable, similar to QT_FATAL_WARNINGS, that makes
any failure fatal (terminate() gets called. Bonus: you can
control the termination handler!)

[ChangeLog][QtTestLib][QtTest] When the QTEST_FATAL_FAIL
environment variable is set to a non-zero value, a test
immediately aborts its execution. This is useful to debug
intermittent failures.

Change-Id: If2395f964ea482c30b8c8feab98db7fdee701cd3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2020-12-04 14:09:46 +00:00
Fabian Kosmale
bc093cd294 QInputDevice: Parent default keyboard to core app singleton
With this we can avoid leaking the QInputDevice which is created when
the platform plugin does not provide any. The onwership is solved in a
similar way as in the plugins, except that here we have no parent which
really fits, so we use QCoreApplication::instance instead.

Pick-to: 6.0
Change-Id: I77a212fb592ba3d5a42b2ecd486763e3b4d3410e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-12-04 15:09:46 +01:00
Shawn Rutledge
94dfb18865 Make qDebug output for QTabletEvent similar to that for QMouseEvent
Reuse operator<<(QPointingDevice*) and move the button state right after
the event type.  Now it's easier to follow when a QTabletEvent is not
accepted and a mouse event is synthesized:

qt.quick.pointer QQuickWindowPrivate::deliverPointerEvent - delivering
  QTabletEvent(TabletPress LeftButton pos=100,100 z=3 xTilt=25 yTilt=35 pressure=0.5
     dev=QPointingDevice("Wacom Intuos3 6x8 Pen stylus" Stylus id=13 seat=30002 ptrType=Pen
       caps=Position|Pressure|MouseEmulation|Hover|XTilt|YTilt uniqueId=499602d2))
qt.quick.pointer QQuickWindowPrivate::deliverPointerEvent - delivering
  QMouseEvent(MouseButtonPress LeftButton pos=100,100 scn=100,100 gbl=3739,1029
    dev=QPointingDevice("Wacom Intuos3 6x8 Pen stylus" Stylus id=13 seat=30002 ptrType=Pen
      caps=Position|Pressure|MouseEmulation|Hover|XTilt|YTilt uniqueId=499602d2))

Change-Id: If22f1c07d32f595d0444513b49635218c08a300d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-04 11:22:38 +01:00
Alexandru Croitor
2f1c087573 CMake: Fix conditions for some subarch features
The AES and SHA features were checking for the wrong TEST_subarch_foo
variables.

Pick-to: 6.0
Task-number: QTBUG-87376
Change-Id: I46cd14d98832529aebac22cfcb01180330c5e091
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-12-04 11:22:38 +01:00
Alexandru Croitor
88e9e88a26 CMake: Mark qt-cmake-standalone-test as an executable on Unix
The source permissions are transferred when using configure_file for
non-prefix builds. This allows running qt-cmake-standalone-test in
both non-prefix and prefix builds.

Change-Id: I38829901d0bd4dfc4b89c665169798052b218fb0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-12-04 11:22:38 +01:00
Giuseppe D'Angelo
9afb3506b3 tst_qmakelib: link to QtCore's private API
Just like it was done in the .pro file.

Pick-to: 6.0
Change-Id: I7def52127f4bab6f0ef490ac7eee2de2da479352
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-04 11:22:38 +01:00
Mårten Nordheim
710886fbdd QSocks5SocketEngine: fix reference to dangling data
Following a41c61fb2d QIODevice may try to
copy the QByteArray itself (rather than the data it points to). This can
lead referencing dangling data when the QByteArray is initialized with
raw data.

Pick-to: 6.0
Change-Id: I481695b33f251f750ef482d72b81636f0d4bf462
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-04 11:22:38 +01:00
Allan Sandfeld Jensen
47923f7d47 Improve documented function argument names
Make them less \a fun.

Pick-to: 5.15 6.0
Change-Id: Ief9a572dcbeb029b18b352c89551963bade90198
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-12-04 11:22:37 +01:00
Fabian Kosmale
e236faa75f QBindable: Disallow mutation if read-only
If a QBindable is created from a computed property, it is not possible
to actually set a value or a binding. If we try to do it anyway, we'd
get a crash. Thus we now check whether the function pointer is null
before invoking it.

Pick-to: 6.0
Task-number: QTBUG-87153
Change-Id: I5bedb9080ccf79d9b8166b80d5733d095ed76f8d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-12-04 11:22:37 +01:00
Piotr Mikolajczyk
e1440dd7bc Android: Kill calls to deprecated func in API 29
Since API 29 functions:
 - getExternalStoragePublicDirectory
 - getExternalStorageDirectory
are deprecated and no longer return directly accessible path.

This patch replaces calls to those with suggested call to
Context.getExternalFilesDir(String)

Task-number: QTBUG-87803
Pick-to: 5.15 5.12 6.0
Change-Id: I36bc5d5b72a80017996445af0d577aacf5e112d3
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-12-04 06:29:07 +00:00
Christian Ehrlicher
6efe11dd75 Remove unneeded qatomic_msvc.h
Since Q_COMPILER_ATOMICS is defined for every supportied MSVC compiler
in qcompilerdetection.h, qatomic_msvc.h is not included anymore in
qbasicatomic.h and can be removed.

Change-Id: I6505da5d5e9f1c3f9a060ad30cabb4b652634aa3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-04 07:04:11 +01:00
Lars Knoll
57e9d9e38e Dont' return a const ref to QModelIndex
The conversion operator from QPMI to QModelIndex should return by
value, to hide implementation details and so that we don't have to
rely on a static empty QModelIndex.

Change-Id: I92b3f8451422f2b69bf31f28b387a124fd24ec46
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 0cd2935ed9d772f0eb06d03201baabd60764ec80)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2020-12-04 06:00:50 +00:00
Lars Knoll
6012285e7d Fix hashing of QPersistentModelIndex
The hash and equality operators used need to be consistent with
each other. Unfortunately, QPMI::operator==() is not suitable to do
this. So specialize qHashEquals() for QPMI.

Fixes: QTBUG-88966
Change-Id: If5f19a722ae9fc4e78e93537e7ea15726f148768
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 83e95956ed58e88b11e2cc3cb61c5beacb7985db)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2020-12-04 06:00:38 +00:00
Lars Knoll
793dbd8ee6 Add a qHashEquals() method and use it to compare keys in QHash
In some cases, the default equality operator for a class is not suitable
for using in hashing (for example because it uses fuzzy comparisons).

Add a qHashEquals() method that by default uses the equality operator, but
allows to tailor the operations that should be used when using the class
as a key in QHash.

Task-number: QTBUG-88966
Change-Id: I346cf0e6e923277a8b42a79e50342a1c2511fd80
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 5d8b586e73e37070b0303bee24372550854637eb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2020-12-04 06:00:21 +00:00
Li Xinwei
013abe3206 CMake: Avoid MSVC C4996 warnings
The qmake build system defines _CRT_SECURE_NO_WARNINGS in
mkspecs/features/qt_module.prf, the cmake build system should do the
same thing in qt_internal_add_module().

Adding this definition can avoid warnings like:
warning C4996: 'strncpy': This function or variable may be unsafe.

As a special case, Bootstrap uses add_library() instead of
qt_internal_add_module(), so _CRT_SECURE_NO_WARNINGS should also be
defined in src/tools/bootstrap/CMakeLists.txt.

Pick-to: 6.0
Change-Id: Ic82193d177f82785fd84948efa78c49ca8d8db46
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-04 13:54:49 +08:00
Alexandru Croitor
f071ba31b2 CMake: Fix arch parsing for oss-fuzz
I'll preface by saying, it's not clear to me why the behavior is
different.

Our qt_run_config_test_architecture function builds a target
executable, and then uses file(STRINGS) to try and parse out some
magic strings that we expect the executable to have (architecture,
abi, etc).

In qmake this was done by matching with a regular expression ending on
a \\0 null byte character.

In CMake, we do a string(FIND) and string(SUBSTRING until the end of
the line) on a *line* returned from file(STRINGS). Notably, I did not
find any regexp syntax provided by CMake to try and match a null byte
character.

Note the docs for file(STRINGS) implies to me that *lines* are
detected by looking for newline characters '\n'. The docs also
mention that binary data in the file is ignored. What's binary
data though?

If you open the executable with a hex editor, at least on macOS, the
strings we are interested in are indeed separated by null byte chars,
not newline chars.

On most platforms file(STRINGS) did end a line on the null byte
character.
Except, for some reason not when building Qt for the oss-fuzz project
with clang under Docker.

Calling message() on one of the lines prints a very long string with
null characters seemingly replaced with semicolons, and of course the
matched architecture string is wrong and fails configuration.

For *some reason*, if I add a "REGEX ==Qt=magic=Qt==" option to the
file(STRINGS) command, the captured output lines don't contain
semicolons even when building for oss-fuzz.

The extracted strings are then correct, and configuration succeeds.

Use the REGEX option workaround, with the aim to quickly fix Qt
building for oss-fuzz for 6.0.1 release.

Pick-to: 6.0
Fixes: QTBUG-89047
Change-Id: Iad11c1090c1187aadd39082f196050bf3290df95
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-12-04 06:14:03 +01:00
Volker Hilsheimer
ec1ac2f1b2 Fix compiler warning from discarded return value
Amend 53b7cb1bd7, match() is only used
to provoke data races.

Change-Id: Id20b11fedf7f20e74baab15bbb60c995c1a0c794
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-04 00:17:46 +01:00
Giuseppe D'Angelo
89def082c6 QTestLib: allow for non-zero values in env variables
The usual behavior for env variables is that any nonzero
value means "enable", so do the same for a couple of QTestLib
env vars. While at it: document them.

Change-Id: I854285df5d7af5be771f9d6532ddec5d8a6f8987
Pick-to: 6.0
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-12-04 00:17:46 +01:00
Mårten Nordheim
a7610a0cf7 tst_qstorageinfo: Test the copy ctor
It was previously untested

Task-number: QTBUG-88183
Pick-to: 6.0
Change-Id: Icc59fc632957a75cac8c7f5e2a1aed88a1c9ff9d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-12-03 23:17:46 +00:00
Mårten Nordheim
0592369df4 tst_qnetworkreply: stabilize and unblacklist getFromHttpIntoBuffer2
The test in general is fine, but it was making an assumption that the
first 5 readyRead emissions would never result in the whole message
being received. In certain scenarios with slowdown however it was still
possible that we would receive the whole message after just a few
readyReady emissions. While I didn't check it's most likely due to a
mechanic in the QNetworkReply machinery where we suppress some
emissions if we know there's more data just about to be available.

Task-number: QTBUG-88943
Change-Id: I0cf06edb34d4e86cc8a42c0f1cd7e8c35765f6ee
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-12-04 00:17:46 +01:00
Mårten Nordheim
27f52942b4 tst_QTcpSocket: stabilize connectToHostError
It's not _wrong_ to time out when connecting to something unreachable
(it's just a different way of handling it) so we shouldn't fail when
this happens either.

In local testing (windows) it times out after 8 seconds, so bump
the timer to 10 seconds. On systems where it's faster there'll be
no difference as long as things don't go wrong.

Pick-to: 6.0
Fixes: QTBUG-89089
Change-Id: I8437cf8e4fbecedea2391ed87fdce1213085b964
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-12-04 00:17:46 +01:00
Alexey Edelev
af0a9375f3 CMake: Improve long paths handling for static builds
Use number-based naming of object libraries produced for generated
resources. This reduces path length of subdirectories for object
library targets.

Amends 08eb485a006dc2baca42eb280ae60e9f0fc00dff

Pick-to: 6.0
Change-Id: I1a449290e8a9b969601a1cc1abc6fdcfc0cd9454
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-03 20:21:35 +01:00
Andreas Buhr
604a8c7acc Fix documentation of QStringTokenizer
Documentation of QStringTokenizer was broken, mainly because most
parts of the interface were defined in base classes. This patch
gets those members into QStringTokenizer itself in order to document
them.

Task-number: QTBUG-88533
Pick-to: 6.0
Change-Id: Id00a79db4b293958a9c5ed53a518a97721d228c0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-03 20:21:35 +01:00
Andreas Buhr
d7828a5ed3 Remove non-existent function QApplication::desktop() from docs
The method QApplication::desktop() was removed. This patch removes
a line mentioning it in the documentation.

Task-number: QTBUG-88533
Pick-to: 6.0
Change-Id: I123e41c342d64da347b9bd59378e52a8e0301c1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-03 20:21:35 +01:00
Andreas Buhr
15cd7d7741 Fix documentation warnings about QCollator property
The documentation of ignorePunctuation in QCollator did not strictly
follow conventions, leading to warnings in building the documentation.
This patch fixes this.

Task-number: QTBUG-88533
Pick-to: 6.0
Change-Id: Ia1273ec8e440099afe729b54423760ad5ac26290
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-03 20:21:34 +01:00
Joerg Bornemann
e32e4898dd CMake: Fix QMAKE_LIB_<NAME> variable names in module .pri files
QMake libraries that contain dashes are referenced by QMAKE_USE as is,
but the corresponding QMAKE_LIB_<NAME> variable must be normalized to
contain underscores.

Example from the qmake build:

./mkspecs/modules/qt_lib_waylandclient.pri
11:QT.waylandclient.uses = wayland-client xkbcommon wayland-cursor

./mkspecs/modules/qt_lib_waylandclient_private.pri
12:QMAKE_DEPENDS_WAYLAND_CURSOR_CC = WAYLAND_CLIENT
13:QMAKE_DEPENDS_WAYLAND_CURSOR_LD = WAYLAND_CLIENT
15:QMAKE_LIBS_WAYLAND_CURSOR = -lwayland-cursor

Pick-to: 6.0
Change-Id: If31bd45764d52f97d80d6388503008dc1ffb16ab
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-03 17:18:23 +01:00