Commit 97e8b513 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Create dialog on stack + const'ify pointer

parent 93d32af3
Pipeline #98064 passed with stage
in 13 minutes and 22 seconds
...@@ -226,9 +226,8 @@ void AccountsPageReceivingTab::slotAddMailAccount() ...@@ -226,9 +226,8 @@ void AccountsPageReceivingTab::slotAddMailAccount()
void AccountsPageReceivingTab::slotCustomizeAccountOrder() void AccountsPageReceivingTab::slotCustomizeAccountOrder()
{ {
if (KMKernel::self()) { if (KMKernel::self()) {
QPointer<MailCommon::AccountConfigOrderDialog> dlg = new MailCommon::AccountConfigOrderDialog(KMKernel::self()->mailCommonSettings(), this); MailCommon::AccountConfigOrderDialog dlg(KMKernel::self()->mailCommonSettings(), this);
dlg->exec(); dlg.exec();
delete dlg;
} }
} }
...@@ -370,11 +369,11 @@ void AccountsPageReceivingTab::save() ...@@ -370,11 +369,11 @@ void AccountsPageReceivingTab::save()
LdapCompetionTab::LdapCompetionTab(QWidget *parent) LdapCompetionTab::LdapCompetionTab(QWidget *parent)
: ConfigModuleTab(parent) : ConfigModuleTab(parent)
, mLdapConfigureWidget(new KLDAP::LdapConfigureWidget(this))
{ {
auto layout = new QVBoxLayout(this); auto layout = new QVBoxLayout(this);
layout->setContentsMargins({}); layout->setContentsMargins({});
mLdapConfigureWidget = new KLDAP::LdapConfigureWidget(this);
layout->addWidget(mLdapConfigureWidget); layout->addWidget(mLdapConfigureWidget);
connect(mLdapConfigureWidget, &KLDAP::LdapConfigureWidget::changed, this, qOverload<bool>(&LdapCompetionTab::changed)); connect(mLdapConfigureWidget, &KLDAP::LdapConfigureWidget::changed, this, qOverload<bool>(&LdapCompetionTab::changed));
......
...@@ -55,7 +55,7 @@ private: ...@@ -55,7 +55,7 @@ private:
void doLoadOther() override; void doLoadOther() override;
private: private:
KLDAP::LdapConfigureWidget *mLdapConfigureWidget = nullptr; KLDAP::LdapConfigureWidget *const mLdapConfigureWidget;
}; };
class AccountsPageReceivingTab : public ConfigModuleTab class AccountsPageReceivingTab : public ConfigModuleTab
......
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