summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-01 12:01:29 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-01 12:01:29 (GMT)
commit22f64930ed7190a3f3f08e11668a6f9e3eb64a43 (patch)
tree0d899eceba16927ecc77ec1d55392e0094efc8b0
parentb8d30a730c0a1031d92ec8b746c7fde181cab568 (diff)
Add parent directly
-rw-r--r--src/texteditor/richtexteditor/richtexteditorwidget.cpp4
-rw-r--r--src/texttospeech/texttospeechconfigdialog.cpp3
2 files changed, 2 insertions, 5 deletions
diff --git a/src/texteditor/richtexteditor/richtexteditorwidget.cpp b/src/texteditor/richtexteditor/richtexteditorwidget.cpp
index 073df69..0a3078f 100644
--- a/src/texteditor/richtexteditor/richtexteditorwidget.cpp
+++ b/src/texteditor/richtexteditor/richtexteditorwidget.cpp
@@ -113,7 +113,7 @@ QString RichTextEditorWidget::toPlainText() const
void RichTextEditorWidget::init(RichTextEditor *customEditor)
{
- QVBoxLayout *lay = new QVBoxLayout;
+ QVBoxLayout *lay = new QVBoxLayout(this);
lay->setMargin(0);
d->mTextToSpeechWidget = new KPIMTextEdit::TextToSpeechWidget(this);
lay->addWidget(d->mTextToSpeechWidget);
@@ -137,8 +137,6 @@ void RichTextEditorWidget::init(RichTextEditor *customEditor)
connect(d->mEditor, &RichTextEditor::findText, this, &RichTextEditorWidget::slotFind);
connect(d->mEditor, &RichTextEditor::replaceText, this, &RichTextEditorWidget::slotReplace);
-
- setLayout(lay);
}
void RichTextEditorWidget::slotHideFindBar()
diff --git a/src/texttospeech/texttospeechconfigdialog.cpp b/src/texttospeech/texttospeechconfigdialog.cpp
index b4eae72..b1d38f2 100644
--- a/src/texttospeech/texttospeechconfigdialog.cpp
+++ b/src/texttospeech/texttospeechconfigdialog.cpp
@@ -33,8 +33,7 @@ TextToSpeechConfigDialog::TextToSpeechConfigDialog(QWidget *parent)
: QDialog(parent)
{
setWindowTitle(i18n("Configure Text-To-Speech"));
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
mTextToSpeechConfigWidget = new TextToSpeechConfigWidget(parent);
mainLayout->addWidget(mTextToSpeechConfigWidget);