summaryrefslogtreecommitdiffstats
path: root/tests/auto/network
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-29 01:00:11 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2019-07-29 11:56:00 +0200
commit154155f588c89d43362abb58bcf91449c78e3ff8 (patch)
treee72e8040684ab1c51c7ef67d9369a253730da6e4 /tests/auto/network
parent28af6e97e5fe7f844bc85df7af22ce8b7414f5a6 (diff)
parente24a4976bebd7ca90deac2b40c08900625773a99 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: src/corelib/io/qresource.cpp Change-Id: I54917f72444a621bd08aeaa15f5d17415993144d
Diffstat (limited to 'tests/auto/network')
-rw-r--r--tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
index 0a130d363e..9905cfe075 100644
--- a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
+++ b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
@@ -92,6 +92,7 @@ private slots:
void lookupIPv6();
void lookupConnectToFunctionPointer_data();
void lookupConnectToFunctionPointer();
+ void lookupConnectToFunctionPointerDeleted();
void lookupConnectToLambda_data();
void lookupConnectToLambda();
void reverseLookup_data();
@@ -361,6 +362,17 @@ void tst_QHostInfo::lookupConnectToFunctionPointer()
QCOMPARE(tmp.join(' '), expected.join(' '));
}
+void tst_QHostInfo::lookupConnectToFunctionPointerDeleted()
+{
+ {
+ QObject contextObject;
+ QHostInfo::lookupHost("localhost", &contextObject, [](const QHostInfo){
+ QFAIL("This should never be called!");
+ });
+ }
+ QTestEventLoop::instance().enterLoop(3);
+}
+
void tst_QHostInfo::lookupConnectToLambda_data()
{
lookupIPv4_data();
@@ -708,6 +720,7 @@ void tst_QHostInfo::cache()
void tst_QHostInfo::resultsReady(const QHostInfo &hi)
{
+ QVERIFY(QThread::currentThread() == thread());
lookupDone = true;
lookupResults = hi;
lookupsDoneCounter++;