diff --git a/containments/desktop/plugins/folder/foldermodel.h b/containments/desktop/plugins/folder/foldermodel.h --- a/containments/desktop/plugins/folder/foldermodel.h +++ b/containments/desktop/plugins/folder/foldermodel.h @@ -221,6 +221,7 @@ KFileItem itemForIndex(const QModelIndex &index) const; bool isDir(const QModelIndex &index, const KDirModel *dirModel) const; bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE; + Qt::DropActions supportedDragActions() const override; Q_INVOKABLE void paste(); Q_INVOKABLE void copy(); diff --git a/containments/desktop/plugins/folder/foldermodel.cpp b/containments/desktop/plugins/folder/foldermodel.cpp --- a/containments/desktop/plugins/folder/foldermodel.cpp +++ b/containments/desktop/plugins/folder/foldermodel.cpp @@ -150,8 +150,6 @@ sort(m_sortMode, m_sortDesc ? Qt::DescendingOrder : Qt::AscendingOrder); - setSupportedDragActions(Qt::CopyAction | Qt::MoveAction | Qt::LinkAction); - createActions(); } @@ -1248,6 +1246,11 @@ return QString::compare(leftItem.url().url(), rightItem.url().url(), Qt::CaseSensitive); } +Qt::DropActions FolderModel::supportedDragActions() const +{ + return Qt::CopyAction | Qt::MoveAction | Qt::LinkAction; +} + inline bool FolderModel::matchMimeType(const KFileItem &item) const { if (m_mimeSet.isEmpty()) {