diff --git a/rpcs3/rpcs3qt/trophy_manager_dialog.cpp b/rpcs3/rpcs3qt/trophy_manager_dialog.cpp index b1110077be..557d1456eb 100644 --- a/rpcs3/rpcs3qt/trophy_manager_dialog.cpp +++ b/rpcs3/rpcs3qt/trophy_manager_dialog.cpp @@ -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 diff --git a/rpcs3/rpcs3qt/trophy_manager_dialog.h b/rpcs3/rpcs3qt/trophy_manager_dialog.h index af738c94c8..0c63c27853 100644 --- a/rpcs3/rpcs3qt/trophy_manager_dialog.h +++ b/rpcs3/rpcs3qt/trophy_manager_dialog.h @@ -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); ~trophy_manager_dialog() override;