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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • 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)

    Description

      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;
      }
      

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes