From e308985de4b355e5758c916ba683040f6f394603 Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Sun, 3 Jun 2018 18:28:23 +0200 Subject: Fix scrolling to renamed file when using the rename dialog Summary: The `RenameDialog::slotResult()` slot is currently never called because the dialog is deleted first, due to the usage of the `WA_DeleteOnClose` attribute. This breaks the scroll-to-renamed-file feature when the inline renaming is disabled. Instead of deleting the dialog on close, we can use `deleteLater()` when we are sure the dialog has actually finished its job, which is when the KIO move job emits the `result` signal. Test Plan: - Disable inline renaming - Rename a file so that it goes out of the view - Check whether the view scrolls to the renamed file. Reviewers: #dolphin, emateli Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D13304 --- src/views/dolphinview.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/views/dolphinview.cpp') diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index acd66eb57..342c22638 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -634,10 +634,8 @@ void DolphinView::renameSelectedItems() this, &DolphinView::slotRoleEditingFinished); } else { RenameDialog* dialog = new RenameDialog(this, items); - connect(dialog, &RenameDialog::renamingFinished, this, &DolphinView::slotRenameDialogRenamingFinished); - dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->show(); dialog->raise(); dialog->activateWindow(); -- cgit v1.3