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

Support move-only functors in QMetaObject::invokeMethod

    XMLWordPrintable

Details

    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes