Skip to content

Commit

Permalink
Fixed: Compilation error with old Qt versions
Browse files Browse the repository at this point in the history
The QString constructor used in the JSON parser was added in Qt 4.7,
while the Mac OS X 10.4 build is using Qt 4.6.
  • Loading branch information
skyjake committed Jun 9, 2012
1 parent bf21986 commit 9f52bed
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions doomsday/engine/portable/src/json.cpp
Expand Up @@ -210,8 +210,7 @@ class JSONParser
result.append(c);
}
}
result.append(0);
return QString(result.constData());
return QString(result.constData(), result.size());
}

QVariant parseNumber()
Expand Down Expand Up @@ -256,8 +255,7 @@ class JSONParser
// Rewind one char (the loop was broken when a non-digit was read).
pos--;
skipWhite();
str.append(0);
double value = QString(str.constData()).toDouble();
double value = QString(str.constData(), str.size()).toDouble();
if(hasDecimal)
{
return QVariant(value);
Expand Down

0 comments on commit 9f52bed

Please sign in to comment.