summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mail2/configdiag.cpp
Side-by-side diff
Diffstat (limited to 'noncore/unsupported/mail2/configdiag.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mail2/configdiag.cpp21
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
@@ -79,12 +79,13 @@ 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();
}
@@ -98,12 +99,12 @@ 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();
}