QFutureInterface: port to new SlotObjUniquePtr
... removing a ### comments to that effect. Pick-to: 6.6 Change-Id: I635ca9593ec72a66d328ff6de61cd311c1b4e89f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This commit is contained in:
parent
c58074b42d
commit
56651915e8
@ -118,11 +118,7 @@ void QtPrivate::watchContinuationImpl(const QObject *context, QSlotObjectBase *s
|
|||||||
Q_ASSERT(context);
|
Q_ASSERT(context);
|
||||||
Q_ASSERT(slotObj);
|
Q_ASSERT(slotObj);
|
||||||
|
|
||||||
// ### we're missing `QSlotObjectPtr`...
|
auto slot = SlotObjUniquePtr(slotObj);
|
||||||
struct Deleter {
|
|
||||||
void operator()(QSlotObjectBase *p) const { p->destroyIfLastRef(); }
|
|
||||||
};
|
|
||||||
auto slot = std::unique_ptr<QSlotObjectBase, Deleter>(slotObj);
|
|
||||||
|
|
||||||
auto *watcher = new QBasicFutureWatcher;
|
auto *watcher = new QBasicFutureWatcher;
|
||||||
watcher->moveToThread(context->thread());
|
watcher->moveToThread(context->thread());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user