summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base/systeminfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/base/systeminfo.cpp')
-rw-r--r--rbutil/rbutilqt/base/systeminfo.cpp55
1 files changed, 32 insertions, 23 deletions
diff --git a/rbutil/rbutilqt/base/systeminfo.cpp b/rbutil/rbutilqt/base/systeminfo.cpp
index 67b0428ceb..2aece49110 100644
--- a/rbutil/rbutilqt/base/systeminfo.cpp
+++ b/rbutil/rbutilqt/base/systeminfo.cpp
@@ -27,28 +27,23 @@ const static struct {
27 SystemInfo::SystemInfos info; 27 SystemInfo::SystemInfos info;
28 const char* name; 28 const char* name;
29} SystemInfosList[] = { 29} SystemInfosList[] = {
30 { SystemInfo::ManualUrl, "manual_url" }, 30 { SystemInfo::ManualUrl, ":build:/manual_url" },
31 { SystemInfo::BleedingUrl, "bleeding_url" }, 31 { SystemInfo::BuildUrl, ":build:/build_url" },
32 { SystemInfo::BootloaderUrl, "bootloader_url" }, 32 { SystemInfo::FontUrl, ":build:/font_url" },
33 { SystemInfo::BootloaderInfoUrl, "bootloader_info_url" }, 33 { SystemInfo::VoiceUrl, ":build:/voice_url" },
34 { SystemInfo::ReleaseFontUrl, "release_font_url" }, 34 { SystemInfo::BootloaderUrl, "bootloader/download_url" },
35 { SystemInfo::DailyFontUrl, "daily_font_url" }, 35 { SystemInfo::BootloaderInfoUrl, "bootloader/info_url" },
36 { SystemInfo::DailyVoiceUrl, "daily_voice_url" }, 36 { SystemInfo::DoomUrl, "doom_url" },
37 { SystemInfo::ReleaseVoiceUrl, "release_voice_url" }, 37 { SystemInfo::Duke3DUrl, "duke3d_url" },
38 { SystemInfo::DoomUrl, "doom_url" }, 38 { SystemInfo::PuzzFontsUrl, "puzzfonts_url" },
39 { SystemInfo::Duke3DUrl, "duke3d_url" }, 39 { SystemInfo::QuakeUrl, "quake_url" },
40 { SystemInfo::PuzzFontsUrl, "puzzfonts_url" }, 40 { SystemInfo::Wolf3DUrl, "wolf3d_url" },
41 { SystemInfo::QuakeUrl, "quake_url" }, 41 { SystemInfo::XWorldUrl, "xworld_url" },
42 { SystemInfo::Wolf3DUrl, "wolf3d_url" }, 42 { SystemInfo::BuildInfoUrl, "build_info_url" },
43 { SystemInfo::XWorldUrl, "xworld_url" }, 43 { SystemInfo::GenlangUrl, "genlang_url" },
44 { SystemInfo::ReleaseUrl, "release_url" }, 44 { SystemInfo::ThemesUrl, "themes_url" },
45 { SystemInfo::CandidateUrl, "rc_url" }, 45 { SystemInfo::ThemesInfoUrl, "themes_info_url" },
46 { SystemInfo::DailyUrl, "daily_url" }, 46 { SystemInfo::RbutilUrl, "rbutil_url" },
47 { SystemInfo::BuildInfoUrl, "build_info_url" },
48 { SystemInfo::GenlangUrl, "genlang_url" },
49 { SystemInfo::ThemesUrl, "themes_url" },
50 { SystemInfo::ThemesInfoUrl, "themes_info_url" },
51 { SystemInfo::RbutilUrl, "rbutil_url" },
52}; 47};
53 48
54const static struct { 49const static struct {
@@ -84,7 +79,7 @@ void SystemInfo::ensureSystemInfoExists()
84} 79}
85 80
86 81
87QVariant SystemInfo::value(enum SystemInfos info) 82QVariant SystemInfo::value(enum SystemInfos info, BuildType type)
88{ 83{
89 ensureSystemInfoExists(); 84 ensureSystemInfoExists();
90 85
@@ -93,6 +88,20 @@ QVariant SystemInfo::value(enum SystemInfos info)
93 while(SystemInfosList[i].info != info) 88 while(SystemInfosList[i].info != info)
94 i++; 89 i++;
95 QString s = SystemInfosList[i].name; 90 QString s = SystemInfosList[i].name;
91 switch(type) {
92 case BuildDaily:
93 s.replace(":build:", "daily");
94 break;
95 case BuildCurrent:
96 s.replace(":build:", "development");
97 break;
98 case BuildCandidate:
99 s.replace(":build:", "release-candidate");
100 break;
101 case BuildRelease:
102 s.replace(":build:", "release");
103 break;
104 }
96 LOG_INFO() << "GET:" << s << systemInfos->value(s).toString(); 105 LOG_INFO() << "GET:" << s << systemInfos->value(s).toString();
97 return systemInfos->value(s); 106 return systemInfos->value(s);
98} 107}