From eb2bc8e582dc7abc8fc92e59306a08809b2eceb6 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Wed, 10 Aug 2016 07:17:22 +0200 Subject: [PATCH] Minor --- kmail/src/identity/identitydialog.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kmail/src/identity/identitydialog.cpp b/kmail/src/identity/identitydialog.cpp index 5563c2abce..fa1f1d03c9 100644 --- a/kmail/src/identity/identitydialog.cpp +++ b/kmail/src/identity/identitydialog.cpp @@ -294,18 +294,15 @@ IdentityDialog::IdentityDialog(QWidget *parent) : QDialog(parent) { setWindowTitle(i18n("Edit Identity")); - QDialogButtonBox *buttonBox = Q_NULLPTR; - QVBoxLayout *mainLayout = new QVBoxLayout; - setLayout(mainLayout); + QVBoxLayout *mainLayout = new QVBoxLayout(this); - buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help); + QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help); connect(buttonBox->button(QDialogButtonBox::Help), &QPushButton::clicked, this, &IdentityDialog::slotHelp); QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok); okButton->setDefault(true); okButton->setShortcut(Qt::CTRL | Qt::Key_Return); connect(buttonBox, &QDialogButtonBox::accepted, this, &IdentityDialog::slotAccepted); connect(buttonBox, &QDialogButtonBox::rejected, this, &IdentityDialog::reject); - okButton->setDefault(true); // tmp. vars: -- 2.11.4.GIT