From c09ff382a41cfc631efa9392bdb3143bd4c713a5 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 5 Jun 2019 18:39:46 -0400 Subject: yuzu/configuration: Make all widgets and dialogs aware of language changes To prepare for translation support, this makes all of the widgets cognizant of the language change event that occurs whenever installTranslator() is called and automatically retranslates their text where necessary. This is important as calling the backing UI's retranslateUi() is often not enough, particularly in cases where we add our own strings that aren't controlled by it. In that case we need to manually refresh the strings ourselves. --- src/yuzu/configuration/configure_hotkeys.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/yuzu/configuration/configure_hotkeys.h') diff --git a/src/yuzu/configuration/configure_hotkeys.h b/src/yuzu/configuration/configure_hotkeys.h index a1f4c7134..8f8c6173b 100644 --- a/src/yuzu/configuration/configure_hotkeys.h +++ b/src/yuzu/configuration/configure_hotkeys.h @@ -22,7 +22,6 @@ public: ~ConfigureHotkeys() override; void ApplyConfiguration(HotkeyRegistry& registry); - void RetranslateUI(); /** * Populates the hotkey list widget using data from the provided registry. @@ -32,6 +31,9 @@ public: void Populate(const HotkeyRegistry& registry); private: + void changeEvent(QEvent* event) override; + void RetranslateUI(); + void Configure(QModelIndex index); bool IsUsedKey(QKeySequence key_sequence) const; -- cgit v1.2.3