diff options
author | Kai Koehne <kai.koehne@qt.io> | 2018-07-26 09:15:26 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2018-07-28 19:45:21 +0000 |
commit | 2f06030e8039abf0bef1316af6edc8e283a96329 (patch) | |
tree | 44fabb8646c87fd7e0ffb7eac516fb6895dc44d9 /examples/demos/photoviewer/photoviewer.pro | |
parent | aacaab196b7e1b03213768003539b5616f845725 (diff) |
photoviewer: Fix translations
It doesn't make any sense to put .ts files into resources,
because QTranslator can only parse compiled .qm files.
Therefore the application does not load any translations
at all. This error was introduced in 70ce5f4d3ec, when
the example was imported from qtdeclarative.
Anyhow, the previous version of the example in qtdeclarative
required the user to run lrelease manually, which is ugly
and made the example unfit for automatic testing.
Instead, use the new capabilities of qmake to compile
and embed translation files automatically.
Change-Id: Ic02171bfc9994ece3da658b69f0de0a27cb39cc5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'examples/demos/photoviewer/photoviewer.pro')
-rw-r--r-- | examples/demos/photoviewer/photoviewer.pro | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/demos/photoviewer/photoviewer.pro b/examples/demos/photoviewer/photoviewer.pro index 282ab9286..52f10e73b 100644 --- a/examples/demos/photoviewer/photoviewer.pro +++ b/examples/demos/photoviewer/photoviewer.pro @@ -1,10 +1,11 @@ TEMPLATE = app QT += qml quick xmlpatterns +CONFIG += lrelease embed_translations SOURCES += main.cpp -lupdate_only{ +lupdate_only { SOURCES = *.qml \ PhotoViewerCore/*.qml \ PhotoViewerCore/script/*.js |