Commit Graph

482 Commits

Author SHA1 Message Date
Alex Trotsenko
5d68858ba7 QLocalSocket/Win: fix waitFor...() functions for write-only socket
There were several issues with the socket state checking when the pipe
reader is not running:

  - the number of object handles in the WaitForMultipleObjectsEx()
    call might have been zero;
  - a call to the waitForDisconnected(-1) might have hung;
  - we did not perform a loop iteration for the waitFor...(0) calls,
    so disconnect detection was unreliable.

These issues are related to the same code, so they don't seem to be
addressable separately.

Change-Id: I3bca872bb4191e6a7d38a693d81f7981af7fe145
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-09-02 08:47:11 +03:00
Alex Trotsenko
21f3ff65b8 QLocalSocket: do not emit aboutToClose() twice
This signal is emitted by the QIODevice itself, so we don't have to
forward it from the internal socket.

Pick-to: 6.1 6.2
Change-Id: I85745f36d7a27d92f339a9184de3b6e5d46f6f34
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-08-01 10:50:15 +03:00
Alex Trotsenko
921ff400bb QLocalSocket/Win: allow delayed close to work
This mechanism was neither properly designed nor correctly tested
initially on Windows.

[ChangeLog][QtNetwork][Important Behavior Changes] QLocalSocket on
Windows now implements delayed closing, which is consistent with
the behavior on Unix.

Change-Id: Ic3bc427e68eea7f18201f6129df19fbc87d68101
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-07-25 10:06:27 +03:00
Alex Trotsenko
f18d8fd1fb QLocalSocket/Win: do not close the device on disconnectFromServer()
It's the user's privilege to do so when they want to finish reading the
QIODevice. Moreover, this is the only difference between close() and
disconnectFromServer().

[ChangeLog][QtNetwork][Important Behavior Changes] The Windows
implementation of QLocalSocket::disconnectFromServer() no longer calls
close(), which is consistent with the behavior on Unix.

Change-Id: Ie9ce20c60259a2b08f5254b719355bd7be9b17cd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-07-24 21:46:44 +03:00
Alex Trotsenko
6481733d45 QLocalSocket/Win: do not flush the pipe in disconnectFromServer()
In the case where we have pending data to write, calling flush() here
may cause the device to close immediately, if the pipe writer already
got a result of the last operation from the thread pool. In this
scenario, the device does not enter the 'Closing' state, which leads
the following code to unexpectedly fail on Windows

  socket.write(...);
  socket.disconnectFromServer();
  QVERIFY(socket.waitForDisconnected());

Removing the call to flush() makes the behavior consistent with the
implementation on Unix.

Change-Id: Ic31fbc999be979c1e5befa8f132d9fb367f472ca
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-07-24 16:55:43 +03:00
Alex Trotsenko
d9c0af92bd QLocalSocket/Unix: fix aborting the socket
According to the documentation, calling abort() should immediately
reset the socket to its initial state. This includes:

  - closing the file descriptor;
  - closing the QLocalSocket as an I/O device;
  - canceling a pending outgoing connection, if it exist;
  - reseting 'serverName' string.

So, adding a call to close() resets the state entirely.

Pick-to: 6.1 6.2
Change-Id: I9c604b5187c6300b437d7aa4c2d06db03edacf21
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-07-24 11:52:30 +03:00
Daniel Nicoletti
e095fa7f9c Allow to set TCP network listen(2) backlog
Qt has a hardcoded backlog value of 50,
this allows for applications to tune this
value. Modern kernels have the SYN cookie
feature that reduces pressure from an
flood attack, the backlog setting however
is then a queue for most likely real
completed (SYN/ACK) connections hence, it's
easy to get clients connections dropped
with this very small limit.

[ChangeLog][QtNetwork][QTcpServer] Added
QTcpServer::setListenBacklog() to be able
to have control over the listen backlog feature.

Change-Id: I1c78af6d99e012591e214b7e09fa85c485880d48
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-07-19 17:05:53 -03:00
Alex Trotsenko
6c1bc7798b QLocalSocket/Win: destroy the pipe before emitting final signals
Both readChannelFinished() and disconnected() signals should be emitted
after closing the pipe. Otherwise, these signals do not correspond to
the state of the socket and may even be resent, if a slot connected to
one of these signals processes events.

[ChangeLog][QtNetwork][Important Behavior Changes] QLocalSocket on
Windows now emits both readChannelFinished() and disconnected() signals
after closing the pipe and emitting stateChanged(UnconnectedState),
which is consistent with the behavior on Unix.

Pick-to: 6.2
Change-Id: I1cc551b7897fdba3cec1fd6705f5396790818c7d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-07-14 20:48:54 +03:00
Joerg Bornemann
72a90810cb CMake: Remove the usage of QT_SOURCE_TREE from tests
The ${QT_SOURCE_TREE}/src/network include paths of several tests are
apparently not needed anymore. Remove those.

tst_qfilesystementry and tst_qfreelist are the only tests that actually
need to reference files in qtbase's source tree. Simply use the paths
relative to the project file.

Task-number: QTBUG-88090
Change-Id: Ic6f341e001338c1b07dce6e58316245bc9560c5e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-12 18:56:14 +02:00
Alex Trotsenko
1a57a4974b QLocalSocket/Win: reimplement skipData() function
The base implementation discards the data by reading into a dummy
buffer, which is slower than necessary.

