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

QT5_ADD_TRANSLATION CMake macro produces list with incorrect file names

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.4
    • 5.9.1
    • Build System: CMake
    • None
    • Windows MSVC2015, Qt5.9.1, CMake 3.9.0
    • ba7fe8fe13fc4984b4cd162df1f3dafa92233664

    Description

      *.ts files with a naming pattern containing multiple dots will result in the qt5_add_translation macro producing an incorrect list of *.qm files, since everything after the first dot is taken as the file extension (instead of the last dot).

      The QTranslator::load documentation states that a naming pattern like 'foo.fr_ca.qm' should be possible, but passing 'foo.fr_ca.ts' to qt5_add_translation will produce a list containing only 'foo.qm'.

      If multiple *.ts files with the same naming pattern are passed to the macro the resulting list will contain 'foo.qm' multiple times, leading to CMake errors.

      The issue was observed with Qt5.9.1 but checking the history of Qt5LinguistToolsMacros.cmake it looks like every release starting from when those macros where added is affected.

       

       

      Attachments

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

        Activity

          People

            mleutelt Martin Leutelt
            mleutelt Martin Leutelt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes