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

Macro-Handling when performing "Apply Function Signature Changes"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • Qt Creator 2.8.1, Qt Creator 3.0.1, Qt Creator 3.1.0-beta
    • C/C++/Obj-C++ Support
    • None
    • Windows, Qt Creater 2.8.1, Qt 5.1.1

      I have a function myFunc() and would like to change the type of param to the macro PARAM_TYPE.

      #define PARAM_TYPE short
      
      void myFunc(int param)
      {
        // some code goes here
      }
      

      If I replace "int" by "PARAM_TYPE" and perform "Apply Function Signature Changes", the header file get's updated with the resolved macro, i.e. "short" rather than "PARAM_TYPE". That means the result in the header file is:

      void myFunc(short param);
      

      rather than

      void myFunc(PARAM_TYPE param);
      

      Don't know if this is the intended behaviour but I would prefer a consistent definition in the header and implementation file.

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

            kandeler Christian Kandeler
            wurzelpeter Markus Franke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes