diff src/gui/pages/anime_list.cc @ 211:7cf53145de11

strings: use templates for ToInt, std::to_string -> Strings::ToUtf8String
author Paper <mrpapersonic@gmail.com>
date Sun, 07 Jan 2024 09:54:17 -0500
parents bc1ae1810855
children 2f5a9247e501
line wrap: on
line diff
--- a/src/gui/pages/anime_list.cc	Tue Jan 02 02:37:03 2024 -0500
+++ b/src/gui/pages/anime_list.cc	Sun Jan 07 09:54:17 2024 -0500
@@ -119,7 +119,7 @@
 					std::optional<unsigned int> year = list[index.row()].GetAirDate().GetYear();
 					if (!year)
 						return "Unknown Unknown";
-					return Strings::ToQString(Translate::ToLocalString(list[index.row()].GetSeason()) + " " + std::to_string(year.value()));
+					return Strings::ToQString(Translate::ToLocalString(list[index.row()].GetSeason()) + " " + Strings::ToUtf8String(year.value()));
 				}
 				case AL_AVG_SCORE: return QString::number(list[index.row()].GetAudienceScore()) + "%";
 				case AL_STARTED: return list[index.row()].GetUserDateStarted().GetAsQDate();
@@ -349,8 +349,8 @@
 
 void AnimeListPage::RefreshTabs() {
 	for (unsigned int i = 0; i < sort_models.size(); i++)
-		tab_bar->setTabText(i, Strings::ToQString(Translate::ToString(Anime::ListStatuses[i]) + " (" +
-								   std::to_string(Anime::db.GetListsAnimeAmount(Anime::ListStatuses[i])) + ")"));
+		tab_bar->setTabText(i, Strings::ToQString(Translate::ToString(Anime::ListStatuses[i])) + " (" +
+								   QString::number(Anime::db.GetListsAnimeAmount(Anime::ListStatuses[i])) + ")");
 }
 
 void AnimeListPage::Refresh() {