-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 2461e26..81a4318 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp | |||
@@ -819,20 +819,21 @@ void AdvancedFm::okRename() { | |||
819 | if( !renameBox) return; | 819 | if( !renameBox) return; |
820 | 820 | ||
821 | QString newName = renameBox->text(); | 821 | QString newName = renameBox->text(); |
822 | cancelRename(); | 822 | cancelRename(); |
823 | QListView * view = CurrentView(); | 823 | QListView * view = CurrentView(); |
824 | QString path = CurrentDir()->canonicalPath() + "/"; | 824 | QString path = CurrentDir()->canonicalPath() + "/"; |
825 | oldName = path + oldName; | 825 | oldName = path + oldName; |
826 | newName = path + newName; | 826 | newName = path + newName; |
827 | if( rename( oldName.latin1(), newName.latin1())== -1) | 827 | if( rename( oldName.latin1(), newName.latin1())== -1) |
828 | QMessageBox::message(tr("Note"),tr("Could not rename")); | 828 | QMessageBox::message(tr("Note"),tr("Could not rename")); |
829 | else | 829 | else |
830 | oldName = ""; | 830 | oldName = ""; |
831 | view->takeItem( view->currentItem() ); | 831 | QListViewItem *item = view->currentItem(); |
832 | delete view->currentItem(); | 832 | view->takeItem( item ); |
833 | delete item; | ||
833 | rePopulate(); | 834 | rePopulate(); |
834 | } | 835 | } |
835 | 836 | ||
836 | void AdvancedFm::openSearch() { | 837 | void AdvancedFm::openSearch() { |
837 | QMessageBox::message(tr("Note"),tr("Not Yet Implemented")); | 838 | QMessageBox::message(tr("Note"),tr("Not Yet Implemented")); |
838 | } | 839 | } |