Try to correctly convert back to ints or floats when the protocol was
purely string based and killed the typing (like SOAP). svn path=/branches/work/~ervin/qtjolie/; revision=978073
This commit is contained in:
parent
4df21c1b83
commit
3f553aafe3
@ -109,6 +109,8 @@ qint32 Value::toInt() const
|
||||
{
|
||||
if (isInt()) {
|
||||
return d->content.toInt();
|
||||
} else if (isByteArray()) {
|
||||
return d->content.toByteArray().toInt();
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
@ -118,6 +120,8 @@ double Value::toDouble() const
|
||||
{
|
||||
if (isDouble()) {
|
||||
return d->content.toDouble();
|
||||
} else if (isByteArray()) {
|
||||
return d->content.toByteArray().toInt();
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user