Commit 21524f76 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Initialize pointer + initialize variable directly

parent 30b207a0
......@@ -22,17 +22,17 @@
#include "logViewColumn.h"
LogViewColumn::LogViewColumn(const QString &name, bool filtered, bool grouped)
: mColumnName(name)
, mFiltered(filtered)
, mGrouped(grouped)
{
mColumnName = name;
mFiltered = filtered;
mGrouped = grouped;
}
LogViewColumn::LogViewColumn(const LogViewColumn &column)
: mColumnName(column.columnName())
, mFiltered(column.isFiltered())
, mGrouped(column.isGrouped())
{
mColumnName = column.columnName();
mFiltered = column.isFiltered();
mGrouped = column.isGrouped();
}
LogViewColumn::~LogViewColumn()
......
......@@ -51,9 +51,9 @@ Q_SIGNALS:
private:
void printPageNumber(QPainter &painter, QRect &printView, int movement, int page);
QWidget *mParent;
QWidget *const mParent;
LogViewWidget *mLogViewWidget;
LogViewWidget *const mLogViewWidget;
};
#endif //_LOG_VIEW_EXPORT_H
......@@ -83,8 +83,8 @@ public:
}
};
LogViewWidgetSearchLine::LogViewWidgetSearchLine()
: KTreeWidgetSearchLine()
LogViewWidgetSearchLine::LogViewWidgetSearchLine(QWidget *parent)
: KTreeWidgetSearchLine(parent)
, d(new LogViewWidgetSearchLinePrivate())
{
}
......
......@@ -69,9 +69,9 @@ class LogViewWidgetSearchLine : public KTreeWidgetSearchLine
Q_OBJECT
public:
LogViewWidgetSearchLine();
explicit LogViewWidgetSearchLine(QWidget *parent = nullptr);
~LogViewWidgetSearchLine();
~LogViewWidgetSearchLine() override;
// Silence compiler warning
using KTreeWidgetSearchLine::updateSearch;
......
......@@ -48,7 +48,7 @@ public:
QAction *actionMenu() override;
private:
QAction *mAction;
QAction *mAction = nullptr;
};
#endif // _SIMPLE_ACTIONS_H
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