X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/f8fa4e8df155250fa546288caf9bb89b0044f91b..a23a882c68fb399f895ebed253cf2ad09944a347:/src/treeviewcontextmenu.cpp diff --git a/src/treeviewcontextmenu.cpp b/src/treeviewcontextmenu.cpp index 1e6583e55..d095ee13d 100644 --- a/src/treeviewcontextmenu.cpp +++ b/src/treeviewcontextmenu.cpp @@ -75,8 +75,7 @@ void TreeViewContextMenu::open() popup->addAction(renameAction); // insert 'Move to Trash' and (optionally) 'Delete' - const KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::NoGlobals); - const KConfigGroup kdeConfig(globalConfig, "KDE"); + KConfigGroup kdeConfig(KGlobal::config(), "KDE"); bool showDeleteCommand = kdeConfig.readEntry("ShowDeleteCommand", false); const KUrl& url = m_fileInfo.url(); if (url.isLocalFile()) { @@ -140,16 +139,15 @@ void TreeViewContextMenu::paste() void TreeViewContextMenu::rename() { - const KUrl& oldUrl = m_fileInfo.url(); - QList items; - items.append( m_fileInfo ); - RenameDialog dialog(oldUrl, items); + KFileItemList item; + item.append(m_fileInfo); + RenameDialog dialog(item); if (dialog.exec() == QDialog::Accepted) { const QString& newName = dialog.newName(); if (!newName.isEmpty()) { - KUrl newUrl = oldUrl; + KUrl newUrl = m_fileInfo.url(); newUrl.setFileName(newName); - KonqOperations::rename(m_parent, oldUrl, newUrl); + KonqOperations::rename(m_parent, m_fileInfo.url(), newUrl); } } }