summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mail2/addresspicker.cpp10
-rw-r--r--noncore/unsupported/mail2/attachdiag.cpp10
-rw-r--r--noncore/unsupported/mail2/configdiag.cpp21
-rw-r--r--noncore/unsupported/mail2/rename.cpp28
4 files changed, 35 insertions, 34 deletions
diff --git a/noncore/unsupported/mail2/addresspicker.cpp b/noncore/unsupported/mail2/addresspicker.cpp
index 178fe27..7f32725 100644
--- a/noncore/unsupported/mail2/addresspicker.cpp
+++ b/noncore/unsupported/mail2/addresspicker.cpp
@@ -104,13 +104,13 @@ QString AddressPicker::getNames()
{
QString names = 0;
- AddressPicker *picker = new AddressPicker(0, 0, true);
- picker->showMaximized();
- picker->show();
+ AddressPicker picker(0, 0, true);
+ picker.showMaximized();
+ picker.show();
- int ret = picker->exec();
+ int ret = picker.exec();
if (QDialog::Accepted == ret) {
- return picker->selectedNames;
+ return picker.selectedNames;
}
return 0;
}
diff --git a/noncore/unsupported/mail2/attachdiag.cpp b/noncore/unsupported/mail2/attachdiag.cpp
index bedf3c4..36e1948 100644
--- a/noncore/unsupported/mail2/attachdiag.cpp
+++ b/noncore/unsupported/mail2/attachdiag.cpp
@@ -57,12 +57,12 @@ void AttachDiag::fileSelected(const DocLnk &file)
DocLnk AttachDiag::getFile(QWidget *parent)
{
- AttachDiag *attach = new AttachDiag(parent, 0, true);
- attach->showMaximized();
- attach->show();
+ AttachDiag attach(parent, 0, true);
+ attach.showMaximized();
+ attach.show();
- if (QDialog::Accepted == attach->exec()) {
- return attach->currentFile;
+ if (QDialog::Accepted == attach.exec()) {
+ return attach.currentFile;
}
return DocLnk();
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();
}
diff --git a/noncore/unsupported/mail2/rename.cpp b/noncore/unsupported/mail2/rename.cpp
index 8c2fde1..627db0b 100644
--- a/noncore/unsupported/mail2/rename.cpp
+++ b/noncore/unsupported/mail2/rename.cpp
@@ -10,13 +10,13 @@ Rename::Rename(QWidget *parent, const char *name, bool modal, WFlags fl)
QString Rename::rename(const QString &on, QWidget *parent)
{
- Rename *rename = new Rename(parent, 0, true);
- rename->oldName->setText(on);
- rename->newName->setText(on);
- rename->newName->setFocus();
+ Rename rename(parent, 0, true);
+ rename.oldName->setText(on);
+ rename.newName->setText(on);
+ rename.newName->setFocus();
- if (rename->exec() == QDialog::Accepted) {
- return rename->newName->text();
+ if (rename.exec() == QDialog::Accepted) {
+ return rename.newName->text();
}
return QString(0);
@@ -24,14 +24,14 @@ QString Rename::rename(const QString &on, QWidget *parent)
QString Rename::getText(const QString &caption, const QString &secondLabel, QWidget *parent)
{
- Rename *rename = new Rename(parent, 0, true);
- rename->firstLabel->hide();
- rename->oldName->hide();
- rename->setCaption(caption);
- rename->secondLabel->setText(secondLabel);
-
- if (rename->exec() == QDialog::Accepted) {
- return rename->newName->text();
+ Rename rename(parent, 0, true);
+ rename.firstLabel->hide();
+ rename.oldName->hide();
+ rename.setCaption(caption);
+ rename.secondLabel->setText(secondLabel);
+
+ if (rename.exec() == QDialog::Accepted) {
+ return rename.newName->text();
}
return QString(0);