rbutil: Rework server info data handling.
Allow extracting release candidate version even if no URL is present. Avoids a special case for version handling. Change-Id: If496d30059c3181899ab9337a35a07b39eaef52e
This commit is contained in:
parent
104ff3433a
commit
9bb60b7d85
2 changed files with 3 additions and 9 deletions
|
@ -81,14 +81,8 @@ QVariant ServerInfo::platformValue(enum ServerInfos info, QString platform)
|
|||
value = ServerInfo::statusToString(value.toInt());
|
||||
break;
|
||||
case CurReleaseVersion:
|
||||
value = value.toStringList().at(0);
|
||||
break;
|
||||
case RelCandidateVersion:
|
||||
// currently only the <version>,<url> format is supported here.
|
||||
if (value.toStringList().size() > 1)
|
||||
value = value.toStringList().at(0);
|
||||
else
|
||||
value.clear();
|
||||
value = value.toStringList().at(0);
|
||||
break;
|
||||
case CurReleaseUrl:
|
||||
{
|
||||
|
|
|
@ -82,9 +82,9 @@ const struct testvector testdata[] =
|
|||
{ "iriverh10", ServerInfo::CurStatus, "Stable (Retired)" },
|
||||
{ "gigabeatfx", ServerInfo::RelCandidateVersion, "f9dce96" },
|
||||
{ "gigabeatfx", ServerInfo::RelCandidateUrl, "http://dl.rockbox.org/rc/f9dce96/rockbox-gigabeatfx.zip" },
|
||||
{ "archosfmrecorder", ServerInfo::RelCandidateVersion, "" },
|
||||
{ "archosfmrecorder", ServerInfo::RelCandidateVersion, "f9dce96" },
|
||||
{ "archosfmrecorder", ServerInfo::RelCandidateUrl, "" },
|
||||
{ "archosrecorder", ServerInfo::RelCandidateVersion, "" },
|
||||
{ "archosrecorder", ServerInfo::RelCandidateVersion, "f9dce96" },
|
||||
{ "archosrecorder", ServerInfo::RelCandidateUrl, "" },
|
||||
{ "iaudiox5", ServerInfo::RelCandidateVersion, "f9dce96" },
|
||||
{ "iaudiox5", ServerInfo::RelCandidateUrl, "http://dl.rockbox.org/rc/f9dce96/rockbox-iaudiox5.zip" },
|
||||
|
|
Loading…
Reference in a new issue