QxtJSON: Add support for long long ints

This commit is contained in:
Adam Higerd 2011-05-03 16:51:19 -05:00
parent 315445f127
commit 810657b593

View File

@ -302,10 +302,13 @@ static QVariant parseLiteral (QTextStream & s,bool & error){
s>>c;
}
s.seek(s.pos()-1);
if(n.contains('.')){
if(n.contains('.')) {
return n.toDouble();
}else{
return n.toInt();
} else {
bool ok = false;
int result = n.toInt(&ok);
if(ok) return result;
return n.toLongLong();
}
}
}