mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fixed conversion warnings caused by Qt
This commit is contained in:
parent
24efb9b413
commit
a3d4f9d22f
@ -84,9 +84,9 @@ JsonNode toJson(QVariant object)
|
||||
ret.Struct() = VariantToMap(object.toMap());
|
||||
else if (object.canConvert<QVariantList>())
|
||||
ret.Vector() = VariantToList(object.toList());
|
||||
else if (object.type() == QMetaType::QString)
|
||||
else if (static_cast<QMetaType::Type>(object.type()) == QMetaType::QString)
|
||||
ret.String() = object.toString().toUtf8().data();
|
||||
else if (object.type() == QMetaType::Bool)
|
||||
else if (static_cast<QMetaType::Type>(object.type()) == QMetaType::Bool)
|
||||
ret.Bool() = object.toBool();
|
||||
else if (object.canConvert<double>())
|
||||
ret.Float() = object.toFloat();
|
||||
|
Loading…
Reference in New Issue
Block a user