mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-25 07:07:21 -08:00
userapps.cpp: Write 'None' if no required feature found
This commit is contained in:
parent
9e7edc8d53
commit
74f1d58f0b
1 changed files with 9 additions and 1 deletions
10
userapps.cpp
10
userapps.cpp
|
@ -233,7 +233,12 @@ QString userapps::parseJsonShow(QJsonObject json)
|
|||
else if(value.isArray()) {
|
||||
QJsonArray array = value.toArray();
|
||||
if(key == "RequiredFeatures") {
|
||||
bool foundRequiredFeature = false;
|
||||
appendString.append("None");
|
||||
|
||||
for(QJsonValueRef ref: array) {
|
||||
foundRequiredFeature = true;
|
||||
appendString.remove(appendString.size() - 4, 4);
|
||||
int id = ref.toInt();
|
||||
if(id == 0) {
|
||||
appendString.append("Wi-Fi connection");
|
||||
|
@ -246,7 +251,10 @@ QString userapps::parseJsonShow(QJsonObject json)
|
|||
}
|
||||
appendString.append(", ");
|
||||
}
|
||||
appendString.remove(appendString.size() - 2, 2);
|
||||
|
||||
if(foundRequiredFeature == true) {
|
||||
appendString.remove(appendString.size() - 2, 2);
|
||||
}
|
||||
}
|
||||
else if(key == "SupportedDevices") {
|
||||
for(QJsonValueRef ref: array) {
|
||||
|
|
Loading…
Reference in a new issue