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

qmake doesn't fully parse conditional blocks and thus fails

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 4.8.4
    • Fix Version/s: 5.0.0
    • Component/s: Build tools: qmake
    • Labels:
      None
    • Environment:
      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

            Assignee:
            buddenha Oswald Buddenhagen
            Reporter:
            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