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

Re-ordering functions doesn't always work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • Qt Creator 15.0.0-beta2
    • C/C++/Obj-C++ Support
    • None

    Description

      Preconditions:

      foo.h

      #ifndef FOO_H
      #define FOO_H
      
      class Foo {
      public:
          Foo();
          void func1();
          void func2();
          void func3();
      };
      
      #endif 

      foo.cpp

      #include "foo.h"
      
      Foo::Foo() {}
      
      void Foo::func3() {}
      void Foo::func2() {}
      void Foo::func1() {} 

      Steps to reproduce:
      1. In the header file context menu select 'Refactor -> Re-order Member Function Definitions According to Declaration Order' -> functions are re-ordered correctly in the cpp file
      2. Restore to the preconditions
      3. Delete the line 'void Foo::func3() {}' from the cpp file
      4. Re-order the functions -> re-ordering works OK
      5. Restore to the preconditions
      6. Delete the line 'void Foo::func1() {}' from the cpp file
      7. Re-order the functions

      Result:
      Functions are not re-ordered.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            jukkanokso Jukka Nokso
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes