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

Cannot build project when adding qtquickcompiler config option after embed_translations option

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.14.1
    • 5.13.1
    • Build tools: qmake
    • None

    Description

      There seems to be an issue when using the Qt Quick Compiler together with the lupdate/embed_translations config options.

       

      I added a minimal example which demonstrates the issue as attachement. Basically, I think this can be reproduced in any qmake/QML project, by adding the following (in this order) to a *.pro file in the project:

       

      CONFIG += lrelease embed_translations
      CONFIG(release, debug|release):CONFIG += qtquickcompiler
      

       

       

      With these lines, when I run qmake, it prints the following warning:

       

      WARNING: Failure to find: qmake_qm_files

      ... but exists with no error code yet. However, if I try to build afterwards, the make process seems to go into some kind of endless loop, where the above message is printed all over again.

       

      However, if I swap the order of config options, everything works just fine:

      CONFIG(release, debug|release):CONFIG += qtquickcompiler
      CONFIG += lrelease embed_translations
      

      Note that with the attached example, you also get warnings with the "working" order, however, this is just because there are no translations files (shame on me). In this case, rcc obviously complains that the qrc files are empty.

      I stumbled upon this issue when I wanted to enable automatic QML compilation for a project of mine in case of release builds. I don't know if this behavior is expected or a fix can be implemented easily. However, if not, I think it would at least be worth documenting the dependency on order of the CONFIG options when using the Qt Quick Compiler by putting the recipe into a *.pro file directly.

      Attachments

        For Gerrit Dashboard: QTBUG-79672
        # Subject Branch Project Status CR V

        Activity

          People

            jbornema Joerg Bornemann
            mhoeher Martin Höher
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes