diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-11-13 21:53:53 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-11-22 14:43:01 +0100 |
commit | ad37655687cd4861681e561b2a84fabb5c307327 (patch) | |
tree | 1cdc0a1e3fd5c810b8af288907395ee00cdaf366 /rbutil/rbutilqt/test/stubs/stubs-serverinfo.cpp | |
parent | 6b3b4df6f64f1523b76d5f4f26c568ffc208a899 (diff) | |
download | rockbox-ad37655687cd4861681e561b2a84fabb5c307327.tar.gz rockbox-ad37655687cd4861681e561b2a84fabb5c307327.zip |
rbutil: Use pattern replacement for SystemInfo build type.
Use pattern replacement for lookup instead of expanded values. Will
allow simplifying things later for better handling of different build
types.
Change-Id: Iaad67a6c8654d27c3206cf95a379acab169565bc
Diffstat (limited to 'rbutil/rbutilqt/test/stubs/stubs-serverinfo.cpp')
-rw-r--r-- | rbutil/rbutilqt/test/stubs/stubs-serverinfo.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/rbutil/rbutilqt/test/stubs/stubs-serverinfo.cpp b/rbutil/rbutilqt/test/stubs/stubs-serverinfo.cpp index 38336a7a6f..f0fcaf6613 100644 --- a/rbutil/rbutilqt/test/stubs/stubs-serverinfo.cpp +++ b/rbutil/rbutilqt/test/stubs/stubs-serverinfo.cpp @@ -38,27 +38,22 @@ QVariant SystemInfo::platformValue(SystemInfo::PlatformInfo info, QString platfo return QString(); } -QVariant SystemInfo::value(SystemInfo::SystemInfos info) +QVariant SystemInfo::value(SystemInfo::SystemInfos info, SystemInfo::BuildType type) { - switch(info) { - case SystemInfo::ManualUrl: - return QString("https://unittest/manual/rockbox-%MODEL%%FORMAT%"); - break; - case SystemInfo::BleedingUrl: + (void)info; // test is currently only using BuildUrl. + switch(type) { + case SystemInfo::BuildCurrent: return QString("https://unittest/dev/rockbox-%MODEL%.zip"); - break; - case SystemInfo::DailyUrl: + case SystemInfo::BuildDaily: return QString("https://unittest/daily/rockbox-%MODEL%-%RELVERSION%.zip"); - break; - case SystemInfo::ReleaseUrl: + case SystemInfo::BuildRelease: return QString("https://unittest/release/%RELVERSION%/rockbox-%MODEL%-%RELVERSION%.zip"); - break; - case SystemInfo::CandidateUrl: + case SystemInfo::BuildCandidate: return QString("https://unittest/rc/%RELVERSION%/rockbox-%MODEL%-%RELVERSION%.zip"); - break; default: - return QString(); + break; } + return QString(); } QStringList SystemInfo::platforms(SystemInfo::PlatformType type, QString variant) |