summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-02 15:08:01 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-02 15:08:01 (GMT)
commit6abc5ebb6b1611fd61de5480d5738a4c4751e49b (patch)
tree0eb2c6f57e455d9a5e3a119a8d9b2ae872acbc35
parent72a27cb4738958ec55befef61c9aef94ad8755ab (diff)
Add parent
-rw-r--r--messagecomposer/src/imagescaling/tests/imagescaling_gui.cpp5
-rw-r--r--messagecomposer/src/recipient/recipientspicker.cpp3
-rw-r--r--messagelist/src/core/widgets/quicksearchline.cpp3
-rw-r--r--messagelist/src/utils/configureaggregationsdialog.cpp3
-rw-r--r--messagelist/src/utils/configurethemesdialog.cpp3
-rw-r--r--messagelist/src/utils/themeeditor.cpp5
-rw-r--r--messageviewer/src/scamdetection/scamdetectiondetailsdialog.cpp10
-rw-r--r--messageviewer/src/scamdetection/tests/scamdetectionwebengine_gui.cpp4
-rw-r--r--messageviewer/src/widgets/mailsourceviewtextbrowserwidget.cpp3
9 files changed, 15 insertions, 24 deletions
diff --git a/messagecomposer/src/imagescaling/tests/imagescaling_gui.cpp b/messagecomposer/src/imagescaling/tests/imagescaling_gui.cpp
index eccb1d0..ac23dff 100644
--- a/messagecomposer/src/imagescaling/tests/imagescaling_gui.cpp
+++ b/messagecomposer/src/imagescaling/tests/imagescaling_gui.cpp
@@ -31,9 +31,8 @@
ImageScalingTestWidget::ImageScalingTestWidget(QWidget *parent)
: QWidget(parent)
{
- QHBoxLayout *lay = new QHBoxLayout;
- lay->addWidget(new MessageComposer::ImageScalingWidget);
- setLayout(lay);
+ QHBoxLayout *lay = new QHBoxLayout(this);
+ lay->addWidget(new MessageComposer::ImageScalingWidget(this));
}
ImageScalingTestWidget::~ImageScalingTestWidget()
diff --git a/messagecomposer/src/recipient/recipientspicker.cpp b/messagecomposer/src/recipient/recipientspicker.cpp
index 2bb7804..fae673a 100644
--- a/messagecomposer/src/recipient/recipientspicker.cpp
+++ b/messagecomposer/src/recipient/recipientspicker.cpp
@@ -49,8 +49,7 @@ RecipientsPicker::RecipientsPicker(QWidget *parent)
setObjectName(QStringLiteral("RecipientsPicker"));
setWindowTitle(i18n("Select Recipient"));
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mView = new Akonadi::EmailAddressSelectionWidget(this);
mainLayout->addWidget(mView);
diff --git a/messagelist/src/core/widgets/quicksearchline.cpp b/messagelist/src/core/widgets/quicksearchline.cpp
index ced5b32..adc73eb 100644
--- a/messagelist/src/core/widgets/quicksearchline.cpp
+++ b/messagelist/src/core/widgets/quicksearchline.cpp
@@ -37,10 +37,9 @@ using namespace MessageList::Core;
QuickSearchLine::QuickSearchLine(QWidget *parent)
: QWidget(parent)
{
- QVBoxLayout *vbox = new QVBoxLayout;
+ QVBoxLayout *vbox = new QVBoxLayout(this);
vbox->setMargin(0);
vbox->setSpacing(0);
- setLayout(vbox);
QWidget *w = new QWidget;
QHBoxLayout *hbox = new QHBoxLayout;
diff --git a/messagelist/src/utils/configureaggregationsdialog.cpp b/messagelist/src/utils/configureaggregationsdialog.cpp
index 19ef25b..b31beeb 100644
--- a/messagelist/src/utils/configureaggregationsdialog.cpp
+++ b/messagelist/src/utils/configureaggregationsdialog.cpp
@@ -107,8 +107,7 @@ ConfigureAggregationsDialog::ConfigureAggregationsDialog(QWidget *parent)
setAttribute(Qt::WA_DeleteOnClose);
setWindowModality(Qt::ApplicationModal); // FIXME: Sure ?
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
- 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);
diff --git a/messagelist/src/utils/configurethemesdialog.cpp b/messagelist/src/utils/configurethemesdialog.cpp
index 6220872..186833a 100644
--- a/messagelist/src/utils/configurethemesdialog.cpp
+++ b/messagelist/src/utils/configurethemesdialog.cpp
@@ -98,9 +98,8 @@ ConfigureThemesDialog::ConfigureThemesDialog(QWidget *parent)
{
setAttribute(Qt::WA_DeleteOnClose);
setWindowModality(Qt::ApplicationModal); // FIXME: Sure ?
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
- 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/messagelist/src/utils/themeeditor.cpp b/messagelist/src/utils/themeeditor.cpp
index ef6de55..7dd5f6b 100644
--- a/messagelist/src/utils/themeeditor.cpp
+++ b/messagelist/src/utils/themeeditor.cpp
@@ -69,9 +69,8 @@ ThemeColumnPropertiesDialog::ThemeColumnPropertiesDialog(QWidget *parent, Theme:
{
//setAttribute( Qt::WA_DeleteOnClose );
setWindowModality(Qt::ApplicationModal); // FIXME: Sure ?
- 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);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
diff --git a/messageviewer/src/scamdetection/scamdetectiondetailsdialog.cpp b/messageviewer/src/scamdetection/scamdetectiondetailsdialog.cpp
index d5b5418..b61f1df 100644
--- a/messageviewer/src/scamdetection/scamdetectiondetailsdialog.cpp
+++ b/messageviewer/src/scamdetection/scamdetectiondetailsdialog.cpp
@@ -45,16 +45,16 @@ ScamDetectionDetailsDialog::ScamDetectionDetailsDialog(QWidget *parent)
{
setWindowTitle(i18n("Details"));
setAttribute(Qt::WA_DeleteOnClose);
- QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
- QPushButton *user1Button = new QPushButton;
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
+
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this);
+ QPushButton *user1Button = new QPushButton(this);
buttonBox->addButton(user1Button, QDialogButtonBox::ActionRole);
connect(buttonBox, &QDialogButtonBox::accepted, this, &ScamDetectionDetailsDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this, &ScamDetectionDetailsDialog::reject);
KGuiItem::assign(user1Button, KStandardGuiItem::saveAs());
setModal(false);
- mDetails = new KPIMTextEdit::RichTextEditorWidget;
+ mDetails = new KPIMTextEdit::RichTextEditorWidget(this);
mainLayout->addWidget(mDetails);
mainLayout->addWidget(buttonBox);
mDetails->setReadOnly(true);
diff --git a/messageviewer/src/scamdetection/tests/scamdetectionwebengine_gui.cpp b/messageviewer/src/scamdetection/tests/scamdetectionwebengine_gui.cpp
index bf0e22c..22c89b0 100644
--- a/messageviewer/src/scamdetection/tests/scamdetectionwebengine_gui.cpp
+++ b/messageviewer/src/scamdetection/tests/scamdetectionwebengine_gui.cpp
@@ -39,7 +39,7 @@ ScamDetectionWebEngineTestWidget::ScamDetectionWebEngineTestWidget(const QString
{
mScamDetection = new MessageViewer::ScamDetectionWebEngine(this);
- QVBoxLayout *lay = new QVBoxLayout;
+ QVBoxLayout *lay = new QVBoxLayout(this);
mScamWarningWidget = new MessageViewer::ScamDetectionWarningWidget();
mScamWarningWidget->setUseInTestApps(true);
lay->addWidget(mScamWarningWidget);
@@ -58,8 +58,6 @@ ScamDetectionWebEngineTestWidget::ScamDetectionWebEngineTestWidget(const QString
connect(openFile, &QPushButton::clicked, this, &ScamDetectionWebEngineTestWidget::slotOpenHtml);
hbox->addWidget(openFile);
lay->addLayout(hbox);
-
- setLayout(lay);
}
ScamDetectionWebEngineTestWidget::~ScamDetectionWebEngineTestWidget()
diff --git a/messageviewer/src/widgets/mailsourceviewtextbrowserwidget.cpp b/messageviewer/src/widgets/mailsourceviewtextbrowserwidget.cpp
index 15ca974..d773dba 100644
--- a/messageviewer/src/widgets/mailsourceviewtextbrowserwidget.cpp
+++ b/messageviewer/src/widgets/mailsourceviewtextbrowserwidget.cpp
@@ -59,8 +59,7 @@ using namespace MessageViewer;
MailSourceViewTextBrowserWidget::MailSourceViewTextBrowserWidget(QWidget *parent)
: QWidget(parent)
{
- QVBoxLayout *lay = new QVBoxLayout;
- setLayout(lay);
+ QVBoxLayout *lay = new QVBoxLayout(this);
lay->setMargin(0);
mTextToSpeechWidget = new KPIMTextEdit::TextToSpeechWidget;
mTextToSpeechWidget->setObjectName(QStringLiteral("texttospeech"));