aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qml
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2014-10-16 10:10:04 +0200
committerShawn Rutledge <shawn.rutledge@digia.com>2014-10-28 12:37:05 +0100
commit05d8ffb4dff5e693967c8ee7cee6d6158eadccbd (patch)
treef0784506f4575f24062f6a8687ae198d6f635ada /tools/qml
parent94297b4ca50439d27dd5c3de6ff225185647cc46 (diff)
Revert: use the new form of QTranslator::load() for more flexibility
This reverts commit 427646b8d7c52e5b84240e07ffd391217ce3bfa8. It seems that it should have been more correct, but we are still not shipping English translations, and static QString find_translation() in qtranslator.cpp will return any language which is in QLocale::uiLanguages() for which the translation file is found. That is a long list on OSX. Reverting the patch means find_translation() is not called in such cases. This change can be re-done whenever we are more sure that the attempt to find a translation will succeed in finding a sensible one, or fall back to not translating, rather than choosing a language that the user didn't intend. Task-number: QTBUG-41977 Change-Id: I425946cc71cec96b4f38629eb2b7e80220c5236d Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Diffstat (limited to 'tools/qml')
-rw-r--r--tools/qml/main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 7a08562a13..69ccd7a316 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -450,8 +450,10 @@ int main(int argc, char *argv[])
verboseMode = false;
#ifndef QT_NO_TRANSLATION
- // qt_ translations are loaded by QQmlApplicationEngine
- if (!translationFile.isEmpty()) { // Note: installed before QQmlApplicationEngine's automatic translation loading
+ //qt_ translations loaded by QQmlApplicationEngine
+ QString sysLocale = QLocale::system().name();
+
+ if (!translationFile.isEmpty()) { //Note: installed before QQmlApplicationEngine's automatic translation loading
QTranslator translator;
if (translator.load(translationFile)) {