Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-31281

qmake doesn't fully parse conditional blocks and thus fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.0.0
    • 4.8.4
    • Build tools: qmake
    • None
    • Windows 7, MinGW 4.7

    Description

      Steps to reproduce:

      use exists() functions. If the condition is false, qmake doesn't fully parse the following code block. It just counts

      { and }

      braces that leads to parsing errors in some cases.

      Working code with condition == true:

      FILE=C:\\autoexec.bat
      
      exists($$FILE) {
          iss.commands += "echo AppId={{16AE5DDE-D073-4F5F-ABC3-11DD9FBF58E3} >> tmp.log"
      }
      
      > qmake
      >
      

      Buggy code with condition == false

      FILE=C:\\autoexec-xxx.bat
      
      exists($$FILE) {
          iss.commands += "echo AppId={{16AE5DDE-D073-4F5F-ABC3-11DD9FBF58E3} >> tmp.log"
      }
      
      >qmake
      X.pro:12: Unterminated conditional block at end of file
      Error processing project file: X.pro
      

      Attachments

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

        Activity

          People

            buddenha Oswald Buddenhagen
            dmitry64 Dmitry
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes