summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-08-21 21:28:53 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-08-21 21:31:44 +0200
commit2aecb3b9ea99a00e4438a2efa97ad326b24f6d4c (patch)
tree9f78758be629354124452b8f811c3530e209e05a
parentf850bbbbc4b7345bebde241f651bad1c5c28df66 (diff)
downloadrockbox-2aecb3b9ea.tar.gz
rockbox-2aecb3b9ea.tar.bz2
rockbox-2aecb3b9ea.zip
rbutil: Use a non-zero default value for status.
When resolving the status values downloaded from the server use a negative value as default. Since 0 is the default in QSettings but now considered as "retired" a missing status value would make that target appear as retired instead of unknown status. Change-Id: I23567413c5c3d5828fca7f9c5a29e2037e8614cf
-rw-r--r--rbutil/rbutilqt/base/serverinfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/base/serverinfo.cpp b/rbutil/rbutilqt/base/serverinfo.cpp
index d2588abfc4..6fa685939d 100644
--- a/rbutil/rbutilqt/base/serverinfo.cpp
+++ b/rbutil/rbutilqt/base/serverinfo.cpp
@@ -115,7 +115,7 @@ void ServerInfo::readBuildInfo(QString file)
info.beginGroup("status");
QString status = tr("Unknown");
- switch(info.value(platforms.at(i)).toInt())
+ switch(info.value(platforms.at(i), -1).toInt())
{
case 0:
status = tr("Stable (Retired)");