mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Fix crash when dropping comics in sublists
This commit is contained in:
parent
acd5caa9fe
commit
5d10a03044
@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
Version counting is based on semantic versioning (Major.Feature.Patch)
|
Version counting is based on semantic versioning (Major.Feature.Patch)
|
||||||
|
|
||||||
|
## WIP
|
||||||
|
|
||||||
|
### YACReaderLibrary
|
||||||
|
* Fix crash when dropping comics in sublists
|
||||||
|
|
||||||
## 9.13
|
## 9.13
|
||||||
|
|
||||||
### YACReaderLibrary
|
### YACReaderLibrary
|
||||||
|
@ -218,8 +218,13 @@ bool ReadingListModel::canDropMimeData(const QMimeData *data, Qt::DropAction act
|
|||||||
QByteArray rawData = data->data(YACReader::YACReaderLibrarSubReadingListMimeDataFormat);
|
QByteArray rawData = data->data(YACReader::YACReaderLibrarSubReadingListMimeDataFormat);
|
||||||
QDataStream in(&rawData, QIODevice::ReadOnly);
|
QDataStream in(&rawData, QIODevice::ReadOnly);
|
||||||
in >> sublistsRows; // deserialize the list of indentifiers
|
in >> sublistsRows; // deserialize the list of indentifiers
|
||||||
|
|
||||||
|
if (sublistsRows.isEmpty())
|
||||||
|
return false;
|
||||||
|
|
||||||
if (parent.row() != sublistsRows.at(0).second)
|
if (parent.row() != sublistsRows.at(0).second)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return data->formats().contains(YACReader::YACReaderLibrarSubReadingListMimeDataFormat);
|
return data->formats().contains(YACReader::YACReaderLibrarSubReadingListMimeDataFormat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user