aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-01 11:58:53 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-01 11:58:53 (GMT)
commit6e1d02eaf723ed7fd5829bc7db68b2684fcb9638 (patch)
treed8962d85112017326e818b6e043ef30105f42f67
parente92a7a8e20451c9bffddff43250966eb7168cc91 (diff)
Add parent directly
-rw-r--r--src/widgets/agenttypedialog.cpp3
-rw-r--r--src/widgets/conflictresolvedialog.cpp13
-rw-r--r--src/widgets/selftestdialog.cpp3
-rw-r--r--src/widgets/subscriptiondialog.cpp3
-rw-r--r--src/widgets/tagmanagementdialog.cpp3
-rw-r--r--src/widgets/tagselectiondialog.cpp3
6 files changed, 11 insertions, 17 deletions
diff --git a/src/widgets/agenttypedialog.cpp b/src/widgets/agenttypedialog.cpp
index a041f8a..20d1a0c 100644
--- a/src/widgets/agenttypedialog.cpp
+++ b/src/widgets/agenttypedialog.cpp
@@ -67,8 +67,7 @@ AgentTypeDialog::AgentTypeDialog(QWidget *parent)
: QDialog(parent)
, d(new Private(this))
{
- QVBoxLayout *layout = new QVBoxLayout;
- setLayout(layout);
+ QVBoxLayout *layout = new QVBoxLayout(this);
d->Widget = new Akonadi::AgentTypeWidget;
connect(d->Widget, &AgentTypeWidget::activated, this, &AgentTypeDialog::accept);
diff --git a/src/widgets/conflictresolvedialog.cpp b/src/widgets/conflictresolvedialog.cpp
index b231633..5311a22 100644
--- a/src/widgets/conflictresolvedialog.cpp
+++ b/src/widgets/conflictresolvedialog.cpp
@@ -187,16 +187,15 @@ ConflictResolveDialog::ConflictResolveDialog(QWidget *parent)
: QDialog(parent), mResolveStrategy(ConflictHandler::UseBothItems)
{
setWindowTitle(i18nc("@title:window", "Conflict Resolution"));
- QDialogButtonBox *buttonBox = new QDialogButtonBox();
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(this);
QWidget *mainWidget = new QWidget(this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
- QPushButton *user1Button = new QPushButton;
+ QPushButton *user1Button = new QPushButton(this);
buttonBox->addButton(user1Button, QDialogButtonBox::ActionRole);
- QPushButton *user2Button = new QPushButton;
+ QPushButton *user2Button = new QPushButton(this);
buttonBox->addButton(user2Button, QDialogButtonBox::ActionRole);
- QPushButton *user3Button = new QPushButton;
+ QPushButton *user3Button = new QPushButton(this);
buttonBox->addButton(user3Button, QDialogButtonBox::ActionRole);
connect(buttonBox, &QDialogButtonBox::accepted, this, &ConflictResolveDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &ConflictResolveDialog::reject);
@@ -213,7 +212,7 @@ ConflictResolveDialog::ConflictResolveDialog(QWidget *parent)
QLabel *label = new QLabel(xi18nc("@label", "Two updates conflict with each other.<nl/>Please choose which update(s) to apply."), mainWidget);
mainLayout->addWidget(label);
- mView = new QTextBrowser;
+ mView = new QTextBrowser(this);
mainLayout->addWidget(mView);
mainLayout->addWidget(buttonBox);
diff --git a/src/widgets/selftestdialog.cpp b/src/widgets/selftestdialog.cpp
index 14220d7..f1f52e5 100644
--- a/src/widgets/selftestdialog.cpp
+++ b/src/widgets/selftestdialog.cpp
@@ -73,8 +73,7 @@ SelfTestDialog::SelfTestDialog(QWidget *parent)
setWindowTitle(i18n("Akonadi Server Self-Test"));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
QWidget *mainWidget = new QWidget(this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
QPushButton *user1Button = new QPushButton;
buttonBox->addButton(user1Button, QDialogButtonBox::ActionRole);
diff --git a/src/widgets/subscriptiondialog.cpp b/src/widgets/subscriptiondialog.cpp
index 8c142b9..c922dc4 100644
--- a/src/widgets/subscriptiondialog.cpp
+++ b/src/widgets/subscriptiondialog.cpp
@@ -158,8 +158,7 @@ void SubscriptionDialog::init(const QStringList &mimetypes)
{
setWindowTitle(i18n("Local Subscriptions"));
QWidget *mainWidget = new QWidget(this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainWidget);
d->model = new SubscriptionModel(this);
diff --git a/src/widgets/tagmanagementdialog.cpp b/src/widgets/tagmanagementdialog.cpp
index 193b4e6..3c014c0 100644
--- a/src/widgets/tagmanagementdialog.cpp
+++ b/src/widgets/tagmanagementdialog.cpp
@@ -65,8 +65,7 @@ TagManagementDialog::TagManagementDialog(QWidget *parent)
, d(new Private(this))
{
setWindowTitle(i18nc("@title:window", "Manage Tags"));
- QVBoxLayout *vbox = new QVBoxLayout;
- setLayout(vbox);
+ QVBoxLayout *vbox = new QVBoxLayout(this);
Monitor *monitor = new Monitor(this);
monitor->setTypeMonitored(Monitor::Tags);
diff --git a/src/widgets/tagselectiondialog.cpp b/src/widgets/tagselectiondialog.cpp
index 4ee2057..f11f297 100644
--- a/src/widgets/tagselectiondialog.cpp
+++ b/src/widgets/tagselectiondialog.cpp
@@ -68,8 +68,7 @@ TagSelectionDialog::TagSelectionDialog(QWidget *parent)
, d(new Private(this))
{
setWindowTitle(i18nc("@title:window", "Manage Tags"));
- QVBoxLayout *vbox = new QVBoxLayout;
- setLayout(vbox);
+ QVBoxLayout *vbox = new QVBoxLayout(this);
Monitor *monitor = new Monitor(this);
monitor->setTypeMonitored(Monitor::Tags);