summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2018-06-28 17:25:59 +0200
committerKai Koehne <kai.koehne@qt.io>2018-07-18 06:40:46 +0000
commit785b12a4d126b8aaac6c378d06a5c885aa5441a7 (patch)
treed7cb94593357c7294c0b1a55aa1c16146c38238b /examples
parent369998639b37b5de46ab1b19b3dd6ca6c2b77d34 (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. Task-number: QTBUG-69196 Change-Id: Ic7f7a2c70763f0c7200782d6e46644f2b3f7f3ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/demos/photoviewer/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/quick/demos/photoviewer/main.cpp b/examples/quick/demos/photoviewer/main.cpp
index a269a61dcb..6276bd61a5 100644
--- a/examples/quick/demos/photoviewer/main.cpp
+++ b/examples/quick/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;