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

Incorrect Error Highlighting in Qt Creator / Non-qt projects

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • Qt Creator 2.8.1
    • C/C++/Obj-C++ Support
    • None
    • Ubuntu Linux / GCC 4.7.3
      Windows / MinGW / GCC 4.8.1

    Description

      We recently transitioned an old code base to use Qt Creator and qmake. The old code base included a "foreach" macro, which performed a similar function to Qt's foreach loop.

      Our projects don't use the Qt framework, so we always use CONFIG-=qt in project files. This means that there are no issues with Qt's foreach when building.

      However, when viewing code in Qt Creator, the usage of foreach is highlighted in red as an error, even when the code builds successfully. Renaming our 'foreach' macro to something else fixes the problem.

      I've attached a simple test case which should demonstrate the issue.

      Attachments

        1. foreach.h
          6 kB
        2. test.cc
          0.2 kB
        3. test.pro
          0.3 kB

        Issue Links

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

          Activity

            People

              kosjar Nikolai Kosjar
              rawatson Reid Watson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes