Commit 597d74a3 authored by Laurent Montel's avatar Laurent Montel 😁

Assign parent directly

parent 6b4c1725
......@@ -53,7 +53,7 @@ using namespace KSieveUi;
SieveEditorWidget::SieveEditorWidget(bool useMenuBar, QWidget *parent)
: QWidget(parent)
{
QVBoxLayout *lay = new QVBoxLayout;
QVBoxLayout *lay = new QVBoxLayout(this);
#if !defined(NDEBUG)
mGenerateXml = nullptr;
#endif
......@@ -136,7 +136,6 @@ SieveEditorWidget::SieveEditorWidget(bool useMenuBar, QWidget *parent)
lay->addLayout(nameLayout);
lay->setMargin(0);
setLayout(lay);
mStackedWidget = new QStackedWidget;
mTextModeWidget = new SieveEditorTextModeWidget;
......
......@@ -69,10 +69,10 @@ ManageSieveWidget::ManageSieveWidget(QWidget *parent)
: QWidget(parent)
, d(new KSieveUi::ManageSieveWidgetPrivate)
{
QHBoxLayout *lay = new QHBoxLayout;
QHBoxLayout *lay = new QHBoxLayout(this);
lay->setMargin(0);
d->mTreeView = new ManageSieveTreeView;
d->mTreeView = new ManageSieveTreeView(this);
#ifndef QT_NO_CONTEXTMENU
connect(d->mTreeView, &ManageSieveTreeView::customContextMenuRequested, this, &ManageSieveWidget::slotContextMenuRequested);
#endif
......@@ -83,7 +83,6 @@ ManageSieveWidget::ManageSieveWidget(QWidget *parent)
connect(PimCommon::NetworkManager::self()->networkConfigureManager(), &QNetworkConfigurationManager::onlineStateChanged, this, &ManageSieveWidget::slotSystemNetworkOnlineStateChanged);
lay->addWidget(d->mTreeView);
setLayout(lay);
QTimer::singleShot(0, this, &ManageSieveWidget::slotCheckNetworkStatus);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment