Details
-
Suggestion
-
Resolution: Done
-
P2: Important
-
5.9
-
None
Description
Move-only functors don't seem to be supported by QObject::connect().
E.g.
QObject *o;
auto f = [u = std::unique_ptr<int>()](){};
QObject::connect(o, &QObject::destroyed, std::move(f));
does not compile as an attempt of copying f is made.
Attachments
Issue Links
- relates to
-
QTBUG-69683 Support move-only functors in QMetaObject::invokeMethod
- Closed
For Gerrit Dashboard: QTBUG-60339 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
192416,4 | Support move-only function objects in QObject::connect | dev | qt/qtbase | Status: MERGED | +2 | 0 |
192417,6 | Add a few std::move in functions accepting slots | dev | qt/qtbase | Status: MERGED | +2 | 0 |