Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.10.0
-
None
-
2a815855a9b91a3537ab3d804ad1ee47d741b64f (qt/qtbase/5.12)
Description
Move-only functors are not supported by the QMetaObject::invokeMethod().
QObject* o;
auto f = [u = std::unique_ptr<int>()]() {};
QMetaObject::invokeMethod(o, std::move(f));
It does not compile, because the f is copied in QMetaObject::invokeMethod(QObject *context, Functor function, ...).
This bug is similar to QTBUG-60339.
Attachments
Issue Links
- relates to
-
QTBUG-60339 Support move-only functors in QObject::connect
-
- Closed
-
For Gerrit Dashboard: QTBUG-69683 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
258072,11 | corelib: invokeMethod: Allow non copyable functors to be used | 5.12 | qt/qtbase | Status: MERGED | +2 | 0 |