Skip to content

Commit

Permalink
Fix some static analysis problems related to initialization of fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemek83 committed Jan 13, 2025
1 parent 54cf4b6 commit f2dd80d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion include/wble/FilterStrings.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class WBLE_EXPORT FilterStrings : public Filter
static constexpr int maximumHeigh_{180};

/// Flag indicating that additional place for scroll should be added.
bool addMarginForScrollBar_;
bool addMarginForScrollBar_{false};

std::unique_ptr<DoubleClickEater> doubleClickEater_;

Expand Down
4 changes: 2 additions & 2 deletions include/wble/ProgressBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ class WBLE_EXPORT ProgressBar : public QWidget

QPen pen_;

const QColor color_;
const QColor color_{Qt::blue};

const QBrush brush_;
const QBrush brush_{color_};

static constexpr int LINE_WIDTH{10};
static constexpr int TITLE_HEIGHT{LINE_WIDTH * 3};
Expand Down
1 change: 0 additions & 1 deletion src/FilterStrings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ FilterStrings::FilterStrings(const QString& name, QStringList initialList,
: Filter{name, parent},
initialList_{std::move(initialList)},
ui_{std::make_unique<Ui::FilterStrings>()},
addMarginForScrollBar_{false},
doubleClickEater_{std::make_unique<DoubleClickEater>()}
{
ui_->setupUi(this);
Expand Down
5 changes: 1 addition & 4 deletions src/ProgressBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
#include <QTimer>

ProgressBar::ProgressBar(QString title, QWidget* parent)
: QWidget{parent},
title_{std::move(title)},
color_{Qt::blue},
brush_{color_}
: QWidget{parent}, title_{std::move(title)}
{
setWindowTitle(title_);

Expand Down

0 comments on commit f2dd80d

Please sign in to comment.