summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-27 13:47:25 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-27 13:47:25 (GMT)
commitcb9c8eef091f1552e7279696629ed5782dca9a0f (patch)
tree89b0c44b8944afd94896997d06b2663fbb4a9075
parent69ea21c07165082d4cfd54747c6e55a33b214fdc (diff)
Remove duplicate margin
-rw-r--r--src/project/invaliddialog.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/project/invaliddialog.cpp b/src/project/invaliddialog.cpp
index 4b3a68f..814f4bb 100644
--- a/src/project/invaliddialog.cpp
+++ b/src/project/invaliddialog.cpp
@@ -35,6 +35,7 @@
InvalidDialog::InvalidDialog(const QString &caption, const QString &message, bool infoOnly, QWidget *parent)
: QDialog(parent)
{
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
setWindowTitle(caption);
// Info only means users can only click on ok
QDialogButtonBox *buttonBox;
@@ -46,21 +47,14 @@ InvalidDialog::InvalidDialog(const QString &caption, const QString &message, boo
buttonBox = new QDialogButtonBox(QDialogButtonBox::No|QDialogButtonBox::Yes);
okButton = buttonBox->button(QDialogButtonBox::Yes);
}
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, &QDialogButtonBox::accepted, this, &InvalidDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &InvalidDialog::reject);
- QWidget *mainWidget = new QWidget(this);
- QVBoxLayout *boxLayout = new QVBoxLayout;
- boxLayout->addWidget(new QLabel(message));
-
- m_clipList = new QListWidget();
- boxLayout->addWidget(m_clipList);
- mainWidget->setLayout(boxLayout);
- mainLayout->addWidget(mainWidget);
+ m_clipList = new QListWidget(this);
+ mainLayout->addWidget(new QLabel(message));
+ mainLayout->addWidget(m_clipList);
mainLayout->addWidget(buttonBox);
}