diff --git a/tests/auto/qhostinfo/tst_qhostinfo.cpp b/tests/auto/qhostinfo/tst_qhostinfo.cpp index 35c8d8d95c..1c7df1bdae 100644 --- a/tests/auto/qhostinfo/tst_qhostinfo.cpp +++ b/tests/auto/qhostinfo/tst_qhostinfo.cpp @@ -611,7 +611,7 @@ void tst_QHostInfo::resultsReady(const QHostInfo &hi) lookupDone = true; lookupResults = hi; lookupsDoneCounter++; - QMetaObject::invokeMethod(&QTestEventLoop::instance(), "exitLoop", Qt::QueuedConnection); + QTestEventLoop::instance().exitLoop(); } void tst_QHostInfo::abortHostLookup()