From cc5f0c8555fbbcc4b6d0dc29a42b8c7869df1859 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Sun, 27 Dec 2020 23:23:56 +0100 Subject: Drag and drop from download view to install + Expand and scroll to mod on install. --- src/downloadlist.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/downloadlist.cpp') diff --git a/src/downloadlist.cpp b/src/downloadlist.cpp index a5c284e6..78e5fd24 100644 --- a/src/downloadlist.cpp +++ b/src/downloadlist.cpp @@ -90,6 +90,18 @@ QVariant DownloadList::headerData(int section, Qt::Orientation orientation, int } } +Qt::ItemFlags DownloadList::flags(const QModelIndex& idx) const +{ + return QAbstractTableModel::flags(idx) | Qt::ItemIsDragEnabled; +} + +QMimeData* DownloadList::mimeData(const QModelIndexList& indexes) const +{ + QMimeData* result = QAbstractItemModel::mimeData(indexes); + result->setData("text/plain", "archive"); + return result; +} + QVariant DownloadList::data(const QModelIndex &index, int role) const { bool pendingDownload = index.row() >= m_Manager->numTotalDownloads(); -- cgit v1.3.1