annotate src/gui/translate/anime.cpp @ 19:d05b1be2f3a6

anime_list.cpp: fix build failures on linux For some reason conversion from uint64_t to QVariant is ambiguous on Linux and ONLY Linux.
author Paper <mrpapersonic@gmail.com>
date Tue, 19 Sep 2023 23:10:49 -0400
parents cde8f67a7c7d
children d0adc4aedfc8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
1 #include "core/anime.h"
15
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
2 #include "gui/translate/anime.h"
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
3
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
4 namespace Translate {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
5
15
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
6 std::string ToString(const Anime::ListStatus status) {
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
7 switch (status) {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
8 case Anime::ListStatus::NOT_IN_LIST: return "Not in list";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
9 case Anime::ListStatus::CURRENT: return "Currently watching";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
10 case Anime::ListStatus::PLANNING: return "Plan to watch";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
11 case Anime::ListStatus::COMPLETED: return "Completed";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
12 case Anime::ListStatus::DROPPED: return "Dropped";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
13 case Anime::ListStatus::PAUSED: return "On hold";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
14 default: return "";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
15 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
16 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
17
15
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
18 std::string ToString(const Anime::SeriesFormat format) {
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
19 switch (format) {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
20 case Anime::SeriesFormat::UNKNOWN: return "Unknown";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
21 case Anime::SeriesFormat::TV: return "TV";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
22 case Anime::SeriesFormat::TV_SHORT: return "TV short";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
23 case Anime::SeriesFormat::OVA: return "OVA";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
24 case Anime::SeriesFormat::MOVIE: return "Movie";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
25 case Anime::SeriesFormat::SPECIAL: return "Special";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
26 case Anime::SeriesFormat::ONA: return "ONA";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
27 case Anime::SeriesFormat::MUSIC: return "Music";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
28 default: return "";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
29 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
30 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
31
15
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
32 std::string ToString(const Anime::SeriesSeason season) {
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
33 switch (season) {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
34 case Anime::SeriesSeason::UNKNOWN: return "Unknown";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
35 case Anime::SeriesSeason::WINTER: return "Winter";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
36 case Anime::SeriesSeason::SUMMER: return "Summer";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
37 case Anime::SeriesSeason::FALL: return "Fall";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
38 case Anime::SeriesSeason::SPRING: return "Spring";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
39 default: return "";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
40 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
41 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
42
15
cde8f67a7c7d *: update, megacommit :)
Paper <mrpapersonic@gmail.com>
parents: 10
diff changeset
43 std::string ToString(const Anime::SeriesStatus status) {
10
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
44 switch (status) {
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
45 case Anime::SeriesStatus::UNKNOWN: return "Unknown";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
46 case Anime::SeriesStatus::RELEASING: return "Currently airing";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
47 case Anime::SeriesStatus::FINISHED: return "Finished airing";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
48 case Anime::SeriesStatus::NOT_YET_RELEASED: return "Not yet aired";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
49 case Anime::SeriesStatus::CANCELLED: return "Cancelled";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
50 case Anime::SeriesStatus::HIATUS: return "On hiatus";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
51 default: return "";
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
52 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
53 }
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
54
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
55 } // namespace Translate