┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2014-10-21 20:44:37 +0200
committerDavid Faure <[email protected]>2014-10-21 21:59:05 +0200
commit9bf03a3c48f4847b5e0417e3529bf071108cbf1e (patch)
tree7a0e06ebb453498a51e69af723527fb63bd177bc /src/panels
parent0ce1c983b55fb79574fd4764e3ae8355f82ebf20 (diff)
Dolphin: port to KIO::pasteInfoText().
DolphinContextMenu::createPasteAction used to be precise about destination ("Paste To Folder"), while now it's precise about the source (what to paste). It was decided that this was more useful and consistent anyway. REVIEW: 120695
Diffstat (limited to 'src/panels')
-rw-r--r--src/panels/folders/treeviewcontextmenu.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/panels/folders/treeviewcontextmenu.cpp b/src/panels/folders/treeviewcontextmenu.cpp
index 4afe9e8e3..85d1215c6 100644
--- a/src/panels/folders/treeviewcontextmenu.cpp
+++ b/src/panels/folders/treeviewcontextmenu.cpp
@@ -70,10 +70,12 @@ void TreeViewContextMenu::open()
QAction* copyAction = new QAction(QIcon::fromTheme("edit-copy"), i18nc("@action:inmenu", "Copy"), this);
connect(copyAction, &QAction::triggered, this, &TreeViewContextMenu::copy);
- const QPair<bool, QString> pasteInfo = KonqOperations::pasteInfo(m_fileItem.url());
- QAction* pasteAction = new QAction(QIcon::fromTheme("edit-paste"), pasteInfo.second, this);
+ const QMimeData *mimeData = QApplication::clipboard()->mimeData();
+ bool canPaste;
+ const QString text = KIO::pasteActionText(mimeData, &canPaste, m_fileItem);
+ QAction* pasteAction = new QAction(QIcon::fromTheme("edit-paste"), text, this);
connect(pasteAction, &QAction::triggered, this, &TreeViewContextMenu::paste);
- pasteAction->setEnabled(pasteInfo.first);
+ pasteAction->setEnabled(canPaste);
popup->addAction(cutAction);
popup->addAction(copyAction);