X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/30349ef1bdcae0ed80f47c168d46c15020b927d3..9760f9607d:/src/views/renamedialog.cpp diff --git a/src/views/renamedialog.cpp b/src/views/renamedialog.cpp index e49f56e2d..c9f9c177b 100644 --- a/src/views/renamedialog.cpp +++ b/src/views/renamedialog.cpp @@ -62,6 +62,7 @@ RenameDialog::RenameDialog(QWidget *parent, const KFileItemList& items) : m_okButton->setShortcut(Qt::CTRL + Qt::Key_Return); connect(buttonBox, &QDialogButtonBox::accepted, this, &RenameDialog::slotAccepted); connect(buttonBox, &QDialogButtonBox::rejected, this, &RenameDialog::reject); + connect(buttonBox, &QDialogButtonBox::rejected, this, &QObject::deleteLater); m_okButton->setDefault(true); KGuiItem::assign(m_okButton, KGuiItem(i18nc("@action:button", "&Rename"), QStringLiteral("dialog-ok-apply"))); @@ -178,6 +179,7 @@ void RenameDialog::slotAccepted() KIO::FileUndoManager::self()->recordJob(cmdType, srcList, parentUrl, job); connect(job, &KJob::result, this, &RenameDialog::slotResult); + connect(job, &KJob::result, this, &QObject::deleteLater); job->uiDelegate()->setAutoErrorHandlingEnabled(true);