mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 20:40:29 +08:00
refs #459 Fixed JSON deserialization of qint64 values.
This commit is contained in:
@@ -13,13 +13,13 @@ const QJsonValue &operator >>(const QJsonValue &json, int &value)
|
|||||||
|
|
||||||
const QJsonValue &operator >>(const QJsonValue &json, qlonglong &value)
|
const QJsonValue &operator >>(const QJsonValue &json, qlonglong &value)
|
||||||
{
|
{
|
||||||
value = static_cast<qlonglong>(json.toInt());
|
value = static_cast<qlonglong>(json.toDouble());
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QJsonValue &operator >>(const QJsonValue &json, qulonglong &value)
|
const QJsonValue &operator >>(const QJsonValue &json, qulonglong &value)
|
||||||
{
|
{
|
||||||
value = static_cast<qulonglong>(json.toInt());
|
value = static_cast<qulonglong>(json.toDouble());
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,13 +67,13 @@ const QJsonValueRef &operator >>(const QJsonValueRef &json, int &value)
|
|||||||
|
|
||||||
const QJsonValueRef &operator >>(const QJsonValueRef &json, qlonglong &value)
|
const QJsonValueRef &operator >>(const QJsonValueRef &json, qlonglong &value)
|
||||||
{
|
{
|
||||||
value = static_cast<qlonglong>(json.toInt());
|
value = static_cast<qlonglong>(json.toDouble());
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QJsonValueRef &operator >>(const QJsonValueRef &json, qulonglong &value)
|
const QJsonValueRef &operator >>(const QJsonValueRef &json, qulonglong &value)
|
||||||
{
|
{
|
||||||
value = static_cast<qulonglong>(json.toInt());
|
value = static_cast<qulonglong>(json.toDouble());
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user