aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-01 12:00:00 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-01 12:00:00 (GMT)
commitba2f428befca1485746df2945b4dbde225beabf3 (patch)
treede60028451546fed921613671abe6a8026e36afb
parentd9b9b7f0594cfd5a2923bb2089f70f3b825907fa (diff)
Add parent directly
-rw-r--r--src/archivedialog.cpp3
-rw-r--r--src/printing/calprinter.cpp3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/archivedialog.cpp b/src/archivedialog.cpp
index 3a85bc1..ddf76d8 100644
--- a/src/archivedialog.cpp
+++ b/src/archivedialog.cpp
@@ -59,9 +59,8 @@ ArchiveDialog::ArchiveDialog(const Akonadi::ETMCalendar::Ptr &cal,
: QDialog(parent)
{
setWindowTitle(i18nc("@title:window", "Archive/Delete Past Events and To-dos"));
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Cancel);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
mUser1Button = new QPushButton;
buttonBox->addButton(mUser1Button, QDialogButtonBox::ActionRole);
connect(buttonBox, &QDialogButtonBox::rejected, this, &ArchiveDialog::reject);
diff --git a/src/printing/calprinter.cpp b/src/printing/calprinter.cpp
index 21ea9f6..7af3a4d 100644
--- a/src/printing/calprinter.cpp
+++ b/src/printing/calprinter.cpp
@@ -179,8 +179,7 @@ CalPrintDialog::CalPrintDialog(int initialPrintType, const PrintPlugin::List &pl
{
setWindowTitle(i18nc("@title:window", "Print"));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
mOkButton->setDefault(true);
mOkButton->setShortcut(Qt::CTRL | Qt::Key_Return);