Change-Id: Iabf0c4a25746af6cac5b61d7bda66d89501c808c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-07-08 16:14:11 +03:00
Alex Trotsenko
03272e601c Clarify readLine() behavior on sequential devices
QIODevice::readLine() can also return partial lines, which was not
properly documented. Add an autotest for QLocalSocket to illustrate
and test this behavior.

Pick-to: 6.2
Change-Id: Ia2c1c438cc68d2672d34881e11fdf7837232f3b4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-07-06 14:50:55 +03:00
Marc Mutz
0ed1f8b54e tests: fix deprecated implicit capture of this via [=]
Fixes compiler warnings:
    warning: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20 [-Wdeprecated]

Change-Id: Ia7cf50f491e92f39162c69afb2a8320afedba056
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2021-06-30 23:13:28 +02:00
Edward Welbourne
a93a9ea915 Fix QFAIL() to interract correctly with QEXPECT_FAIL()
Previously, it went direct to QTestResults::addFailure() without going
via the checking for expected failure. Add QTestResults::fail() to
take care of this checking, as for verify() and compare().

Tidied up the code implementing expected failure and QFAIL(), while I
was about it. Adjusted an existing test to verify that expecting a
QFAIL() works, by using QFAIL() instead of QVERIFY(false).

Remove the QVERIFY(false) whose comment brought this to my attention.

[ChangeLog][QtTestLib][QFAIL] QEXPECT_FAIL() now correctly anticipates
a subsequent QFAIL(). Previously QFAIL() counted as a fail regardless.

Change-Id: Icc28cf70e5ff3006363791ea03aa01f2f591eb71
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-06-15 18:55:16 +02:00
Tor Arne Vestbø
7f4ec4ed88 Blacklist tst_QTcpServer::linkLocal on macOS ARM
Amends d790e9fda9.

Change-Id: If17a9e2f3f9858c0850006f48242248c4b812e27
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-05-26 21:24:40 +02:00
Tor Arne Vestbø
d790e9fda9 Blacklist problematic network auto-tests on macOS ARM
QNetworkInterface reports as up and running an interface,
seemingly having a valid IP address which actually has
not IPv4/IPv6 configured at all (this is what getifaddrs
gives us).

Change-Id: I5808d5dfdbc54004a1e02b791917e9b2ba62905f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-05-26 12:49:56 +02:00
Alex Trotsenko
72d1a54763 QWindowsPipeReader: determine pipe state before signaling
The 'pipeBroken' flag must be updated before emitting the readyRead()
signal to avoid deadlock of waitForReadyRead() inside slot connected
to readyRead().

Change-Id: Ie393fdd594c6691da6609ea18307589b7157c624
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-04-06 11:27:41 +03:00
Piotr Mikolajczyk
2e3f48637e Linux: Add abstract address support for QLocal{Socket,Server}
Takes advantage of Linux's and Android's support for abstract namespace
when binding sockets, which is independent of the filesystem (see man
entry for unix domain sockets).

To make QLocalServer and QLocalSocket use an abstract socket address,
one needs to set the socket options to QLocalServer::AbstractNamespaceOption.

Fixes: QTBUG-16090
Change-Id: Ia9f9c9cc1ac5c28f9d44b0a48d854a7cfbd39b11
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-01 06:57:04 +01:00
Alex Trotsenko
f265c87e01 Allow QWindowsPipe{Reader|Writer} to work with foreign event loops, take 2
When a foreign event loop that does not enter an alertable wait state
is running (which is also the case when a native dialog window is
modal), pipe handlers would freeze temporarily due to their APC
callbacks not being invoked.

We address this problem by moving the I/O callbacks to the Windows
thread pool, and only posting completion events to the main loop
from there. That makes the actual I/O completely independent from
any main loop, while the signal delivery works also with foreign
loops (because Qt event delivery uses Windows messages, which foreign
loops typically handle correctly).

As a nice side effect, performance (and in particular scalability)
is improved.

Several other approaches have been tried:
1) Using QWinEventNotifier was about a quarter slower and scaled much
   worse. Additionally, it also required a rather egregious hack to
   handle the (pathological) case of a single thread talking to both
   ends of a QLocalSocket synchronously.
2) Queuing APCs from the thread pool to the main thread and also
   posting wake-up events to its event loop, and handling I/O on the
   main thread; this performed roughly like this solution, but scaled
   half as well, and the separate wake-up path was still deemed hacky.
3) Only posting wake-up events to the main thread from the thread pool,
   and still handling I/O on the main thread; this still performed
   comparably to 2), and the pathological case was not handled at all.
4) Using this approach for reads and that of 3) for writes was slightly
   faster with big amounts of data, but scaled slightly worse, and the
   diverging implementations were deemed not desirable.

Fixes: QTBUG-64443
Change-Id: I66443c3021d6ba98639a214c3e768be97d2cf14b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-03-02 22:53:06 +02:00
Andreas Buhr
a944de7742 Fix some warnings about virtual/override
This patch marks some functions "override" to silence the corresponding
warning.

Change-Id: I88ccc5fa7521ecccc84a6cba9f06ea185cc5679e
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2021-02-23 15:15:45 +01:00
Samuli Piippo
0ce443691f Move QEMU emulation detector to QTest
The emulation detection has been usable only on qtbase tests, move it to
QTest so that it can be used in other modules as well.

Pick-to: 6.1
Change-Id: I4b2321b7856414d7b1cfd5e6b1405a633c6bb878
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-02-13 10:02:51 +02:00
Allan Sandfeld Jensen
bde773ec6a Fix a few compiler warnings in tests
Change-Id: I22f6ac8ed02dd4ef4083ce3c781552623a0b08da
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-02-02 12:06:05 +01:00
Timur Pocheptsov
7687e2a429 Port QLocalServer to the new property system
Task-number: QTBUG-85520
Change-Id: Iee43a2e9e2d4847dad3b8be345d562af9aa3b690
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2021-01-27 16:54:46 +01:00
Joerg Bornemann
04f11f9935 Remove .prev_CMakeLists.txt files
Those serve no purpose anymore, now that the .pro files are gone.

Task-number: QTBUG-88742
Change-Id: I39943327b8c9871785b58e9973e4e7602371793e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-01-12 20:59:13 +01:00
Joerg Bornemann
ad2da2d27a Remove the qmake project files
Remove the qmake project files for most of Qt.

Leave the qmake project files for examples, because we still test those
in the CI to ensure qmake does not regress.

Also leave the qmake project files for utils and other minor parts that
lack CMake project files.

Task-number: QTBUG-88742
Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-01-07 15:32:28 +01:00
David Skoland
27d96b4789 Replace QtTest headers with QTest
Complete search and replace of QtTest and QtTest/QtTest with QTest, as
QtTest includes the whole module. Replace all such instances with
correct header includes. See Jira task for more discussion.

Fixes: QTBUG-88831
Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44
Pick-to: 6.0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-22 15:20:30 +01:00
Friedemann Kleint
a46a723dba Tests: Fix building with qmake on Windows
Apparently some library definitions went overboard, link them directly.

Pick-to: 6.0
Change-Id: I009737f7e3edff5619241b700a627dc4e25e6018
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-12-17 13:02:15 +01:00
Alexandru Croitor
2304acab5f CMake: Regenerate projects using pro2cmake one last time
And fix up some wrong qmake project files

Pick-to: 6.0
Change-Id: I66cb82aeb9c1419a74df1a650fa78a511ade7443
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-12-10 11:52:30 +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
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
Timur Pocheptsov
4111d8e8e7 tst_QTcpSocket::connectToHostError - handle possible timeouts
... instead of failing the test. On Ubuntu 20.04 when calling
'connect' with 0.0.0.1 we get EINPROGRESS and nothing else,
since our own internal timer has 30 s. timeout, the event loop
in the test stops before this and no socket error detected yet.
Handle such situation without failing a test.

Fixes: QTBUG-88042
Change-Id: Id6add27fcf9bbbe5fbf83a193652edf08fbad8d6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-11-20 14:34:04 +01:00
Kai Koehne
ce29ce586f Revert "Allow QWindowsPipe{Reader,Writer} to work with foreign event loops"
This reverts commit ee122077b0.

Reason for revert: This causes QProcess::readAll() to sometimes
return nothing after the process has ended.

Fixes: QTBUG-88624
Change-Id: I34fa27ae7fb38cc7c3a1e8eb2fdae2a5775584c2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 23100ee61e33680d20f934dcbc96b57e8da29bf9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2020-11-20 13:28:31 +00:00
Alex Trotsenko
ee122077b0 Allow QWindowsPipe{Reader,Writer} to work with foreign event loops
When a foreign event loop that does not enter an alertable wait state
is running (which is also the case when a native dialog window is
modal), pipe handlers would freeze temporarily due to their APC
callbacks not being invoked.

We address this problem by moving the I/O callbacks to the Windows
thread pool, and only posting completion events to the main loop
from there. That makes the actual I/O completely independent from
any main loop, while the signal delivery works also with foreign
loops (because Qt event delivery uses Windows messages, which foreign
loops typically handle correctly).

As a nice side effect, performance (and in particular scalability)
is improved.

Several other approaches have been tried:
1) Using QWinEventNotifier was about a quarter slower and scaled much
   worse. Additionally, it also required a rather egregious hack to
   handle the (pathological) case of a single thread talking to both
   ends of a QLocalSocket synchronously.
2) Queuing APCs from the thread pool to the main thread and also
   posting wake-up events to its event loop, and handling I/O on the
   main thread; this performed roughly like this solution , but scaled
   half as well, and the separate wake-up path was still deemed hacky.
3) Only posting wake-up events to the main thread from the thread pool,
   and still handling I/O on the main thread; this still performed
   comparably to 2), and the pathological case was not handled at all.
4) Using this approach for reads and that of 3) for writes was slightly
   faster with big amounts of data, but scaled slightly worse, and the
   diverging implementations were deemed not desirable.

Fixes: QTBUG-64443
Change-Id: I1cd87c07db39f3b46a2683ce236d7eb67b5be549
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-11-17 12:45:50 +02:00
Assam Boudjelthia
039d3fe4e8 Android: blacklist a list of failing tests for android
We want to re-enable Android tests in QTQAINFRA-3867. However,
many tests are failing already preventing that from happening.
QTBUG-87025 is currently keeping track (links) to all of those
failing tests.

The current proposal is to hide those failing tests, and enable
Android test running in COIN for other tests. After, that try
to fix them one by one, and at the same time we can make sure
no more failing tests go unnoticed.

Task-number: QTBUG-87025
Change-Id: Ic1fe9fdd167cbcfd99efce9a09c69c344a36bbe4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-04 12:27:49 +02:00
Liang Qi
2731718633 tests: blacklist tst_QTcpSocket::connectToHostError()
on Ubuntu 20.04.

Task-number: QTBUG-88042
Change-Id: Ie63cd26b6885b73073251e20cb4e8ba5da36d906
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-10-30 13:27:14 +01:00
Liang Qi
53da9f5816 tests: blacklist tst_QUdpSocket::multicast() on CentOS
Task-number: QTBUG-84254
Change-Id: Icf50e7c85a0434ecdf29ae70776b274789b9eb45
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2020-10-28 16:13:33 +01:00
Lars Knoll
a618c260ed Fix and run the qlocalsocket autotest with cmake build
Change-Id: I79691fe97e1373ffdc6a1b9b929f8a3fc2ef863d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-10-23 09:58:37 +02:00
Alex Trotsenko
53b4556332 QLocalSocket/Win: prevent writing to broken pipe
When a peer closes the connection, the device remains opened for reading
purposes. However, we should disable writing on disconnected socket.
Otherwise, if the user issues a write() call, a new pipe writer object
will be created and the write call occurs with invalid handle value.

Pick-to: 5.15
Change-Id: Id136798c7663df1fce7ed0aa4e3c6f5c65218a11
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-10-15 22:56:35 +03:00
Timur Pocheptsov
cd6d53610a tst_QTcpSocket::connectToHostError - increase the timeout
As suggested by the message from QTestLib. This, indeed, fixed the
sadistic test. Also, make sure resources are not leaked.

Pick-to: 5.15
Fixes: QTBUG-87009
Change-Id: Id693a5a562ea5ebacc853e5fc0ab9654ba851e72
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-10-08 22:09:44 +02:00
Allan Sandfeld Jensen
564b59d903 Another round of replacing 0 with nullptr
This time based on grepping to also include documentation, tests and
examples previously missed by the automatic tool.

Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-10-07 23:02:47 +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
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
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
Alexandru Croitor
403213240c CMake: Regenerate projects to use new qt_internal_ API
Modify special case locations to use the new API as well.
Clean up some stale .prev files that are not needed anymore.
Clean up some project files that are not used anymore.

Task-number: QTBUG-86815
Change-Id: I9947da921f98686023c6bb053dfcc101851276b5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-23 16:59:06 +02:00
Alexandru Croitor
a3bd80c08c CMake: Regenerate projects
Clean up the state of the projects,
before changing the internal CMake API function names.

Task-number: QTBUG-86815
Change-Id: I90f1b21b8ae4439a4a293872c3bb728dab44a50d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-09-22 19:08:53 +02:00
Cristian Adam
0aa4b33b92 CMake Build: Add qtnetwork docker testserver support
qt_add_test supports now QT_TEST_SERVER_LIST, which will add the test
servers as docker test fixtures.

The docker server will be started before the test is run, and stopped
after the test is run.

Running the tests in parallel is not supported.
Docker tests are currently only supported on Linux hosts.

Task-number: QTBUG-85034
Change-Id: If3cefe05c5dec19c14b05d2fa8b01a0b6d95e259
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-17 00:11:04 +00:00
Lars Knoll
2c698a6d07 Fix compiler warnings about missing overrides
Change-Id: I52bf9fe45607f4a99cafa441bd78dfe5f7adb0e1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-13 21:03:31 +02:00
Lars Knoll
6ae7a02104 Remove most compiler warnings about missing overrides
Remove around 1000 compiler warnings about missing overrides
in our auto tests.

This significantly reduce the compiler warning noise in our auto
tests, so that one can actually better see the real problems
inbetween.

Change-Id: Id0c04dba43fcaf55d8cd2b5c6697358857c31bf9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-11 00:20:47 +02:00
Tor Arne Vestbø
f4c58b79a7 Extend test blacklisting from Ubuntu 18.04 to 20.04
Task-number: QTBUG-86187
Change-Id: I3ac3233f7355d1c16bc9bf6e052fdf4bd9ea90de
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-09-03 14:30:04 +02:00
Alex Trotsenko
b3310426b6 tst_QLocalSocket: fix wrong slot name
Suppress the warning:

QObject::connect: No such slot LocalSocket::slotError(QLocalSocket ...

Pick-to: 5.15
Change-Id: Ia08505ebc85d4070582c7ddaae8b581d394dbb80
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-08-24 14:50:56 +03:00
Alexandru Croitor
92ee9bd6b8 CMake: Properly handle CONFIG += thread aka Threads::Threads
mkspecs/features/qt.prf adds a dependency on the system threading
library if the Qt Core thread feature is enabled. Because qt.prf is
loaded by any public or internal Qt project, it's essentially a public
dependency for any Qt consumer.

To mimic that in CMake, we check if the thread feature is enabled, and
and set the Threads::Threads library as a dependency of Qt6::Platform,
which is a public target used by all Qt modules and plugins and Qt
consumers.

We also need to create a Qt6Dependencies.cmake file so we
find_package(Threads) every time find_package(Qt6) is called.

For the .prl files to be usable, we have to filter out some
CMake implementation specific directory separator tokens
'CMAKE_DIRECTORY_ID_SEP' aka '::@', which are added because we call
target_link_libraries() with a target created in a different scope
(I think).

As a result of this change, we shouldn't have to hardcode
Threads::Threads in other projects, because it's now a global public
dependency.

Task-number: QTBUG-85801
Task-number: QTBUG-85877
Change-Id: Ib5d662c43b28e63f7da49d3bd77d0ad751220b31
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-08-06 19:15:39 +02:00
Alexandru Croitor
e9a328bc0e CMake: Regenerate tests with new qt_ prefixed APIs
Use pro2cmake with '--api-version 2' to force regenerate
projects to use the new prefixed qt_foo APIs.

Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-09 09:38:35 +02:00
Alexandru Croitor
5417f1e40c CMake: Regenerate tests
This is in preparation for regenerating them with the new qt_foo
prefixed APIs.

Change-Id: Iff34932d642b1c0186ee39f952adf3ad367fd602
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-09 09:38:31 +02:00
Alexandru Croitor
5d6705c567 CMake: Skip / ignore failing tests on CMake platforms
Skip crashing tests and ignore failing tests on CMake platforms.

Add missing QTEST_ENVIRONMENT=ci env var assignment to Coin test
instructions. This was hardcoded by the Coin code for qmake
configurations.

Task-number: QTBUG-85364
Change-Id: Id2312e504a0d36b8f8596d4cebaa49c63731406e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-01 14:55:29 +02:00
Jarek Kobus
d13b6bd496 Use QList instead of QVector in network tests
Task-number: QTBUG-84469
Change-Id: Ic96dc8d29b5d720810ca636284f5fd37e4307acd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-25 07:54:44 +02:00
Oliver Wolff
45b0f1be68 Remove winrt
Macros and the await helper function from qfunctions_winrt(_p).h are
needed in other Qt modules which use UWP APIs on desktop windows.

Task-number: QTBUG-84434
Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-06-06 20:25:49 +02:00
Liang Qi
ee8ba0e0ca Revert "Disable tests with qemu-arm & developer-build configurations in the CI"
We don't want to have untested qtbase.

This reverts commit 3598ffcc26.

This change also skips two network tests on b2qt.

Change-Id: I5c6f5e19487775f0a1c0feafa5e085208cbf7e9a
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-06-05 12:10:07 +02:00
Volker Hilsheimer
ee92ee7a3c Remove deprecated QProcess methods
Add default parameter for arguments in start, startDetached, and
execute for better source compatibility with Qt 5.15. This has the risk
of then hiding incorrect calls to the previous overload taking a single
"command" strings if code is ported from pre-5.15 or ignores deprecation
warnings. This is acceptable, given that the alternative is that all
calls to these functions would require a default constructed QStringList
as the second parameter.

Change-Id: I1ba4df97ac4894d007da5083c8359015d784ddbb
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-27 11:55:06 +02:00
Qt Forward Merge Bot
58a4289800 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	tests/auto/network/socket/platformsocketengine/platformsocketengine.pri

Change-Id: I22daf269a8f28f80630b5f521b91637531156404
2020-04-11 14:59:13 +02:00
Thiago Macieira
31d0dcab46 tst_PlatformSocketEngine: Removee SOURCES += of QtNetwork code
Avoids ASAN warning of ODR violation:
SUMMARY: AddressSanitizer: odr-violation: global 'typeinfo name for
QSocketEngineHandler' at ../../../../../src/network/socket/qabstractsocketengine.cpp

This trick has not been needed since we got Q_AUTOTEST_EXPORT. The main .pro
file has:

requires(qtConfig(private_tests))

Change-Id: Ibdc95e9af7bd456a94ecfffd1603e598932b88ad
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-04-09 09:31:04 -03:00
Qt Forward Merge Bot
8823bb8d30 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/opengl/doc/src/cube.qdoc
	src/corelib/global/qlibraryinfo.cpp
	src/corelib/text/qbytearray_p.h
	src/corelib/text/qlocale_data_p.h
	src/corelib/time/qhijricalendar_data_p.h
	src/corelib/time/qjalalicalendar_data_p.h
	src/corelib/time/qromancalendar_data_p.h
	src/network/ssl/qsslcertificate.h
	src/widgets/doc/src/graphicsview.qdoc
	src/widgets/widgets/qcombobox.cpp
	src/widgets/widgets/qcombobox.h
	tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
	tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
	tests/manual/diaglib/debugproxystyle.cpp
	tests/manual/diaglib/qwidgetdump.cpp
	tests/manual/diaglib/qwindowdump.cpp
	tests/manual/diaglib/textdump.cpp
	util/locale_database/cldr2qlocalexml.py
	util/locale_database/qlocalexml.py
	util/locale_database/qlocalexml2cpp.py

Resolution of util/locale_database/ are based on:
https://codereview.qt-project.org/c/qt/qtbase/+/294250
and src/corelib/{text,time}/*_data_p.h were then regenerated by
running those scripts.

Updated CMakeLists.txt in each of
	tests/auto/corelib/serialization/qcborstreamreader/
	tests/auto/corelib/serialization/qcborvalue/
	tests/auto/gui/kernel/
and generated new ones in each of
	tests/auto/gui/kernel/qaddpostroutine/
	tests/auto/gui/kernel/qhighdpiscaling/
	tests/libfuzzer/corelib/text/qregularexpression/optimize/
	tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/
	tests/libfuzzer/gui/text/qtextdocument/sethtml/
	tests/libfuzzer/gui/text/qtextdocument/setmarkdown/
	tests/libfuzzer/gui/text/qtextlayout/beginlayout/
by running util/cmake/pro2cmake.py on their changed .pro files.

Changed target name in
	tests/auto/gui/kernel/qaction/qaction.pro
	tests/auto/gui/kernel/qaction/qactiongroup.pro
	tests/auto/gui/kernel/qshortcut/qshortcut.pro
to ensure unique target names for CMake

Changed tst_QComboBox::currentIndex to not test the
currentIndexChanged(QString), as that one does not exist in Qt 6
anymore.

Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
2020-04-08 20:11:39 +02:00
Mårten Nordheim
d8b49e6b51 QtNetwork: Delete bearer management
All remaining pieces are gone, configuration included.

Relevant CMakeLists and configure.cmake were regenerated.

Fixes: QTBUG-76502
Change-Id: I667b5da7e3802830d236d50b5e9190c2ee9c19e2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-04-05 16:41:08 +02:00
Leander Beernaert
dc4872be38 CMake: Regenerate and fix qtcpsocket test
Change-Id: I1293ee604bd0a61abd7f6a5fa305defc4d6c9ae9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-18 16:36:26 +01:00
Qt Forward Merge Bot
18b69ae8a4 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ia79c2457f20f3428ef1b4358c1094e8dc1bbc33e
2020-03-18 11:45:08 +01:00
Qt Forward Merge Bot
22daba4ff9 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Iaab37b633a8286c2c21425aaac34d30529a3ea82
2020-03-18 11:44:49 +01:00
Sona Kurazyan
b345087dde Log the possible socket error code for the flaky test
tst_QSocks5SocketEngine::simpleConnectToIMAP() is flaky. It may be
useful to log the socket error, to provide more info in case the
test fails again.

Change-Id: Ia5518dce13fd9da1fa5bfb3d5cf3a52a908b8698
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-17 11:22:59 +01:00
Alexandru Croitor
8facb31fde CMake: Regenerate tests projects
Change-Id: I559bf2c82d83fac9bd3c52a331d99e1e83bc3f87
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-12 11:41:39 +01:00
Timur Pocheptsov
c668fd940d Fix 'out of process' autotests
We are, arguably, not testing QProcess and its ability to start or finish,
we test QUdpSocket. If, for some reason (as we discovered on some
specific machines recently) the process does not start or does not produce
any output (canReadLine), we QSKIP instead of failing. Also, all those
QCOMPARE will bypass the part there we stop processes - so must be
RAII-protected.

Fixes: QTBUG-82717
Change-Id: Idfb0d4a483d753f336b3827875eeaf51c79270e2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-11 18:23:24 +00:00
Lars Knoll
a450cce6b6 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I469b0501cc65fc5ce4d797a69ae89405cc69c7f8
2020-02-28 09:48:30 +01:00
Alexander Akulich
cb26a4da69 QAbstractSocket: deprecate 'error' signal, use 'errorOccurred' instead
[ChangeLog][Deprecation Notice] QAbstractSocket::error() (the signal) is deprecated; superseded by errorOccurred()

Change-Id: I11e9c774d7c6096d1e9b37c451cf0b99188b6aad
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-02-27 13:56:45 +01:00
Alexander Akulich
6d18e4a2b8 Revert "QAbstractSocket: deprecate 'error' member-function"
This reverts commit 94b3dd77f2.

The patch fixes ambiguity between a getter and a signal by changing the
getter name, but we still have to rename the signal to follow the signals
naming convention.

Revert the commit to keep the getter as is and change the signal name instead.

Change-Id: I0dd60cf1ae9d1bd95beeb8ad58661ca4b1fb63b9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-26 23:07:52 +03:00
Qt Forward Merge Bot
75c0ffaf6d Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/network/bearermonitor/CMakeLists.txt
	examples/network/CMakeLists.txt
	src/corelib/tools/qlinkedlist.h
	src/sql/kernel/qsqldriver_p.h
	src/sql/kernel/qsqlresult_p.h
	src/widgets/kernel/qwidget.cpp
	src/widgets/kernel/qwidget_p.h
	tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
	tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
	tests/auto/tools/moc/allmocs_baseline_in.json

Change-Id: I21a3c34570ae79ea9d30107fae71759d7eac17d9
2020-02-26 18:39:21 +01:00
Leander Beernaert
4987476d9b CMake: Fix qtcpserver and qudpsocket tests
Change-Id: I55cbaf782e811d7842ba8412e98768235bbf2531
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-25 16:19:30 +01:00
Friedemann Kleint
a5ea2f7e99 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ibe5b4aa249863a54007180f3684dc5ce1b23cb7b
2020-02-24 08:40:45 +01:00
Timur Pocheptsov
c58ee54a70 tst_qtcpsocket::bind - amend the recent fix
0. The recent patch fixed the case when we can suddenly (meaning from
a particular version of Darwin) bind on a port number 1. Unfortunately,
it's not the case for IPv4 and while fixing one test case, the patch broke
another - so this patch addresses this.
1. Unfortunately, binding on a fixed port 1 on macOS made the test flaky
- we run this 'bind' several times and sometimes OS thinks port is already
bound (because of the previous test case) - closing the connection seems
to fix this problem (thus this patch do this also).
2. As a bonus a proper resource management added (aka RAII) where we would
previously leak a socket in case some QCOMPARE failed.

Fixes: QTBUG-81905
Change-Id: I90c128a332903bb44ab37de4775ca00d390dc162
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-02-22 03:36:54 +01:00
Liang Qi
b9585277e7 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/corelib/tools/qlinkedlist.h
	src/plugins/platforms/wasm/qwasmintegration.cpp
	src/plugins/platforms/wasm/qwasmscreen.cpp

Change-Id: Iefca7f9f4966bdc20e7052aca736874861055738
2020-02-18 09:26:53 +01:00
Thiago Macieira
210fd52e0d Autotest: adapt to certain OSes always allowing binding to low ports
Apple changed on macOS 10.14 (Mojave). Windows has always allowed.

Fixes: QTBUG-81905
Change-Id: I572733186b73423b89e5fffd15f12fee3f03c055
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-02-13 15:11:21 -08:00
Thiago Macieira
5ff37f13ee QTcpSocket::bind: fix issue found by BLACKLIST
The comment in QNativeSocketEnginePrivate::fetchConnectionParameters()
talked about IPv6 v4-mapped addresses. However, toIPv4Address also
converts the unspecified address (::), which resulted in QAbstractSocket
saying that it had bound to QHostAddress::Any instead of
QHostAddress::AnyV6

Change-Id: I572733186b73423b89e5fffd15f138579c5c0c50
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-02-13 15:11:11 -08:00
Alexandru Croitor
c53ee1f054 Merge remote-tracking branch 'origin/wip/cmake' into dev
Conflicts:
	tests/manual/rhi/hellominimalcrossgfxtriangle/CMakeLists.txt

Hopefully final merge from wip/cmake, and then all cmake changes
should target dev directly.

Change-Id: I29b04c9b0284e97334877c77a32ffdf887dbf95b
2020-02-13 23:29:51 +01:00
Liang Qi
6b2535ea15 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/widgets/graphicsview/boxes/scene.h
	src/corelib/Qt5CoreMacros.cmake
	src/corelib/Qt6CoreMacros.cmake
	src/network/ssl/qsslsocket.cpp
	src/network/ssl/qsslsocket.h
	src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
	src/testlib/CMakeLists.txt
	src/testlib/.prev_CMakeLists.txt
	tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp

Disabled building manual tests with CMake for now, because qmake
doesn't do it, and it confuses people.

Done-With: Alexandru Croitor <alexandru.croitor@qt.io>
Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
2020-02-13 18:31:40 +01:00
Alexandru Croitor
0d177053b9 Regenerate projects one last time before merge
Change-Id: Ia24cf56b79ca6dacd370a7e397024e9b663e0167
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-12 17:30:49 +00:00
Alexander Akulich
c08b0cec2f QLocalSocket: Deprecate 'error' signal, use 'errorOccurred' instead
[ChangeLog][Deprecation Notice] QLocalSocket::error() (the signal) is deprecated; superseded by errorOccurred()

Change-Id: I579c07564f5c470cf2867864755e0a26e6afce3b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-11 16:54:59 +03:00
Alexander Akulich
c034f92fc2 Revert "QLocalSocket - deprecate ambiguous 'error' overloads"
This reverts commit 0de6c26ac1.

The patch fixes ambiguity between a getter and a signal by changing the
getter name, but we still have to rename the signal to follow the signals
naming convention.

Revert the commit to keep the getter as is and change the signal name instead.

Change-Id: I67dbb5cada25da473bdd02e71b1e2d9bd03f039e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-11 16:54:33 +03:00
Alexandru Croitor
1c571e5fe7 Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev" 2020-02-07 18:19:51 +00:00
Timur Pocheptsov
4c4b5a97c3 Skip test cases that is failing on macOS >= 10.14
bind on port 1/82 is now success, in QTcpSocket's test things are more
broken: changing the test row makes the test flaky with port not available
due to the previous test case.

Task-number: QTBUG-81905
Change-Id: Iaf1b5457fa3961a4f6bc92b79aa4668a8359136e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-02-07 08:54:11 +01:00
Leander Beernaert
502d3d6744 Merge remote-tracking branch 'origin/dev' into merge-dev
Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
2020-01-24 13:17:33 +01:00
Mårten Nordheim
cd5ce46dc5 QUdpSocket: Blacklist writeDatagramToNonExistingPeer for msvc2019
Same as other versions of MSVC

Fixes: QTBUG-80328
Change-Id: I05c5ffe6d36e0cdfb781080a736c90b6a6d4b2ba
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-01-17 22:16:23 +01:00
Leander Beernaert
7c6f763d85 Regenerate Tests
Change-Id: I78f1efbec809610bcf6a8224392fa0dc8dbf3b3b
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-01-16 08:16:17 +00:00
Qt Forward Merge Bot
c3123c757a Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I8dbcf23835d52d3aa7d018ed250814d60c68aa83
2020-01-15 01:00:39 +01:00
Tor Arne Vestbø
eb2a7738a4 Skip instead of fail tests when test server is not available
We were being inconsistent in how we handled this, some tests skipping
while others using QVERIFY. It makes more sense to skip the tests, since
the problem is a missing pre-condition of the test, not the test itself
being bad or exposing real failures in the implementation.

Change-Id: I20eacfe12dbce0b0d926e48cbe2d2772819fa4a5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-01-14 00:15:16 +01:00
Timur Pocheptsov
0de6c26ac1 QLocalSocket - deprecate ambiguous 'error' overloads
QLocalSocket::error is overloaded as a signal and an accessor (for the
error reported by the signal). This means connecting to the signal using
a pointer to member function would require ambiguity resolution. We
deprecate the old accessor (to be removed in Qt 6) and introduce a new one -
'socketError'.

[ChangeLog][Deprecation Notice] QLocalSocket::error() (the getter) is deprecated; superseded by socketError().

Task-number: QTBUG-80369
Change-Id: Iab346f7b4cd1024dee9e5ef71b4b7e09f6d95b12
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-01-10 12:54:53 +01:00
Timur Pocheptsov
94b3dd77f2 QAbstractSocket: deprecate 'error' member-function
The one that is a getter for the last error found. This is to disambiguate
the expression '&QAbstractSocket::error'. Introduce a new member-function
socketError as a replacement.

[ChangeLog][Deprecation Notice] QAbstractSocket::error() (the getter) is deprecated; superseded by socketError().

Task-number: QTBUG-80369
Change-Id: Ia2e3d108657aaa7929ab0810babe2ede309740ba
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-01-10 12:54:53 +01:00
Alexandru Croitor
aa1f970c43 Fix qmake builds of socket tests
qabstractsocketengine.cpp was changed to explicitly include its header
moc file, which works with AUTOMOC, but doesn't with qmake.
The header file needs to be explicitly listed in the HEADERS variable.

Amends 2a1fc7b835.

Change-Id: I9d31288d1f1eb2310679a7e685bd7ea458a77920
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-12-19 09:21:15 +00:00
Alexandru Croitor
5c28fce38e Regenerate qtbase tests and src/* for some small fixes
Change-Id: I049829492971875a5c5ff159104707d9e2ad1e46
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-13 13:36:09 +00:00
Alexandru Croitor
164d8c35b3 Regenerate tests/auto/network/socket
Change-Id: I653f7f4a6e3421f56f873cfbec4309eca49f1756
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-13 10:07:36 +00:00
Alexandru Croitor
190e9dcdcf Regenerate files after dev -> wip/cmake merge
Note the following bigger things that had to be done:
Handle GSS library / feature with a new custom find module.
Implement rudimentary support for relocatability (does not currently
handle extprefix).

Change-Id: Ic6cd27dda7ebca9829f51cb42ea76fff6d1767ef
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-14 19:01:19 +00:00
Alexandru Croitor
440286655e Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
2019-10-14 17:46:34 +02:00
Alexandru Croitor
f4b4c4f79b Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I3a1d7673c3c20019ab12a2ea0a60f1619920a34c
2019-10-11 16:23:19 +02:00
Simon Hausmann
ff432a7692 Fix build with qmake
Since the direct .moc inclusion was added for cmake, we need to make the
_p.h visible to qmake via HEADERS so that qmake can also see this.

Change-Id: I042544856fe28e46b978d3b5938fbff8614367be
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-24 13:44:30 +00:00
Simon Hausmann
4d289edb14 Disable debug-and-release builds for MinGW
The requirement to separate debug and release DLLs on Windows stems from
the Visual Studio C run-time library appearing in two different variants
(debug and release) and not mixing well. It's possible to perform builds
without optimzations and with debug symbols while linking against the
release version of the C run-time, but at the same time the debug
version of the run-time brings other developer visible advantages.

MinGW on the other hand does not have this distinction, does not ship
with separate DLLS and does also not require the VS C runtime library.
Therefore we do not need this separation for MinGW, which means that our
packages can be reduced in size and application developers wishing to
debug their applications do not have to use debug builds of the Qt
libraries or run into Qt internal debug code.

Task-number: QTBUG-78445
Change-Id: Idf588606091298dc44262c4c89e689df18d34747
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-09-18 06:28:16 +00:00
Sona Kurazyan
43983b0b6f Remove QOperatingSystemVersion::WindowsVista
The minimum supported version is Windows 7. Remove
QOperatingSystemVersion::WindowsVista added by
b0cd007335 and replace with "true"
wherever it was used.

Change-Id: I08c0208467b655a921b6773f77d8bc099be69031
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-09-05 08:25:05 +02:00