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

Project tree shows h/cpp nodes even if the 'contains' does not match desired condition

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • Qt Creator 4.0.0
    • None
    • * OS: Windows 10 64 bit
      * QtC: Official v4.0.0
      * Project type: qmake

    Description

      For example, when is used this qmake's project:

      QT += core
      QT -= gui
      CONFIG += c++11 console
      CONFIG -= app_bundle
      TEMPLATE = app
      DEFINES +=
      contains(DEFINES, USE_FOO): include(foo.pri)
      SOURCES += app.cpp
      

      then the project's tree shows the foo.h(cpp) files, even the USE_FOO define is not specified in DEFINES.

      and same things when the files directly has been specified:

      DEFINES +=
      
      contains(DEFINES, USE_FOO) {
          HEADERS += foo.h
          SOURCES += foo.cpp
      }
      

      PS: the sample project is attached.

      Attachments

        1. app.zip
          1.0 kB
        2. img.png
          img.png
          26 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hunger Tobias Hunger
            kuzulis Denis Shienkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes