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

QQmlApplicationEngine: automatic loading of translations doesn't work from resources

XMLWordPrintable

      The documentation says that QQmlApplicationEngine will automatically load translations from i18n/qml_*.qm in the directory of the QML file. This works if the QML file resides in a normal filesystem but not if it is stored in the resources.

      I looked into the sources of Qt and it seems that the bug is in QQmlApplicationEnginePrivate::loadTranslations(). It allows rootFile.scheme() to be "qrc" but then calls rootFile.toLocalFile() anyway, which doesn't work for qrc URLs.

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

            Unassigned Unassigned
            enz Markus Enzenberger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes