- if (m_selectedItems.count() <= 1) {
- const QMimeData *mimeData = QApplication::clipboard()->mimeData();
- bool canPaste;
- const QString text = KIO::pasteActionText(mimeData, &canPaste, destItem);
- action = new QAction(QIcon::fromTheme(QStringLiteral("edit-paste")), text, this);
- if (canPaste) {
+ const QMimeData *mimeData = QApplication::clipboard()->mimeData();
+ bool canPaste;
+ const QString text = KIO::pasteActionText(mimeData, &canPaste, destItem);
+ if (canPaste) {
+ if (destItem == m_fileInfo) {
+ // if paste destination is a selected folder
+ action = new QAction(QIcon::fromTheme(QStringLiteral("edit-paste")), text, this);