Modify regex to recognize edition from jason #4933

This commit is contained in:
Jerry (Xinyu Hou)
2015-11-13 11:04:23 -08:00
parent ad16599fa5
commit 2fd0d5c68f

View File

@@ -50,7 +50,7 @@ int WebClient::getEdition(
if (resultRegex.exactMatch(responseJson)) {
QString boolString = resultRegex.cap(1);
if (boolString == "true") {
QRegExp editionRegex(".*\"edition\".*:.*\"([^\"]+)\".*");
QRegExp editionRegex(".*\"edition\":(0|1|2|3).*");
if (editionRegex.exactMatch(responseJson)) {
QString e = editionRegex.cap(1);
edition = e.toInt();