From 4cf51f46166b50904f0161f028a9ff1c9ba5ae3e Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 21 Jul 2023 22:43:43 +0200 Subject: QHostInfo: use new QMetaCallEvent::create() overload Move the SlotObjUniquePtr directly into the QMetaCallEvent, without having to up and down the ref-count. Pick-to: 6.6 6.5 Change-Id: I029f71c60defce71ac8778547efe999ce0cf7b4b Reviewed-by: Qt CI Bot Reviewed-by: Fabian Kosmale --- src/network/kernel/qhostinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp index 3e1b019a93..446f9ce4db 100644 --- a/src/network/kernel/qhostinfo.cpp +++ b/src/network/kernel/qhostinfo.cpp @@ -110,7 +110,7 @@ void QHostInfoResult::postResultsReady(const QHostInfo &info) auto result = new QHostInfoResult(this); Q_CHECK_PTR(result); - auto metaCallEvent = QMetaCallEvent::create(slotObj.get(), nullptr, signal_index, info); + auto metaCallEvent = QMetaCallEvent::create(std::move(slotObj), nullptr, signal_index, info); Q_CHECK_PTR(metaCallEvent); qApp->postEvent(result, metaCallEvent); } -- cgit v1.2.3