Commit 3366de63 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add parent

parent 25c699d2
......@@ -41,7 +41,7 @@ LoadingBar::LoadingBar(QWidget *parent)
widgetLayout->addStretch();
mLabel = new QLabel(i18n("Loading Progress..."));
mLabel = new QLabel(i18n("Loading Progress..."), this);
mLabel->setMinimumWidth(250);
layout->addWidget(mLabel, 1, Qt::AlignBottom);
......
......@@ -21,7 +21,8 @@
#include "logModeAction.h"
LogModeAction::LogModeAction()
LogModeAction::LogModeAction(QObject *parent)
: QObject(parent)
{
}
......
......@@ -37,7 +37,7 @@ public:
Q_DECLARE_FLAGS(Categories, Category)
LogModeAction();
explicit LogModeAction(QObject *parent = nullptr);
~LogModeAction() override;
......
......@@ -122,12 +122,12 @@ bool LogViewWidgetSearchLine::itemMatches(const QTreeWidgetItem *item, const QSt
return KTreeWidgetSearchLine::itemMatches(item, pattern);
}
LogViewFilterWidget::LogViewFilterWidget()
: d(new LogViewFilterWidgetPrivate())
LogViewFilterWidget::LogViewFilterWidget(QWidget *parent)
: QWidget(parent)
, d(new LogViewFilterWidgetPrivate())
{
auto *filterBarLayout = new QHBoxLayout();
auto *filterBarLayout = new QHBoxLayout(this);
filterBarLayout->setContentsMargins(0, 0, 0, 0);
setLayout(filterBarLayout);
d->filterLine = new LogViewWidgetSearchLine();
......
......@@ -41,7 +41,7 @@ class LogViewFilterWidget : public QWidget
Q_OBJECT
public:
LogViewFilterWidget();
explicit LogViewFilterWidget(QWidget *parent = nullptr);
~LogViewFilterWidget() override;
......
......@@ -35,7 +35,8 @@
#include "logViewWidget.h"
#include "logViewWidgetItem.h"
LogViewSearchWidget::LogViewSearchWidget()
LogViewSearchWidget::LogViewSearchWidget(QWidget *parent)
: QWidget(parent)
{
setupUi(this);
......
......@@ -35,7 +35,7 @@ class LogViewSearchWidget : public QWidget, public Ui::LogViewSearchWidgetBase
Q_OBJECT
public:
LogViewSearchWidget();
explicit LogViewSearchWidget(QWidget *parent = nullptr);
~LogViewSearchWidget() override;
......
......@@ -50,7 +50,7 @@ View::View(QWidget *parent)
topLayout->setContentsMargins(2, 2, 2, 2);
topLayout->setSpacing(2);
mLogViewFilterWidget = new LogViewFilterWidget();
mLogViewFilterWidget = new LogViewFilterWidget(this);
connect(mLogViewFilterWidget->filterLine(), &LogViewWidgetSearchLine::treeWidgetUpdated, this,
&View::searchFilterChanged);
connect(mLogViewFilterWidget->filterLine(), &LogViewWidgetSearchLine::treeWidgetUpdated, this,
......@@ -75,7 +75,7 @@ View::View(QWidget *parent)
topLayout->addWidget(mLogViewSearchWidget);
mLoadingBar = new LoadingBar();
mLoadingBar = new LoadingBar(this);
connect(mLoadingBar, &LoadingBar::displayed, this, &View::displayLoadingBar);
topLayout->addWidget(mLoadingBar);
......
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