aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-01 11:58:38 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-01 11:58:38 (GMT)
commit8fb5f4f48c0ceb93892b44943ddfea10eea9d82a (patch)
tree5ae9bd0017c65318395cbaad0acc936bfb5884e0
parent5d2ed64c1bdb75f65e517c77e99536038092d9ce (diff)
Add parent directly
-rw-r--r--src/contactgroupeditordialog.cpp6
-rw-r--r--src/contactgroupviewerdialog.cpp6
-rw-r--r--src/contactviewerdialog.cpp3
-rw-r--r--src/editor/addresseditor/addresslocationwidget.cpp3
-rw-r--r--src/editor/generalinfoeditor/mail/maillistwidget.cpp3
-rw-r--r--src/editor/generalinfoeditor/messaging/messaginglistwidget.cpp3
-rw-r--r--src/editor/generalinfoeditor/nameeditdialog.cpp2
-rw-r--r--src/editor/generalinfoeditor/phone/phonelistwidget.cpp3
-rw-r--r--src/editor/generalinfoeditor/web/weblistwidget.cpp3
9 files changed, 13 insertions, 19 deletions
diff --git a/src/contactgroupeditordialog.cpp b/src/contactgroupeditordialog.cpp
index c369a78..a97e4d7 100644
--- a/src/contactgroupeditordialog.cpp
+++ b/src/contactgroupeditordialog.cpp
@@ -87,9 +87,9 @@ ContactGroupEditorDialog::ContactGroupEditorDialog(Mode mode, QWidget *parent)
, d(new Private(this, mode))
{
setWindowTitle(mode == CreateMode ? i18n("New Contact Group") : i18n("Edit Contact Group"));
- QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
+
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel,this);
d->okButton = buttonBox->button(QDialogButtonBox::Ok);
d->okButton->setDefault(true);
d->okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
diff --git a/src/contactgroupviewerdialog.cpp b/src/contactgroupviewerdialog.cpp
index c33ef52..fc9644a 100644
--- a/src/contactgroupviewerdialog.cpp
+++ b/src/contactgroupviewerdialog.cpp
@@ -43,9 +43,9 @@ ContactGroupViewerDialog::ContactGroupViewerDialog(QWidget *parent)
, d(new Private)
{
setWindowTitle(i18n("Show Contact Group"));
- QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
+
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok, this);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
diff --git a/src/contactviewerdialog.cpp b/src/contactviewerdialog.cpp
index 3e2293b..b4b9206 100644
--- a/src/contactviewerdialog.cpp
+++ b/src/contactviewerdialog.cpp
@@ -70,11 +70,10 @@ ContactViewerDialog::ContactViewerDialog(QWidget *parent)
, d(new Private(this))
{
setWindowTitle(i18n("Show Contact"));
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok);
QWidget *mainWidget = new QWidget(this);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
mainLayout->addWidget(mainWidget);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
diff --git a/src/editor/addresseditor/addresslocationwidget.cpp b/src/editor/addresseditor/addresslocationwidget.cpp
index 8b74aac..8145c8e 100644
--- a/src/editor/addresseditor/addresslocationwidget.cpp
+++ b/src/editor/addresseditor/addresslocationwidget.cpp
@@ -45,8 +45,7 @@ AddressLocationWidget::AddressLocationWidget(QWidget *parent)
mCurrentAddress(-1),
mCurrentMode(CreateAddress)
{
- QVBoxLayout *topLayout = new QVBoxLayout;
- setLayout(topLayout);
+ QVBoxLayout *topLayout = new QVBoxLayout(this);
QGridLayout *gridLayout = new QGridLayout;
topLayout->addLayout(gridLayout);
diff --git a/src/editor/generalinfoeditor/mail/maillistwidget.cpp b/src/editor/generalinfoeditor/mail/maillistwidget.cpp
index b003f26..ec92275 100644
--- a/src/editor/generalinfoeditor/mail/maillistwidget.cpp
+++ b/src/editor/generalinfoeditor/mail/maillistwidget.cpp
@@ -31,10 +31,9 @@ using namespace Akonadi;
MailListWidget::MailListWidget(QWidget *parent)
: QWidget(parent)
{
- QVBoxLayout *topLayout = new QVBoxLayout;
+ QVBoxLayout *topLayout = new QVBoxLayout(this);
topLayout->setMargin(0);
topLayout->setSpacing(0);
- setLayout(topLayout);
QLabel *label = new QLabel(i18n("Email"), this);
label->setObjectName(QStringLiteral("emaillistlabel"));
diff --git a/src/editor/generalinfoeditor/messaging/messaginglistwidget.cpp b/src/editor/generalinfoeditor/messaging/messaginglistwidget.cpp
index 5ff8875..c97e8af 100644
--- a/src/editor/generalinfoeditor/messaging/messaginglistwidget.cpp
+++ b/src/editor/generalinfoeditor/messaging/messaginglistwidget.cpp
@@ -31,10 +31,9 @@ using namespace Akonadi;
MessagingListWidget::MessagingListWidget(QWidget *parent)
: QWidget(parent)
{
- QVBoxLayout *topLayout = new QVBoxLayout;
+ QVBoxLayout *topLayout = new QVBoxLayout(this);
topLayout->setMargin(0);
topLayout->setSpacing(0);
- setLayout(topLayout);
QLabel *label = new QLabel(i18n("Messaging"), this);
label->setObjectName(QStringLiteral("messaginglistlabel"));
diff --git a/src/editor/generalinfoeditor/nameeditdialog.cpp b/src/editor/generalinfoeditor/nameeditdialog.cpp
index 8907602..21239b5 100644
--- a/src/editor/generalinfoeditor/nameeditdialog.cpp
+++ b/src/editor/generalinfoeditor/nameeditdialog.cpp
@@ -36,7 +36,7 @@ NameEditDialog::NameEditDialog(QWidget *parent)
{
setWindowTitle(i18n("Edit Contact Name"));
- QVBoxLayout *mainLayout = new QVBoxLayout;
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
setLayout(mainLayout);
QFormLayout *layout = new QFormLayout;
diff --git a/src/editor/generalinfoeditor/phone/phonelistwidget.cpp b/src/editor/generalinfoeditor/phone/phonelistwidget.cpp
index 5282ee4..91d11a9 100644
--- a/src/editor/generalinfoeditor/phone/phonelistwidget.cpp
+++ b/src/editor/generalinfoeditor/phone/phonelistwidget.cpp
@@ -31,10 +31,9 @@ using namespace Akonadi;
PhoneListWidget::PhoneListWidget(QWidget *parent)
: QWidget(parent)
{
- QVBoxLayout *topLayout = new QVBoxLayout;
+ QVBoxLayout *topLayout = new QVBoxLayout(this);
topLayout->setMargin(0);
topLayout->setSpacing(0);
- setLayout(topLayout);
QLabel *label = new QLabel(i18n("Phone"), this);
label->setObjectName(QStringLiteral("phonelistlabel"));
diff --git a/src/editor/generalinfoeditor/web/weblistwidget.cpp b/src/editor/generalinfoeditor/web/weblistwidget.cpp
index 3bb5d46..fa19637 100644
--- a/src/editor/generalinfoeditor/web/weblistwidget.cpp
+++ b/src/editor/generalinfoeditor/web/weblistwidget.cpp
@@ -32,10 +32,9 @@ using namespace Akonadi;
WebListWidget::WebListWidget(QWidget *parent)
: QWidget(parent)
{
- QVBoxLayout *topLayout = new QVBoxLayout;
+ QVBoxLayout *topLayout = new QVBoxLayout(this);
topLayout->setMargin(0);
topLayout->setSpacing(0);
- setLayout(topLayout);
QLabel *label = new QLabel(i18n("Web"), this);
label->setObjectName(QStringLiteral("weblistlabel"));