aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2014-09-04 12:53:14 +0200
committerShawn Rutledge <shawn.rutledge@digia.com>2014-09-04 14:32:11 +0200
commit4d861e830ab73d302a9e0a2760d397ac4e99d298 (patch)
tree673b98c1eefde116d7885b0ba408bf50ffe151e2
parent5b162837d86c38ecea715627aaf448b2eb23728a (diff)
qmlscene: load master translation file before more specific ones
It was giving up too early because qmlscene_??.qm doesn't exist. The file qt_??.qm links to all existing Qt-provided translation files, so it is enough by itself unless there are application-specific translations besides. Change-Id: Iebedf54ddb4eef4f4d7da8a7fade1850a366aee8 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
-rw-r--r--tools/qmlscene/main.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index e4809fec48..208226c8aa 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -418,14 +418,10 @@ int main(int argc, char ** argv)
QTranslator translator;
QTranslator qtTranslator;
QString sysLocale = QLocale::system().name();
- if (translator.load(QLatin1String("qmlscene_") + sysLocale, QLibraryInfo::location(QLibraryInfo::TranslationsPath))) {
+ if (qtTranslator.load(QLatin1String("qt_") + sysLocale, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
+ app.installTranslator(&qtTranslator);
+ if (translator.load(QLatin1String("qmlscene_") + sysLocale, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
app.installTranslator(&translator);
- if (qtTranslator.load(QLatin1String("qt_") + sysLocale, QLibraryInfo::location(QLibraryInfo::TranslationsPath))) {
- app.installTranslator(&qtTranslator);
- } else {
- app.removeTranslator(&translator);
- }
- }
QTranslator qmlTranslator;
if (!options.translationFile.isEmpty()) {