1
0
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:
Ivan Savenko 2023-04-19 23:10:34 +03:00
parent f593c2cf6e
commit 01af231084
3 changed files with 8 additions and 6 deletions

View File

@ -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

View File

@ -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)
{

View File

@ -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>())