mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
Qt: make trophy type translateable
This commit is contained in:
parent
5e6928a182
commit
4aae9a17c1
@ -611,8 +611,8 @@ void trophy_manager_dialog::ApplyFilter()
|
||||
continue;
|
||||
}
|
||||
|
||||
const int trophy_id = item->text().toInt();
|
||||
const QString trophy_type = type_item->text();
|
||||
const int trophy_id = item->text().toInt();
|
||||
const int trophy_type = type_item->data(Qt::UserRole).toInt();
|
||||
|
||||
// I could use boolean logic and reduce this to something much shorter and also much more confusing...
|
||||
const bool hidden = icon_item->data(Qt::UserRole).toBool();
|
||||
@ -637,10 +637,10 @@ void trophy_manager_dialog::ApplyFilter()
|
||||
{
|
||||
hide = true;
|
||||
}
|
||||
else if ((trophy_type == Bronze && !m_show_bronze_trophies)
|
||||
|| (trophy_type == Silver && !m_show_silver_trophies)
|
||||
|| (trophy_type == Gold && !m_show_gold_trophies)
|
||||
|| (trophy_type == Platinum && !m_show_platinum_trophies))
|
||||
else if ((trophy_type == SCE_NP_TROPHY_GRADE_BRONZE && !m_show_bronze_trophies)
|
||||
|| (trophy_type == SCE_NP_TROPHY_GRADE_SILVER && !m_show_silver_trophies)
|
||||
|| (trophy_type == SCE_NP_TROPHY_GRADE_GOLD && !m_show_gold_trophies)
|
||||
|| (trophy_type == SCE_NP_TROPHY_GRADE_PLATINUM && !m_show_platinum_trophies))
|
||||
{
|
||||
hide = true;
|
||||
}
|
||||
@ -827,14 +827,14 @@ void trophy_manager_dialog::PopulateTrophyTable()
|
||||
const QString platinum_relevant = platinum_link_id < 0 ? tr("No") : tr("Yes");
|
||||
|
||||
// Get trophy type
|
||||
QString trophy_type = "";
|
||||
QString trophy_type;
|
||||
|
||||
switch (n->GetAttribute("ttype")[0])
|
||||
{
|
||||
case 'B': details.trophyGrade = SCE_NP_TROPHY_GRADE_BRONZE; trophy_type = Bronze; break;
|
||||
case 'S': details.trophyGrade = SCE_NP_TROPHY_GRADE_SILVER; trophy_type = Silver; break;
|
||||
case 'G': details.trophyGrade = SCE_NP_TROPHY_GRADE_GOLD; trophy_type = Gold; break;
|
||||
case 'P': details.trophyGrade = SCE_NP_TROPHY_GRADE_PLATINUM; trophy_type = Platinum; break;
|
||||
case 'B': details.trophyGrade = SCE_NP_TROPHY_GRADE_BRONZE; trophy_type = tr("Bronze", "Trophy type"); break;
|
||||
case 'S': details.trophyGrade = SCE_NP_TROPHY_GRADE_SILVER; trophy_type = tr("Silver", "Trophy type"); break;
|
||||
case 'G': details.trophyGrade = SCE_NP_TROPHY_GRADE_GOLD; trophy_type = tr("Gold", "Trophy type"); break;
|
||||
case 'P': details.trophyGrade = SCE_NP_TROPHY_GRADE_PLATINUM; trophy_type = tr("Platinum", "Trophy type"); break;
|
||||
}
|
||||
|
||||
// Get hidden state
|
||||
|
@ -48,11 +48,6 @@ class trophy_manager_dialog : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
const QString Bronze = "Bronze";
|
||||
const QString Silver = "Silver";
|
||||
const QString Gold = "Gold";
|
||||
const QString Platinum = "Platinum";
|
||||
|
||||
public:
|
||||
explicit trophy_manager_dialog(std::shared_ptr<gui_settings> gui_settings);
|
||||
~trophy_manager_dialog() override;
|
||||
|
Loading…
Reference in New Issue
Block a user