Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-1288

RCC tags in qml.qrc file gets duplicated and lupdate fails in parsing the file

    XMLWordPrintable

Details

    Description

      How to reproduce the issue :
      1. Open the reproducer on Windows Explorer, and copy main.qml in the same folder as "maincopy.qml".

      2. Open the reproducer (main1.sln) with Visual Studio. The following steps should be done on VS.

      3. Build (not re-build) the main1 project.
      By doing this, the first RCC tag will be added to reproducer\main1\main1\x64\Release\qt\qmake\qml.qrc, as below :

      <RCC>
      <qresource prefix="/">
      <file>import.qml</file>
      </qresource>
      </RCC> 

      4. Add "maincopy.qml" file to the project (right click on main1 project -> Add -> Existing Item -> maincopy.qml)

      5. Add "maincopy.qml" to the qml.qrc file right below the main1 project, and Save the updated qml.qrc file by pressing a floppy disk icon.

      6. Build  main1 project again.
      By doing this, the duplicated RCC tag will be added to reproducer\main1\main1\x64\Release\qt\qmake\qml.qrc, as below :

      <RCC>
      <qresource prefix="/">
      <file>import.qml</file>
      </qresource>
      </RCC> 

      7. Run "lupdate -recursive" command at the root of the solution.

      E.g. 

      C:\Qt\6.8.1\msvc2022_64\bin\lupdate.exe -recursive . -ts tmp.ts 

      lupdate will report an error due to the duplicated RCC tags in qml.qrc, as follows :

      Scanning directory '.'...
      lupdate error: C:/Users/USERNAME/reproducer/main1/main1/x64/Release/qt/qmake/qml.qrc:6: Extra content at end of document. 

      Attachments

        Issue Links

          For Gerrit Dashboard: QTVSADDINBUG-1288
          # Subject Branch Project Status CR V

          Activity

            People

              ali.demiralp Ali Can Demiralp
              hitoshiito Hitoshi Ito
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change