1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Fix linux build

This commit is contained in:
nordsoft
2022-12-04 20:48:21 +04:00
parent 20d1d346bb
commit 2489a21ced
2 changed files with 4 additions and 3 deletions

View File

@@ -362,8 +362,9 @@ void MapView::dragEnterEvent(QDragEnterEvent * event)
{
auto encodedData = event->mimeData()->data("application/vcmi.object");
QDataStream stream(&encodedData, QIODevice::ReadOnly);
QJsonObject data;
stream >> data;
QVariant vdata;
stream >> vdata;
auto data = vdata.toJsonObject();
if(!data.empty())
{
auto preview = data["preview"];

View File

@@ -108,7 +108,7 @@ QMimeData * ObjectBrowserProxyModel::mimeData(const QModelIndexList & indexes) c
if(!index.isValid())
return nullptr;
auto text = standardModel->itemFromIndex(mapToSource(index))->data().toJsonObject();
auto text = standardModel->itemFromIndex(mapToSource(index))->data();
stream << text;
QMimeData * mimeData = new QMimeData;