graphic_breakpoints: Correct translation of strings in BreakpointModel's data() function

tr() will not function properly on static/global data like this, as the
object is only ever constructed once, so the strings won't translate if
the language is changed without restarting the program, which is
undesirable. Instead we can just turn the map into a plain old function
that maps the values to their equivalent strings. This is also lessens
the memory allocated, since it's only allocating memory for the strings
themselves, and not an encompassing map as well.
This commit is contained in:
Lioncash
2018-10-24 10:56:16 -04:00
parent 77e705a8fa
commit 030847d5fa
2 changed files with 20 additions and 15 deletions

View File

@ -29,6 +29,8 @@ public:
void OnResumed();
private:
static QString DebugContextEventToString(Tegra::DebugContext::Event event);
std::weak_ptr<Tegra::DebugContext> context_weak;
bool at_breakpoint;
Tegra::DebugContext::Event active_breakpoint;