QHostInfo: use new QMetaCallEvent::create() overload
Move the SlotObjUniquePtr directly into the QMetaCallEvent, without having to up and down the ref-count. Change-Id: I029f71c60defce71ac8778547efe999ce0cf7b4b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 4cf51f46166b50904f0161f028a9ff1c9ba5ae3e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
94124571b5
commit
c79e71fe2c
@ -110,7 +110,7 @@ void QHostInfoResult::postResultsReady(const QHostInfo &info)
|
|||||||
auto result = new QHostInfoResult(this);
|
auto result = new QHostInfoResult(this);
|
||||||
Q_CHECK_PTR(result);
|
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);
|
Q_CHECK_PTR(metaCallEvent);
|
||||||
qApp->postEvent(result, metaCallEvent);
|
qApp->postEvent(result, metaCallEvent);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user