]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Merge remote-tracking branch 'origin/master' into frameworks
authorFrank Reininghaus <frank78ac@googlemail.com>
Thu, 12 Jun 2014 06:51:50 +0000 (08:51 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Thu, 12 Jun 2014 06:51:50 +0000 (08:51 +0200)
Conflicts:
dolphin/src/dolphincontextmenu.cpp
dolphin/src/panels/folders/treeviewcontextmenu.cpp

1  2 
src/dolphincontextmenu.cpp
src/kitemviews/private/kfileitemclipboard.cpp
src/panels/folders/treeviewcontextmenu.cpp

index 51351f0413e581e9c515f66504fa7eaf47e7399b,e692c8fa9a0cd8c9ef3f53cc5c6ff71d04043a9c..952ffcc99097f89a632bfc760ce43c1411451f01
@@@ -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)) {
 -        action = new QAction(KIcon("edit-paste"), i18nc("@action:inmenu", "Paste Into Folder"), this);
+         const QPair<bool, QString> pasteInfo = KonqOperations::pasteInfo(m_fileInfo.url());
-         const QMimeData* mimeData = QApplication::clipboard()->mimeData();
-         const KUrl::List pasteData = KUrl::List::fromMimeData(mimeData);
-         action->setEnabled(!pasteData.isEmpty() && selectedItemsProperties().supportsWriting());
 +        action = new QAction(QIcon::fromTheme("edit-paste"), i18nc("@action:inmenu", "Paste Into Folder"), this);
 -        connect(action, SIGNAL(triggered()), m_mainWindow, SLOT(pasteIntoFolder()));
+         action->setEnabled(pasteInfo.first);
 +        connect(action, &QAction::triggered, m_mainWindow, &DolphinMainWindow::pasteIntoFolder);
      } else {
          action = m_mainWindow->actionCollection()->action(KStandardAction::name(KStandardAction::Paste));
      }
index 2e59ae833ad53a2b3053cf3822ed849185802cf6,83ffa87a7173fc3dfef12821ed5ebd0c53704d4c..3f69ac22a3bd415880b9b0f04f6c5076703d83cb
@@@ -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<bool, QString> 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);