Fix all warnings from the cppcoreguidelines-pro-type-member-init clang-tidy check (#4426)

This commit is contained in:
pajlada
2023-09-09 13:11:19 +02:00
committed by GitHub
parent 877a4e05fa
commit d4558b5fe5
26 changed files with 44 additions and 42 deletions
+2 -2
View File
@@ -46,7 +46,7 @@ protected:
private:
struct {
Split *split;
} ui_;
} ui_{};
struct Item {
void *hwnd;
@@ -61,7 +61,7 @@ private:
void *target_;
int yOffset_;
int currentYOffset_;
int currentYOffset_{};
double x_ = -1;
double pixelRatio_ = -1;
int width_ = 360;
+2 -2
View File
@@ -71,7 +71,7 @@ private:
struct {
QLabel *label;
ColorButton *color;
} selected;
} selected{};
struct {
QColorPicker *colorPicker;
@@ -82,7 +82,7 @@ private:
QLabel *htmlLabel;
QLineEdit *htmlEdit;
} picker;
} picker{};
} ui_;
enum SpinBox : size_t { RED = 0, GREEN = 1, BLUE = 2, ALPHA = 3, END };
+1 -1
View File
@@ -25,7 +25,7 @@ private:
QVBoxLayout *vbox;
QComboBox *selector;
QDialogButtonBox *buttonBox;
} ui_;
} ui_{};
QString channelURL_;
};
+2 -2
View File
@@ -39,8 +39,8 @@ private:
void updateLatestMessages();
void loadAvatar(const QUrl &url);
bool isMod_;
bool isBroadcaster_;
bool isMod_{};
bool isBroadcaster_{};
Split *split_;
+3 -3
View File
@@ -256,8 +256,8 @@ private:
void showReplyThreadPopup(const MessagePtr &message);
bool canReplyToMessages() const;
QTimer *layoutCooldown_;
bool layoutQueued_;
QTimer *layoutCooldown_{};
bool layoutQueued_{};
QTimer updateTimer_;
bool updateQueued_ = false;
@@ -286,7 +286,7 @@ private:
Split *split_ = nullptr;
Scrollbar *scrollBar_;
EffectLabel *goToBottom_;
EffectLabel *goToBottom_{};
bool showScrollBar_ = false;
FilterSetPtr channelFilters_;
+1 -1
View File
@@ -24,7 +24,7 @@ public:
void updateSize();
QWidget *page;
QWidget *page{};
void setCustomTitle(const QString &title);
void resetCustomTitle();
+3 -3
View File
@@ -35,9 +35,9 @@ public:
private:
std::shared_ptr<QColor> color_;
Style style_;
bool isRedeemedHighlight_;
bool isFirstMessageHighlight_;
bool isElevatedMessageHighlight_;
bool isRedeemedHighlight_{};
bool isFirstMessageHighlight_{};
bool isElevatedMessageHighlight_{};
};
} // namespace chatterino
+1 -1
View File
@@ -27,7 +27,7 @@ protected:
void paintEvent(QPaintEvent *) override;
private:
TitleBarButtonStyle style_;
TitleBarButtonStyle style_{};
};
} // namespace chatterino
+1 -1
View File
@@ -16,7 +16,7 @@ private:
void addLicense(QFormLayout *form, const QString &name_,
const QString &website, const QString &licenseLink);
QLabel *logo_;
QLabel *logo_{};
};
} // namespace chatterino
+3 -3
View File
@@ -14,9 +14,9 @@ public:
AccountsPage();
private:
QPushButton *addButton_;
QPushButton *removeButton_;
AccountSwitchWidget *accountSwitchWidget_;
QPushButton *addButton_{};
QPushButton *removeButton_{};
AccountSwitchWidget *accountSwitchWidget_{};
};
} // namespace chatterino
+1 -1
View File
@@ -85,7 +85,7 @@ public:
}
protected:
SettingsDialogTab *tab_;
SettingsDialogTab *tab_{};
pajlada::Signals::NoArgSignal onCancel_;
pajlada::Signals::SignalHolder managedConnections_;
};
+1 -1
View File
@@ -57,7 +57,7 @@ private:
struct {
GenericListView *listView;
} ui_;
} ui_{};
GenericListModel model_;
ActionCallback callback_;
+3 -3
View File
@@ -121,7 +121,7 @@ public:
Type type_;
Split *split_;
Node *preferedFocusTarget_;
Node *preferedFocusTarget_{};
Node *parent_;
QRectF geometry_;
qreal flexH_ = 1;
@@ -158,7 +158,7 @@ private:
{
public:
SplitContainer *parent;
Node *node;
Node *node{};
void setVertical(bool isVertical);
ResizeHandle(SplitContainer *_parent = nullptr);
@@ -173,7 +173,7 @@ private:
private:
void resetFlex();
bool vertical_;
bool vertical_{};
bool isMouseDown_ = false;
};
+1 -1
View File
@@ -129,7 +129,7 @@ protected:
QHBoxLayout *replyHbox;
QLabel *replyLabel;
EffectLabel *cancelReplyButton;
} ui_;
} ui_{};
std::shared_ptr<MessageThread> replyThread_ = nullptr;
bool enableInlineReplying_;