diff src/gui/widgets/anime_info.cc @ 112:80f49f623d30

locale: allow switching locales without restarting
author Paper <mrpapersonic@gmail.com>
date Mon, 06 Nov 2023 13:41:30 -0500
parents d02fdf1d6708
children 9613d72b097e
line wrap: on
line diff
--- a/src/gui/widgets/anime_info.cc	Mon Nov 06 02:03:55 2023 -0500
+++ b/src/gui/widgets/anime_info.cc	Mon Nov 06 13:41:30 2023 -0500
@@ -31,11 +31,15 @@
 	/* details */
 	QString details_data;
 	QTextStream details_data_s(&details_data);
-	details_data_s << Translate::ToString(anime.GetFormat()).c_str() << "\n"
+	/* we have to convert ALL of these strings to
+	   QString because QTextStream sucks and assumes
+	   Latin1 (on Windows?) */
+	details_data_s << Strings::ToQString(Translate::ToString(anime.GetFormat())) << "\n"
 	               << anime.GetEpisodes() << "\n"
-	               << Translate::ToString(anime.GetUserStatus()).c_str() << "\n"
-	               << Translate::ToString(anime.GetSeason()).c_str() << " " << anime.GetAirDate().GetYear() << "\n"
-	               << Strings::Implode(anime.GetGenres(), ", ").c_str() << "\n"
+	               << Strings::ToQString(Translate::ToString(anime.GetUserStatus())) << "\n"
+	               << Strings::ToQString(Translate::ToString(anime.GetSeason())) << " "
+	                   << anime.GetAirDate().GetYear() << "\n"
+	               << Strings::ToQString(Strings::Implode(anime.GetGenres(), ", ")) << "\n"
 	               << anime.GetAudienceScore() << "%";
 	_details->GetParagraph()->SetText(details_data);