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

Support move-only functors in QObject::connect

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.10
    • 5.9
    • Core: Object Model
    • None

      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.

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

            ogoffart Olivier Goffart (Woboq GmbH)
            peppe Giuseppe D'Angelo
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes