author | leseb <leseb> | 2002-06-16 15:34:57 (UTC) |
---|---|---|
committer | leseb <leseb> | 2002-06-16 15:34:57 (UTC) |
commit | 1b74249e80cf9f33e52fdb7cc96a114e8be85bc1 (patch) (side-by-side diff) | |
tree | 679a1a47c9843e8f89dbe0b3bad532ae60187d72 /noncore/unsupported/mail2/configdiag.cpp | |
parent | 4c1300773b986ad5725492cd26743d542ed16311 (diff) | |
download | opie-1b74249e80cf9f33e52fdb7cc96a114e8be85bc1.zip opie-1b74249e80cf9f33e52fdb7cc96a114e8be85bc1.tar.gz opie-1b74249e80cf9f33e52fdb7cc96a114e8be85bc1.tar.bz2 |
Fix memory leaks
Diffstat (limited to 'noncore/unsupported/mail2/configdiag.cpp') (more/less context) (ignore 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 @@ -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(); } |