summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/kernel/qhostinfo
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 15:33:37 +0200
commitf53fc76060e4eb5eeec28318946db9cc2bcfaca6 (patch)
tree9ddf902929831657cc59ab537de10a119d190e9d /tests/auto/network/kernel/qhostinfo
parentc8bb8cb7614768156f9cc4bccc2df928d5430067 (diff)
parent154155f588c89d43362abb58bcf91449c78e3ff8 (diff)
Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"
Diffstat (limited to 'tests/auto/network/kernel/qhostinfo')
-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 5db6eb000d..7640d52583 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();
@@ -710,6 +722,7 @@ void tst_QHostInfo::cache()
void tst_QHostInfo::resultsReady(const QHostInfo &hi)
{
+ QVERIFY(QThread::currentThread() == thread());
lookupDone = true;
lookupResults = hi;
lookupsDoneCounter++;