┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-03-25 06:57:41 +0000
committerPeter Penz <[email protected]>2007-03-25 06:57:41 +0000
commitb7bfa46353f8c7e0f20cea4374b990174c35164d (patch)
tree8e18e10806e2e89e5cea39aa857c80b04e9cb9ad /src
parent8f9baef848c3056cd1df772f0774decad509cff3 (diff)
fixed wrong state of the paste action
svn path=/trunk/KDE/kdebase/apps/; revision=646260
Diffstat (limited to 'src')
-rw-r--r--src/treeviewcontextmenu.cpp8
1 files changed, 3 insertions, 5 deletions
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);