]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/folders/treeviewcontextmenu.cpp
The &-shortcut from another action is not set until the action has been shown at...
[dolphin.git] / src / panels / folders / treeviewcontextmenu.cpp
index 0ca48e1283fb6cd96bd5bf4e0197be54f33fc736..32e92e05c2e8fcb874580c9d7536cff0960d291c 100644 (file)
@@ -34,8 +34,9 @@
 
 #include "folderspanel.h"
 
-#include <QtGui/QApplication>
-#include <QtGui/QClipboard>
+#include <QApplication>
+#include <QClipboard>
+#include <QPointer>
 
 TreeViewContextMenu::TreeViewContextMenu(FoldersPanel* parent,
                                          const KFileItem& fileInfo) :
@@ -89,7 +90,7 @@ void TreeViewContextMenu::open()
         const KUrl& url = m_fileInfo.url();
         if (url.isLocalFile()) {
             QAction* moveToTrashAction = new QAction(KIcon("user-trash"),
-                                                    i18nc("@action:inmenu", "Move To Trash"), this);
+                                                    i18nc("@action:inmenu", "Move to Trash"), this);
             const bool enableMoveToTrash = capabilities.isLocal() && capabilities.supportsMoving();
             moveToTrashAction->setEnabled(enableMoveToTrash);
             connect(moveToTrashAction, SIGNAL(triggered()), this, SLOT(moveToTrash()));
@@ -182,8 +183,9 @@ void TreeViewContextMenu::deleteItem()
 
 void TreeViewContextMenu::showProperties()
 {
-    KPropertiesDialog dialog(m_fileInfo.url(), m_parent);
-    dialog.exec();
+    QPointer<KPropertiesDialog> dialog = new KPropertiesDialog(m_fileInfo.url(), m_parent);
+    dialog->exec();
+    delete dialog;
 }
 
 void TreeViewContextMenu::setShowHiddenFiles(bool show)