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

Quickfix "Move definition ..." breaks functions using Q_DECL_OVERRIDE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • Qt Creator 3.4.0
    • C/C++/Obj-C++ Support
    • None
    • Ubuntu 14.04 x64
      Qt Creator 3.4.0 (opensource)

      When triggering the "Move Definition ..." quickifx refactor action on a function that uses Q_DECL_OVERRIDE the output is mangled code:

      Given the code:

      class MyTestClass {
          void testFunction() Q_DECL_OVERRIDE {
              int a = 0;
          }
      };
      

      Produces the following on "Move Definition Outside Class":

      class MyTestClass {
          void testFunction() Q_DECL_OVERRIDE {
              int a = 0;
          };
      };
      
      void TestItem::MyTestClass::testFunction()
      };
      

      When just removing the Q_DECL_OVERRIDE the output is valid:

      class MyTestClass {
          void testFunction();
      };
      
      void TestItem::MyTestClass::testFunction() {
          int a = 0;
      }
      

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

            kosjar Nikolai Kosjar
            TheBadger Carel Combrink
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes