summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/sysinfo.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2011-10-02 14:30:05 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2011-10-02 14:30:05 +0000
commit2e3de70401379c044fdd3696e7cc6dc78aace808 (patch)
tree1e208b0dc8be1d0377f0c47533d3e839448473f6 /rbutil/rbutilqt/sysinfo.cpp
parentd25341a032a19985af85c72b95964bef812971c3 (diff)
downloadrockbox-2e3de70401379c044fdd3696e7cc6dc78aace808.tar.gz
rockbox-2e3de70401379c044fdd3696e7cc6dc78aace808.zip
Rockbox Utility: listen to translation change events.
When changing the language don't require a restart anymore. Instead listen to the appropriate changeEvent and retranslate the UI. Designer generated UI files already provide such a function. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30633 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/sysinfo.cpp')
-rw-r--r--rbutil/rbutilqt/sysinfo.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/sysinfo.cpp b/rbutil/rbutilqt/sysinfo.cpp
index 1b2f44923b..864cc5788c 100644
--- a/rbutil/rbutilqt/sysinfo.cpp
+++ b/rbutil/rbutilqt/sysinfo.cpp
@@ -81,3 +81,12 @@ QString Sysinfo::getInfo()
81} 81}
82 82
83 83
84void Sysinfo::changeEvent(QEvent *e)
85{
86 if(e->type() == QEvent::LanguageChange) {
87 ui.retranslateUi(this);
88 } else {
89 QWidget::changeEvent(e);
90 }
91}
92