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()
void AccountsPageReceivingTab::slotCustomizeAccountOrder()
{
if (KMKernel::self()) {
QPointer<MailCommon::AccountConfigOrderDialog> dlg = new MailCommon::AccountConfigOrderDialog(KMKernel::self()->mailCommonSettings(), this);
dlg->exec();
delete dlg;
MailCommon::AccountConfigOrderDialog dlg(KMKernel::self()->mailCommonSettings(), this);
dlg.exec();
}
}
......@@ -370,11 +369,11 @@ void AccountsPageReceivingTab::save()
LdapCompetionTab::LdapCompetionTab(QWidget *parent)
: ConfigModuleTab(parent)
, mLdapConfigureWidget(new KLDAP::LdapConfigureWidget(this))
{
auto layout = new QVBoxLayout(this);
layout->setContentsMargins({});
mLdapConfigureWidget = new KLDAP::LdapConfigureWidget(this);
layout->addWidget(mLdapConfigureWidget);
connect(mLdapConfigureWidget, &KLDAP::LdapConfigureWidget::changed, this, qOverload<bool>(&LdapCompetionTab::changed));
......
......@@ -55,7 +55,7 @@ private:
void doLoadOther() override;
private:
KLDAP::LdapConfigureWidget *mLdapConfigureWidget = nullptr;
KLDAP::LdapConfigureWidget *const mLdapConfigureWidget;
};
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