Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-69683

Support move-only functors in QMetaObject::invokeMethod

XMLWordPrintable

    • 2a815855a9b91a3537ab3d804ad1ee47d741b64f (qt/qtbase/5.12)

      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.

        For Gerrit Dashboard: QTBUG-69683
        # Subject Branch Project Status CR V

            ogoffart Olivier Goffart (Woboq GmbH)
            vitech Viktor Kireev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes