Commit 0cd580b5 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

not necessary to put these dialog as pointer

parent dd715dcd
Pipeline #73987 passed with stage
in 23 minutes and 21 seconds
......@@ -313,10 +313,9 @@ void KTNEFMain::extractAllFiles()
void KTNEFMain::propertiesFile()
{
KTNEFAttach *attach = mView->getSelection().at(0);
QPointer<AttachPropertyDialog> dlg = new AttachPropertyDialog(this);
dlg->setAttachment(attach);
dlg->exec();
delete dlg;
AttachPropertyDialog dlg(this);
dlg.setAttachment(attach);
dlg.exec();
}
void KTNEFMain::optionDefaultDir()
......@@ -461,9 +460,8 @@ void KTNEFMain::slotNewToolbarConfig()
void KTNEFMain::slotShowMessageProperties()
{
QPointer<MessagePropertyDialog> dlg = new MessagePropertyDialog(this, mParser->message());
dlg->exec();
delete dlg;
MessagePropertyDialog dlg(this, mParser->message());
dlg.exec();
}
void KTNEFMain::slotShowMessageText()
......
......@@ -97,9 +97,8 @@ SecurityPageGeneralTab::SecurityPageGeneralTab(QWidget *parent)
void SecurityPageGeneralTab::slotOpenExternalReferenceExceptions()
{
QPointer<MessageViewer::RemoteContentConfigureDialog> dlg = new MessageViewer::RemoteContentConfigureDialog(this);
dlg->exec();
delete dlg;
MessageViewer::RemoteContentConfigureDialog dlg(this);
dlg.exec();
}
void SecurityPageGeneralTab::slotLinkClicked(const QString &link)
......
......@@ -33,10 +33,9 @@ PotentialPhishingEmailWarning::~PotentialPhishingEmailWarning() = default;
void PotentialPhishingEmailWarning::slotShowDetails(const QString &link)
{
if (link == QLatin1String("phishingdetails")) {
QPointer<PotentialPhishingDetailDialog> dlg = new PotentialPhishingDetailDialog(this);
dlg->fillList(mPotentialPhishingEmails);
dlg->exec();
delete dlg;
PotentialPhishingDetailDialog dlg(this);
dlg.fillList(mPotentialPhishingEmails);
dlg.exec();
}
}
......
......@@ -1485,10 +1485,9 @@ void KMMainWidget::slotEmptyFolder()
void KMMainWidget::slotArchiveFolder()
{
if (mCurrentCollection.isValid()) {
QPointer<KMail::ArchiveFolderDialog> archiveDialog = new KMail::ArchiveFolderDialog(this);
archiveDialog->setFolder(mCurrentCollection);
archiveDialog->exec();
delete archiveDialog;
KMail::ArchiveFolderDialog archiveDialog(this);
archiveDialog.setFolder(mCurrentCollection);
archiveDialog.exec();
}
}
......
......@@ -696,9 +696,9 @@ void MessageActions::annotateMessage()
return;
}
QPointer<PimCommon::AnnotationEditDialog> dialog = new PimCommon::AnnotationEditDialog(mCurrentItem, mParent);
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->exec();
PimCommon::AnnotationEditDialog dialog(mCurrentItem, mParent);
dialog.setAttribute(Qt::WA_DeleteOnClose);
dialog.exec();
}
void MessageActions::addWebShortcutsMenu(QMenu *menu, const QString &text)
......
......@@ -481,8 +481,8 @@ void SearchWindow::doSearch()
const QVector<qint64> unindexedCollections = checkIncompleteIndex(searchCollections, recursive);
if (!unindexedCollections.isEmpty()) {
QScopedPointer<IncompleteIndexDialog> dlg(new IncompleteIndexDialog(unindexedCollections));
dlg->exec();
IncompleteIndexDialog dlg(unindexedCollections);
dlg.exec();
}
if (!mFolder.isValid()) {
......
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