Fix uninitialized variables
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
PlaylistHeader::PlaylistHeader(Qt::Orientation orientation, PlaylistView *view, QWidget *parent)
|
||||
: StretchHeaderView(orientation, parent),
|
||||
view_(view),
|
||||
menu_section_(0),
|
||||
menu_(new QMenu(this)),
|
||||
action_hide_(nullptr),
|
||||
action_reset_(nullptr),
|
||||
|
||||
@@ -62,6 +62,11 @@ PlaylistTabBar::PlaylistTabBar(QWidget *parent)
|
||||
manager_(nullptr),
|
||||
menu_(new QMenu(this)),
|
||||
menu_index_(-1),
|
||||
new_(nullptr),
|
||||
rename_(nullptr),
|
||||
close_(nullptr),
|
||||
save_(nullptr),
|
||||
drag_hover_tab_(0),
|
||||
suppress_current_changed_(false),
|
||||
initialized_(false),
|
||||
rename_editor_(new RenameTabLineEdit(this)) {
|
||||
|
||||
@@ -148,6 +148,7 @@ PlaylistView::PlaylistView(QWidget *parent)
|
||||
set_initial_header_layout_(false),
|
||||
header_state_loaded_(false),
|
||||
header_state_restored_(false),
|
||||
read_only_settings_(false),
|
||||
previous_background_image_opacity_(0.0),
|
||||
fade_animation_(new QTimeLine(1000, this)),
|
||||
force_background_redraw_(false),
|
||||
@@ -1256,7 +1257,7 @@ void PlaylistView::ReloadSettings() {
|
||||
|
||||
void PlaylistView::SaveSettings() {
|
||||
|
||||
if (!header_state_loaded_) return;
|
||||
if (!header_state_loaded_ || read_only_settings_) return;
|
||||
|
||||
QSettings s;
|
||||
s.beginGroup(Playlist::kSettingsGroup);
|
||||
|
||||
@@ -108,7 +108,7 @@ class PlaylistView : public QTreeView {
|
||||
void SetPlaylist(Playlist *playlist);
|
||||
void RemoveSelected();
|
||||
|
||||
void SetReadOnlySettings(bool read_only) { read_only_settings_ = read_only; }
|
||||
void SetReadOnlySettings(const bool read_only) { read_only_settings_ = read_only; }
|
||||
|
||||
Playlist *playlist() const { return playlist_; }
|
||||
AppearanceSettingsPage::BackgroundImageType background_image_type() const { return background_image_type_; }
|
||||
@@ -237,10 +237,9 @@ class PlaylistView : public QTreeView {
|
||||
|
||||
bool background_initialized_;
|
||||
bool set_initial_header_layout_;
|
||||
bool read_only_settings_;
|
||||
bool header_state_loaded_;
|
||||
bool header_state_restored_;
|
||||
bool header_state_readonly_;
|
||||
bool read_only_settings_;
|
||||
|
||||
QImage background_image_;
|
||||
QImage current_song_cover_art_;
|
||||
|
||||
Reference in New Issue
Block a user