mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Fixed Json conversion on Qt6
This commit is contained in:
parent
f593c2cf6e
commit
01af231084
@ -2,6 +2,8 @@
|
||||
|
||||
### GENERAL:
|
||||
* Fixed movement cost penalty from terrain
|
||||
* Fixed blocked progress in Launcher on language detection failure
|
||||
* Launcher will now correctly handle selection of Data directory in H3 install
|
||||
|
||||
# 1.1.1 -> 1.2.0
|
||||
|
||||
|
@ -190,7 +190,7 @@ void FirstLaunchView::heroesDataMissing()
|
||||
ui->labelDataCopy->setVisible(true);
|
||||
|
||||
ui->labelDataFound->setVisible(false);
|
||||
ui->pushButtonDataNext->setEnabled(true);
|
||||
ui->pushButtonDataNext->setEnabled(false);
|
||||
|
||||
if(hasVCMIBuilderScript)
|
||||
{
|
||||
|
@ -96,14 +96,14 @@ JsonNode toJson(QVariant object)
|
||||
{
|
||||
JsonNode ret;
|
||||
|
||||
if(object.canConvert<QVariantMap>())
|
||||
ret.Struct() = VariantToMap(object.toMap());
|
||||
else if(object.canConvert<QVariantList>())
|
||||
ret.Vector() = VariantToList(object.toList());
|
||||
else if(object.userType() == QMetaType::QString)
|
||||
if(object.userType() == QMetaType::QString)
|
||||
ret.String() = object.toString().toUtf8().data();
|
||||
else if(object.userType() == QMetaType::Bool)
|
||||
ret.Bool() = object.toBool();
|
||||
else if(object.canConvert<QVariantMap>())
|
||||
ret.Struct() = VariantToMap(object.toMap());
|
||||
else if(object.canConvert<QVariantList>())
|
||||
ret.Vector() = VariantToList(object.toList());
|
||||
else if(object.canConvert<int>())
|
||||
ret.Integer() = object.toInt();
|
||||
else if(object.canConvert<double>())
|
||||
|
Loading…
Reference in New Issue
Block a user