From: Frank Reininghaus Date: Thu, 12 Jun 2014 06:51:50 +0000 (+0200) Subject: Merge remote-tracking branch 'origin/master' into frameworks X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/6bccf73e9270e698e7ca23eb2dcaa05318e7b198 Merge remote-tracking branch 'origin/master' into frameworks Conflicts: dolphin/src/dolphincontextmenu.cpp dolphin/src/panels/folders/treeviewcontextmenu.cpp --- 6bccf73e9270e698e7ca23eb2dcaa05318e7b198 diff --cc src/dolphincontextmenu.cpp index 51351f041,e692c8fa9..952ffcc99 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@@ -430,11 -429,10 +430,10 @@@ QAction* DolphinContextMenu::createPast QAction* action = 0; const bool isDir = !m_fileInfo.isNull() && m_fileInfo.isDir(); if (isDir && (m_selectedItems.count() == 1)) { + const QPair pasteInfo = KonqOperations::pasteInfo(m_fileInfo.url()); - action = new QAction(KIcon("edit-paste"), i18nc("@action:inmenu", "Paste Into Folder"), this); + action = new QAction(QIcon::fromTheme("edit-paste"), i18nc("@action:inmenu", "Paste Into Folder"), this); - const QMimeData* mimeData = QApplication::clipboard()->mimeData(); - const KUrl::List pasteData = KUrl::List::fromMimeData(mimeData); - action->setEnabled(!pasteData.isEmpty() && selectedItemsProperties().supportsWriting()); + action->setEnabled(pasteInfo.first); - connect(action, SIGNAL(triggered()), m_mainWindow, SLOT(pasteIntoFolder())); + connect(action, &QAction::triggered, m_mainWindow, &DolphinMainWindow::pasteIntoFolder); } else { action = m_mainWindow->actionCollection()->action(KStandardAction::name(KStandardAction::Paste)); } diff --cc src/panels/folders/treeviewcontextmenu.cpp index 2e59ae833,83ffa87a7..3f69ac22a --- a/src/panels/folders/treeviewcontextmenu.cpp +++ b/src/panels/folders/treeviewcontextmenu.cpp @@@ -61,16 -57,15 +61,15 @@@ void TreeViewContextMenu::open( // insert 'Cut', 'Copy' and 'Paste' QAction* cutAction = new QAction(KIcon("edit-cut"), i18nc("@action:inmenu", "Cut"), this); cutAction->setEnabled(capabilities.supportsMoving()); - connect(cutAction, SIGNAL(triggered()), this, SLOT(cut())); + connect(cutAction, &QAction::triggered, this, &TreeViewContextMenu::cut); QAction* copyAction = new QAction(KIcon("edit-copy"), i18nc("@action:inmenu", "Copy"), this); - connect(copyAction, SIGNAL(triggered()), this, SLOT(copy())); + connect(copyAction, &QAction::triggered, this, &TreeViewContextMenu::copy); - QAction* pasteAction = new QAction(KIcon("edit-paste"), i18nc("@action:inmenu", "Paste"), this); - const QMimeData* mimeData = QApplication::clipboard()->mimeData(); - const KUrl::List pasteData = KUrl::List::fromMimeData(mimeData); + const QPair pasteInfo = KonqOperations::pasteInfo(m_fileItem.url()); + QAction* pasteAction = new QAction(KIcon("edit-paste"), pasteInfo.second, this); - connect(pasteAction, SIGNAL(triggered()), this, SLOT(paste())); + connect(pasteAction, &QAction::triggered, this, &TreeViewContextMenu::paste); - pasteAction->setEnabled(!pasteData.isEmpty() && capabilities.supportsWriting()); + pasteAction->setEnabled(pasteInfo.first); popup->addAction(cutAction); popup->addAction(copyAction);