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

The autocompletion doesn't work if eval(INCLUDE_TARGET != ""): INCLUDEPATH += "$${INCLUDE_TARGET}" is used to set the include path

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • Qt Creator 2.5.2
    • None

    Description

      The attached example can be used to reproduce this issue. If either of those eval() lines (shown below) are used the Qt Creator's editor doesn't find the fakelib library if one hovers over the #include "fakeLib.h" found in the applications main.cpp. Neither the autocompletion does work in that case. So, if one starts typing "testFunc" and presses Ctrl+space, Qt Creator doesn't complete/find the function name.

      This works with isEmpty.

      qmake adds the include path successfully, but Qt Creator seems not to do so.

      INCLUDE_TARGET=fakeLib
      eval(INCLUDE_TARGET != ""): INCLUDEPATH += "$${INCLUDE_TARGET}"
      #!isEmpty(INCLUDE_TARGET): INCLUDEPATH += "$${INCLUDE_TARGET}"
      #eval(!isEmpty(INCLUDE_TARGET)): INCLUDEPATH += "$${INCLUDE_TARGET}"
      

      The reason for this might be in qt-creator\src\shared\proparser\profileevaluator.cpp in "case T_EVAL:". It might be that it fails to parse this:

       
      ProFile *pro = m_parser->parsedProBlock(fL1S("(eval)"),                                                      args.join(statics.field_sep));
      

      Attachments

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

        Activity

          People

            buddenha Oswald Buddenhagen
            qtcomsupport Qt Support
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes