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

QtCreator ignores additional preprocessor directives

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3: Somewhat important
    • None
    • Qt Creator 4.10.0, Qt Creator 4.10.1, Qt Creator 4.10.2
    • C/C++/Obj-C++ Support
    • None
    • Linux/X11, Windows

    Description

      QtCreator doesn't consistently apply the Additional Preprocessor Directives (e.g. Tools -> C++ -> Additional Preprocessor Directives, or the `#` icon at the top of an editor window) when parsing a file. The file is parsed as if the additional directives aren't present.

      For example, if you have `#define FOO` in the additional preprocessor directives and your file has a `#ifdef FOO` section, what that section will be greyed out and symbols defined in it won't be searchable.

      One reliable way to trigger this problem is:

      1. Open a file with a `#ifdef FOO` section in the editor (can be any symbol, doesn't have to be `FOO` specifically).
      2. Add `#define FOO` to the Additional Preprocessor Symbols for the file

      The ifdef'd section in the file is now grayed out, even though the `#define FOO` is still there in the additional preprocessor directives.

      Attachments

        Issue Links

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

          Activity

            People

              kandeler Christian Kandeler
              gecheim Andrey Tsarkov
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes