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

Rename symbol should ignore preprocessor directives

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • Qt Creator 2.5.0-beta, Qt Creator 2.8.0-beta
    • C/C++/Obj-C++ Support
    • None

    Description

      int foo = 42;
      #if Q_OS_WIN
      foo = 0;
      #elif Q_OS_LINUX
      foo = 42;
      #endif

      Renaming foo should be applied to both references. This is true also for non-local renames.

      IMHO, references inside comments should also be renamed, but I guess that would be hard to track...

      Here is a good real-life example why this is necessary.

      Attachments

        Issue Links

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

          Activity

            People

              erikv Erik Verbruggen
              orgads Orgad Shaneh
              Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes