X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/afb6f04770f0a056be70ab8da51f70e288f27d38..1554df47db71bbbbae4be1431eaba5cd2c442e0c:/src/treeviewcontextmenu.cpp diff --git a/src/treeviewcontextmenu.cpp b/src/treeviewcontextmenu.cpp index 0c64677fa..cdb1afeda 100644 --- a/src/treeviewcontextmenu.cpp +++ b/src/treeviewcontextmenu.cpp @@ -145,8 +145,8 @@ void TreeViewContextMenu::rename() if (dialog.exec() == QDialog::Accepted) { const QString& newName = dialog.newName(); if (!newName.isEmpty()) { - KUrl newUrl = oldUrl.upUrl(); - newUrl.addPath(newName); + KUrl newUrl = oldUrl; + newUrl.setFileName(newName); KonqOperations::rename(m_parent, oldUrl, newUrl); } } @@ -159,14 +159,7 @@ void TreeViewContextMenu::moveToTrash() void TreeViewContextMenu::deleteItem() { - const KUrl& url = m_fileInfo->url(); - const bool del = KonqOperations::askDeleteConfirmation(url, - KonqOperations::DEL, - KonqOperations::FORCE_CONFIRMATION, - m_parent); - if (del) { - KIO::del(url); - } + KonqOperations::del(m_parent, KonqOperations::DEL, m_fileInfo->url()); } void TreeViewContextMenu::showProperties()