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

Add definition to source file does not work with friend function

    XMLWordPrintable

Details

    Description

      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)
      {
      }
      

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes