mirror of
https://github.com/yuzu-emu/yuzu-mainline
synced 2024-11-23 00:33:50 +00:00
ui: Fix Game Compatibility list translations
Reported by GillianMC on Discord. Looks to be a small quirk in the QT API. setText(QObject::tr(status.text)); bringing up QObject breaks the link with the GameListItemCompat
This commit is contained in:
parent
ca2accfb25
commit
42b8148aca
3 changed files with 6 additions and 3 deletions
|
@ -25,6 +25,7 @@
|
||||||
#include "yuzu/configuration/configure_ui.h"
|
#include "yuzu/configuration/configure_ui.h"
|
||||||
#include "yuzu/configuration/configure_web.h"
|
#include "yuzu/configuration/configure_web.h"
|
||||||
#include "yuzu/hotkeys.h"
|
#include "yuzu/hotkeys.h"
|
||||||
|
#include "yuzu/uisettings.h"
|
||||||
|
|
||||||
ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry,
|
ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry,
|
||||||
InputCommon::InputSubsystem* input_subsystem,
|
InputCommon::InputSubsystem* input_subsystem,
|
||||||
|
@ -169,6 +170,8 @@ void ConfigureDialog::PopulateSelectionList() {
|
||||||
|
|
||||||
void ConfigureDialog::OnLanguageChanged(const QString& locale) {
|
void ConfigureDialog::OnLanguageChanged(const QString& locale) {
|
||||||
emit LanguageChanged(locale);
|
emit LanguageChanged(locale);
|
||||||
|
// Reloading the game list is needed to force retranslation.
|
||||||
|
UISettings::values.is_game_list_reload_pending = true;
|
||||||
// first apply the configuration, and then restore the display
|
// first apply the configuration, and then restore the display
|
||||||
ApplyConfiguration();
|
ApplyConfiguration();
|
||||||
RetranslateUI();
|
RetranslateUI();
|
||||||
|
|
|
@ -164,8 +164,8 @@ public:
|
||||||
}
|
}
|
||||||
const CompatStatus& status = iterator->second;
|
const CompatStatus& status = iterator->second;
|
||||||
setData(compatibility, CompatNumberRole);
|
setData(compatibility, CompatNumberRole);
|
||||||
setText(QObject::tr(status.text));
|
setText(tr(status.text));
|
||||||
setToolTip(QObject::tr(status.tooltip));
|
setToolTip(tr(status.tooltip));
|
||||||
setData(CreateCirclePixmapFromColor(status.color), Qt::DecorationRole);
|
setData(CreateCirclePixmapFromColor(status.color), Qt::DecorationRole);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue