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 <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>bb10
parent
9fb3bd05a8
commit
4cf51f4616
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue