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

Function extraction from nested class functions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • Qt Creator 4.8.0-beta1
    • Qt Creator 2.5.0-beta, Qt Creator 2.8.0-beta, Qt Creator 4.7.1
    • C/C++/Obj-C++ Support
    • None
    • Ubuntu linux x86_64
    • 049291504d493ee8126f7da723068c3d3c9c298e (qt-creator/qt-creator/4.8)

      Nested class name is missing while extracting function in the following situation:

      // header file contents
      namespace NS {
      class Outer {
          class Inner {
              void Func();
              bool Cond;
              int i;
          };
      };
      }
      
      // source file contents
      namespace NS {
      void Outer::Inner::Func() {
          if (Cond) {
              i = 1; // (*) The only line to extract to the new function
          }
      }
      }
      

      Extraction of line leads to generation the following wrong code (placed in namespace NS in source file):

      void Inner::Func2()
      {
          i = 1;    
      }
      

      'Outer::' class prefix is missing

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

            con Eike Ziller
            serxa Sergey Trifonov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes