Commit 59e106dd authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

create dialog on stack

parent 894fa649
Pipeline #111354 passed with stage
in 9 minutes and 52 seconds
......@@ -36,11 +36,9 @@ void SearchDuplicatesPluginInterface::slotActivated()
void SearchDuplicatesPluginInterface::exec()
{
QPointer<KABMergeContacts::SearchAndMergeContactDuplicateContactDialog> dlg =
new KABMergeContacts::SearchAndMergeContactDuplicateContactDialog(parentWidget());
dlg->searchPotentialDuplicateContacts(mListItems);
dlg->exec();
delete dlg;
KABMergeContacts::SearchAndMergeContactDuplicateContactDialog dlg(parentWidget());
dlg.searchPotentialDuplicateContacts(mListItems);
dlg.exec();
}
void SearchDuplicatesPluginInterface::setItems(const Akonadi::Item::List &items)
......
......@@ -33,11 +33,9 @@ QVector<MailTransport::TransportAbstractPluginInfo> SendMailTransportPlugin::nam
bool SendMailTransportPlugin::configureTransport(const QString &identifier, MailTransport::Transport *transport, QWidget *parent)
{
Q_UNUSED(identifier)
QPointer<SendMailConfigDialog> transportConfigDialog = new SendMailConfigDialog(transport, parent);
transportConfigDialog->setWindowTitle(i18nc("@title:window", "Configure account"));
bool okClicked = (transportConfigDialog->exec() == QDialog::Accepted);
delete transportConfigDialog;
return okClicked;
SendMailConfigDialog transportConfigDialog(transport, parent);
transportConfigDialog.setWindowTitle(i18nc("@title:window", "Configure account"));
return (transportConfigDialog.exec() == QDialog::Accepted);
}
MailTransport::TransportJob *SendMailTransportPlugin::createTransportJob(MailTransport::Transport *t, const QString &identifier)
......
......@@ -76,6 +76,7 @@ void SelectImapWidget::slotOpenSelectImapFolder()
if (dlg->exec()) {
mLineEdit->setText(dlg->selectedFolderName());
}
// Don't delete it.
}
#include "selectimapwidget.moc"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment