m_controller->view()->editRole(index, "text");
} else {
RenameDialog* dialog = new RenameDialog(this, KFileItemList() << item);
- dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show();
dialog->raise();
dialog->activateWindow();
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();
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")));
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);
class KJob;
/**
* @brief Dialog for renaming a variable number of files.
+ *
+ * The dialog deletes itself when accepted or rejected.
*/
class DOLPHIN_EXPORT RenameDialog : public QDialog
{