Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-27133

Auto generation of Getter/setter doesnt work with std::function

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P3: Somewhat important
    • Resolution: Done
    • Qt Creator 6.0.2
    • Qt Creator 7.0.1
    • C/C++/Obj-C++ Support
    • None
    • Windows
    • 3cdec51eaf (qt-creator/qt-creator/7.0) 3cdec51eaf (qt-creator/qt-creator/master) 3cdec51eaf (qt-creator/qt-creator/qds-3.3) 3cdec51eaf (qt-creator/tqtc-qt-creator/7.0)

    Description

      See the little example. I like to auto generate getter and setter for the member minimumValueFunctor.

      class {
       std::function<quint32()> minimumValueFunctor;
      }

      The result is wrong, since the quint32 isn't copied. I get:

      class {
       const std::function<()> &getMinimumValueFunctor() const;
       void setMinimumValueFunctor(const std::function<()> &newMinimumValueFunctor); 
       std::function<quint32()> minimumValueFunctor;
      }

       

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            fettpet Sev Dw
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes