[X2Go-Commits] [x2goclient] 07/08: onmainwindow.cpp: workaround https://bugreports.qt.io/browse/QTBUG-25973.
git-admin at x2go.org
git-admin at x2go.org
Mon May 11 07:02:32 CEST 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch bugfix/translation
in repository x2goclient.
commit 553b75c1e5459777ea87f7214d2aa875d005bc0a
Author: Mihai Moldovan <ionic at ionic.de>
Date: Mon May 11 07:01:52 2015 +0200
onmainwindow.cpp: workaround https://bugreports.qt.io/browse/QTBUG-25973.
---
debian/changelog | 1 +
src/onmainwindow.cpp | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 471c601..a495fee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -392,6 +392,7 @@ x2goclient (4.0.4.0-0x2go1) UNRELEASED; urgency=low
- onmainwindow.h: make get_translator() const. Does not change any state.
- onmainwindow.cpp: fix compile error triggered by a missing
parenthesis/typo.
+ - onmainwindow.cpp: workaround https://bugreports.qt.io/browse/QTBUG-25973.
[ Fernando Pedemonte ]
* New upstream release (4.0.4.0):
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 76c210d..fecf6ed 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -589,8 +589,14 @@ bool ONMainWindow::get_translator (QString file_name_start, QTranslator **transl
break;
}
else {
+ /*
+ * QLocale::uiLanguages() may return an unexpected format.
+ * See: https://bugreports.qt.io/browse/QTBUG-25973
+ */
+ QString tmp_locale = (*it);
+ tmp_locale.replace ("-", "_");
load_filename = filename;
- load_filename.append ("_").append (*it);
+ load_filename.append ("_").append (tmp_locale);
if (tmp_translator->load (load_filename)) {
/* Some translation successfully loaded. That's good enough. */
--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list