Fix maintenance mode detection #5755

The server sends "maintenance": "true" which isn't a json boolean...
This commit is contained in:
Christian Kamm 2017-06-06 10:45:15 +02:00
parent 3d93527a8e
commit cc5fe558ba

View file

@ -139,7 +139,9 @@ void ConnectionValidator::slotStatusFound(const QUrl &url, const QJsonObject &in
return;
}
if (info["maintenance"].toBool()) {
// Check for maintenance mode: Servers send "true", so go through QVariant
// to parse it correctly.
if (info["maintenance"].toVariant().toBool()) {
reportResult(MaintenanceMode);
return;
}