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

"Apply function signature change" does not work for std::function<void (...)>

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • Qt Creator 4.14.0-beta1
    • Qt Creator 3.2.2, Qt Creator 3.3.1, Qt Creator 3.6.0, Qt Creator 4.12.0-beta2
    • C/C++/Obj-C++ Support
    • None
    • c6a56cce28807d84e1ba01925061ec301e79440c (qt-creator/qt-creator/master)

    Description

      When changing a template function and applying the signature change, the return type of the template is removed.

      Steps to reproduce

      1. Create a function in a class body and header: void MyClass::foo(const QString &val, std::function<void (QByteArray)> callback)
      2. Change function body to: void MyClass::foo(const QString &val, std::function<void (const QByteArray &)> callback)
      3. Apply function signature change.

      What do you see

      1. in header: void foo(const QString &val, std::function<(const QByteArray &)> callback)

      What do you expect

      1. in header: void foo(const QString &val, std::function<void (const QByteArray &)> callback)

      The same happens if you change the signature in the header.
      Adding the function is ok.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            wibek Wim Bekker
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes