6.5.3 clean

This commit is contained in:
kleuter
2023-11-01 18:02:52 +01:00
parent bbe896803b
commit 7018d9e6c8
2170 changed files with 57471 additions and 43550 deletions

View File

@ -11,5 +11,6 @@ qt_internal_add_test(tst_qlocalsocket
QLOCALSOCKET_DEBUG
LIBRARIES
Qt::Network
Qt::TestPrivate
)
add_dependencies(tst_qlocalsocket socketprocess)

View File

@ -5,6 +5,7 @@
#include <QTest>
#include <QSignalSpy>
#include <QtTest/private/qpropertytesthelper_p.h>
#if QT_CONFIG(process)
#include <QProcess>
#endif
@ -123,6 +124,7 @@ private slots:
void verifyListenWithDescriptor_data();
void serverBindingsAndProperties();
void socketBindings();
protected slots:
void socketClosedSlot();
@ -1807,14 +1809,18 @@ void tst_QLocalSocket::serverBindingsAndProperties()
{
CrashSafeLocalServer server;
QProperty<QLocalServer::SocketOptions> sockOpts;
server.bindableSocketOptions().setBinding(Qt::makePropertyBinding(sockOpts));
sockOpts = QLocalServer::GroupAccessOption | QLocalServer::UserAccessOption;
QCOMPARE(server.socketOptions(), sockOpts.value());
QTestPrivate::testReadWritePropertyBasics(
server, QLocalServer::SocketOptions{QLocalServer::GroupAccessOption},
QLocalServer::SocketOptions{QLocalServer::OtherAccessOption}, "socketOptions");
}
sockOpts.setBinding(server.bindableSocketOptions().makeBinding());
server.setSocketOptions(QLocalServer::OtherAccessOption);
QCOMPARE(sockOpts.value(), QLocalServer::OtherAccessOption);
void tst_QLocalSocket::socketBindings()
{
QLocalSocket socket;
QTestPrivate::testReadWritePropertyBasics(
socket, QLocalSocket::SocketOptions{QLocalSocket::AbstractNamespaceOption},
QLocalSocket::SocketOptions{QLocalSocket::NoOptions}, "socketOptions");
}
QTEST_MAIN(tst_QLocalSocket)

View File

@ -127,12 +127,13 @@ void tst_QSctpSocket::bind_data()
// these ranges are guaranteed to be reserved for 'documentation purposes',
// and thus, should be unused in the real world. Not that I'm assuming the
// world is full of competent administrators, or anything.
QStringList knownBad;
knownBad << "198.51.100.1";
knownBad << "2001:0DB8::1";
foreach (const QString &badAddress, knownBad) {
const QString knownBad[] = {
"198.51.100.1",
"2001:0DB8::1",
};
for (const QString &badAddress : knownBad)
QTest::newRow(badAddress.toLatin1().constData()) << badAddress << false << QString();
}
}
// Testing bind function

View File

@ -2,8 +2,6 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <qglobal.h>
// To prevent windows system header files from re-defining min/max
#define NOMINMAX 1
#if defined(_WIN32)
#include <winsock2.h>
#else

View File

@ -4,8 +4,6 @@
#include <qglobal.h>
// To prevent windows system header files from re-defining min/max
#define NOMINMAX 1
#if defined(_WIN32)
#include <winsock2.h>
#else
@ -283,7 +281,7 @@ tst_QTcpSocket::tst_QTcpSocket()
tmpSocket = 0;
//This code relates to the socketsConstructedBeforeEventLoop test case
earlyConstructedSockets = new SocketPair;
earlyConstructedSockets = new SocketPair(this);
QVERIFY(earlyConstructedSockets->create());
earlyBytesWrittenCount = 0;
earlyReadyReadCount = 0;
@ -489,8 +487,8 @@ void tst_QTcpSocket::bind_data()
bool testIpv6 = false;
// iterate all interfaces, add all addresses on them as test data
QList<QNetworkInterface> interfaces = QNetworkInterface::allInterfaces();
foreach (const QNetworkInterface &netinterface, interfaces) {
const QList<QNetworkInterface> interfaces = QNetworkInterface::allInterfaces();
for (const QNetworkInterface &netinterface : interfaces) {
if (!netinterface.isValid())
continue;