From: Peter Penz Date: Sun, 25 Mar 2007 06:57:41 +0000 (+0000) Subject: fixed wrong state of the paste action X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/b7bfa46353f8c7e0f20cea4374b990174c35164d?ds=inline fixed wrong state of the paste action svn path=/trunk/KDE/kdebase/apps/; revision=646260 --- diff --git a/src/treeviewcontextmenu.cpp b/src/treeviewcontextmenu.cpp index c04fc746e..290b6ec6c 100644 --- a/src/treeviewcontextmenu.cpp +++ b/src/treeviewcontextmenu.cpp @@ -55,11 +55,9 @@ void TreeViewContextMenu::open() connect(copyAction, SIGNAL(triggered()), this, SLOT(copy())); QAction* pasteAction = new QAction(KIcon("edit-paste"), i18n("Paste"), this); - - QClipboard* clipboard = QApplication::clipboard(); - const QMimeData* mimeData = clipboard->mimeData(); - const KUrl::List sourceUrls = KUrl::List::fromMimeData(mimeData); - pasteAction->setEnabled(sourceUrls.isEmpty()); + const QMimeData* mimeData = QApplication::clipboard()->mimeData(); + const KUrl::List pasteData = KUrl::List::fromMimeData(mimeData); + pasteAction->setEnabled(!pasteData.isEmpty()); connect(pasteAction, SIGNAL(triggered()), this, SLOT(paste())); popup->addAction(cutAction);