Diffstat (limited to 'noncore/unsupported/mail2/configdiag.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/mail2/configdiag.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/noncore/unsupported/mail2/configdiag.cpp b/noncore/unsupported/mail2/configdiag.cpp index be1f1f4..b89b937 100644 --- a/noncore/unsupported/mail2/configdiag.cpp +++ b/noncore/unsupported/mail2/configdiag.cpp @@ -80,10 +80,11 @@ void ConfigDiag::slotFillLists() void ConfigDiag::slotNewAccount() { - AccountEditor *editor = new AccountEditor(Account(), 0, 0, true); - editor->showMaximized(); - editor->show(); + Account account; + AccountEditor editor(account, 0, 0, true); + editor.showMaximized(); + editor.show(); - if (QDialog::Accepted == editor->exec()) { - ConfigFile::updateAccount(editor->_account); + if (QDialog::Accepted == editor.exec()) { + ConfigFile::updateAccount(editor._account); slotFillLists(); emit changed(); @@ -99,10 +100,10 @@ void ConfigDiag::slotEditAccount() Account account = ((AccountListItem *)accountList->currentItem())->account(); - AccountEditor *editor = new AccountEditor(account, 0, 0, true); - editor->showMaximized(); - editor->show(); + AccountEditor editor(account, 0, 0, true); + editor.showMaximized(); + editor.show(); - if (QDialog::Accepted == editor->exec()) { - ConfigFile::updateAccount(editor->_account); + if (QDialog::Accepted == editor.exec()) { + ConfigFile::updateAccount(editor._account); slotFillLists(); emit changed(); |