summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2018-07-17 14:11:49 +0200
committerKai Koehne <kai.koehne@qt.io>2018-07-28 19:45:29 +0000
commit1a82dd567f5b11de0bfd534199b3dbdb4cdf2f77 (patch)
treef884b4aa05a83fdf04592b4d55f3bec38af4c169 /examples
parent6126fcfbf477daa2d2f03faf91bbabd30a6edd3a (diff)
photoviewer: Use QLocale::uiLanguages() for finding translations
Now that we ship en translations, we can use the QTranslator::load(QLocale, ...) overload to correctly find translated files. See 785b12a4d126 for the corresponding change in qtdeclarative/5.11. Task-number: QTBUG-69196 Change-Id: Ic7f7a2c70763f0c7200782d6e46644f2b3f7f3ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/demos/photoviewer/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/demos/photoviewer/main.cpp b/examples/demos/photoviewer/main.cpp
index 854669559..e9d828230 100644
--- a/examples/demos/photoviewer/main.cpp
+++ b/examples/demos/photoviewer/main.cpp
@@ -58,7 +58,7 @@ int main(int argc, char *argv[])
QGuiApplication app(argc, argv);
QTranslator qtTranslator;
- qtTranslator.load("qml_" + QLocale::system().name(), ":/i18n/");
+ qtTranslator.load(QLocale(), "qml", "_", ":/i18n/");
app.installTranslator(&qtTranslator);
QQmlApplicationEngine engine;