summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/configure.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-11-15 21:55:34 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-11-15 21:55:34 +0100
commitdec5421ca2cb5ac9e77ce96507d0285a6b0fcfee (patch)
treed8a93441f1ed6f4c21f5e483fa42d5fe7f97b1eb /rbutil/rbutilqt/configure.cpp
parentaf766ae10eb10685bfd81124738b167294b7a8f2 (diff)
downloadrockbox-dec5421ca2cb5ac9e77ce96507d0285a6b0fcfee.tar.gz
rockbox-dec5421ca2cb5ac9e77ce96507d0285a6b0fcfee.tar.bz2
rockbox-dec5421ca2cb5ac9e77ce96507d0285a6b0fcfee.zip
rbutil: Rework server info data handling.
Return status as int, not as string, and provide a separate function for converting to string. This allows to filter based on the actual status, not a (localized) status string, which is more robust. Fix a regression that made players with missing status value show up as retired. Change-Id: I15f83ae0df484199b1b3b5b95069db8b4d425987
Diffstat (limited to 'rbutil/rbutilqt/configure.cpp')
-rw-r--r--rbutil/rbutilqt/configure.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp
index d18f438801..d4457a34ed 100644
--- a/rbutil/rbutilqt/configure.cpp
+++ b/rbutil/rbutilqt/configure.cpp
@@ -386,8 +386,8 @@ void Config::setDevices()
// construct display name
QString curname = SystemInfo::platformValue(
SystemInfo::Name, platformList.at(it)).toString() +
- " (" +ServerInfo::platformValue(
- ServerInfo::CurStatus, platformList.at(it)).toString() +")";
+ " (" + ServerInfo::statusToString(ServerInfo::platformValue(
+ ServerInfo::CurStatus, platformList.at(it)).toInt()) +")";
LOG_INFO() << "add supported device:" << brands.at(c) << curname;
w2 = new QTreeWidgetItem(w, QStringList(curname));
w2->setData(0, Qt::UserRole, platformList.at(it));