summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-01 12:00:41 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-01 12:00:41 (GMT)
commitf67ddbad3c038df0a3f4d7cdf31d58ffbb17410e (patch)
tree39ed244821442f18992661a313bf970d223c2aef
parent1481031ee64b240bc74bffaf3af3df448d539ab6 (diff)
Add parent directly
-rw-r--r--src/alarmdialog.cpp3
-rw-r--r--src/attachmenteditdialog.cpp3
-rw-r--r--src/categoryeditdialog.cpp3
-rw-r--r--src/resourcemanagement.cpp3
-rw-r--r--src/templatemanagementdialog.cpp3
5 files changed, 5 insertions, 10 deletions
diff --git a/src/alarmdialog.cpp b/src/alarmdialog.cpp
index c48c1b6..c9a2b0a 100644
--- a/src/alarmdialog.cpp
+++ b/src/alarmdialog.cpp
@@ -35,8 +35,7 @@ AlarmDialog::AlarmDialog(KCalCore::Incidence::IncidenceType incidenceType, QWidg
mAllowBeginReminders(true), mAllowEndReminders(true)
{
setWindowTitle(i18n("Create a new reminder"));
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
diff --git a/src/attachmenteditdialog.cpp b/src/attachmenteditdialog.cpp
index 7edc2c8..dcf08cd 100644
--- a/src/attachmenteditdialog.cpp
+++ b/src/attachmenteditdialog.cpp
@@ -53,8 +53,7 @@ AttachmentEditDialog::AttachmentEditDialog(AttachmentIconItem *item,
QMimeDatabase db;
mMimeType = db.mimeTypeForName(item->mimeType());
QWidget *page = new QWidget(this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
mOkButton = buttonBox->button(QDialogButtonBox::Ok);
mOkButton->setDefault(true);
diff --git a/src/categoryeditdialog.cpp b/src/categoryeditdialog.cpp
index 9cf8e29..e7dc8b9 100644
--- a/src/categoryeditdialog.cpp
+++ b/src/categoryeditdialog.cpp
@@ -45,9 +45,8 @@ CategoryEditDialog::CategoryEditDialog(CategoryConfig *categoryConfig,
: QDialog(parent), mCategoryConfig(categoryConfig)
{
setWindowTitle(i18n("Edit Categories"));
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
diff --git a/src/resourcemanagement.cpp b/src/resourcemanagement.cpp
index 39eee0d..639083e 100644
--- a/src/resourcemanagement.cpp
+++ b/src/resourcemanagement.cpp
@@ -122,8 +122,7 @@ ResourceManagement::ResourceManagement(QWidget *parent)
QWidget *w = new QWidget(this);
mUi->setupUi(w);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(w);
mainLayout->addWidget(buttonBox);
diff --git a/src/templatemanagementdialog.cpp b/src/templatemanagementdialog.cpp
index 39fddd7..281b05b 100644
--- a/src/templatemanagementdialog.cpp
+++ b/src/templatemanagementdialog.cpp
@@ -59,8 +59,7 @@ TemplateManagementDialog::TemplateManagementDialog(
QString m_type_translated = i18n(qPrintable(m_type));
setWindowTitle(i18n("Manage %1 Templates", m_type_translated));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help, this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);