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

Move definition of a template member to impl file fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: Qt Creator 4.13.2
    • Fix Version/s: Qt Creator 4.14.0-beta2
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
      None
    • Environment:
      Linux ubuntu 20.04, creator 4.13.2, qt 5.15.1
    • Commits:
      d2ebc16b92cfe10eff6b379b32cb0e07329f29df (qt-creator/qt-creator/4.14)

      Description

      When using the "move to implementation file" command to move the definition of a method of a template out of the header, creator generates an incorrect signature.

      Given the code below:

      template <typename T>
      {{ class Delegate}}
      {{ {}}
      {{ public:}}
      {{ void Invoke()}}
      {{ {}}
      {{ }}}
      {{ };}}template <typename T>
      {{ class SomeClass}}
      {{ {}}
      {{ Delegate<void(int)> _d;}}public:
      {{ SomeClass(Delegate<void(int)>)}}
      {{ {}}} qtcbug.cpp
      {{ };}}

      Move the definition of the SomeClass ctor into its implementation file.

      The generated result is: 

      template<typename T>SomeClass::SomeClass(Delegate<void (int)>){} 

      which should be:

      template<typename T> SomeClass<T>::SomeClass(Delegate<void (int)>) 

       

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              kandeler Christian Kandeler
              Reporter:
              qtjake Jake Helfert
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes