added drag&drop support for sorting comics in lists

This commit is contained in:
Luis Ángel San Martín
2015-01-30 16:40:57 +01:00
parent 27d096162d
commit aa1398666e
21 changed files with 429 additions and 49 deletions

View File

@ -244,10 +244,7 @@ bool ReadingListModel::dropMimeData(const QMimeData *data, Qt::DropAction action
bool ReadingListModel::dropComics(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
{
QList<qulonglong> comicIds;
QByteArray rawData = data->data(YACReader::YACReaderLibrarComiscSelectionMimeDataFormat);
QDataStream in(&rawData,QIODevice::ReadOnly);
in >> comicIds; //deserialize the list of indentifiers
QList<qulonglong> comicIds = YACReader::mimeDataToComicsIds(data);
QLOG_DEBUG() << "dropped : " << comicIds;