mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +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)
|
||||
{
|
||||
value = static_cast<qlonglong>(json.toInt());
|
||||
value = static_cast<qlonglong>(json.toDouble());
|
||||
return json;
|
||||
}
|
||||
|
||||
const QJsonValue &operator >>(const QJsonValue &json, qulonglong &value)
|
||||
{
|
||||
value = static_cast<qulonglong>(json.toInt());
|
||||
value = static_cast<qulonglong>(json.toDouble());
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -67,13 +67,13 @@ const QJsonValueRef &operator >>(const QJsonValueRef &json, int &value)
|
||||
|
||||
const QJsonValueRef &operator >>(const QJsonValueRef &json, qlonglong &value)
|
||||
{
|
||||
value = static_cast<qlonglong>(json.toInt());
|
||||
value = static_cast<qlonglong>(json.toDouble());
|
||||
return json;
|
||||
}
|
||||
|
||||
const QJsonValueRef &operator >>(const QJsonValueRef &json, qulonglong &value)
|
||||
{
|
||||
value = static_cast<qulonglong>(json.toInt());
|
||||
value = static_cast<qulonglong>(json.toDouble());
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user