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

Add definition to source file does not work with friend function

XMLWordPrintable

      Given following class definition:

      klass.h
      class Klass
      {
          friend int foo(Klass& k);
      }
      

      When I right click on foo and activate Refactor/Add definition to klass.cpp, QtCreator wrongfully adds a class scope:

      klass.cpp
      int Klass::foo(Klass& k)
      {
      }
      

      Correctly it should have generated:

      klass.cpp
      int foo(Klass& k)
      {
      }
      

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

            Unassigned Unassigned
            richardo Richard Öhlinger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes