From b559f7cd16b12345efa593714f9bd29f53333136 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Thu, 17 Sep 2020 18:12:14 +0200 Subject: [PATCH] Fix minor code issues --- data/style/smartplaylistsearchterm.css | 1 - src/smartplaylists/playlistgenerator.cpp | 2 +- src/smartplaylists/playlistgeneratorinserter.cpp | 1 + src/smartplaylists/smartplaylistsearchterm.cpp | 2 +- src/smartplaylists/smartplaylistsearchterm.h | 3 ++- src/smartplaylists/smartplaylistwizard.cpp | 4 ++-- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/data/style/smartplaylistsearchterm.css b/data/style/smartplaylistsearchterm.css index 399648694..b581caa71 100644 --- a/data/style/smartplaylistsearchterm.css +++ b/data/style/smartplaylistsearchterm.css @@ -40,4 +40,3 @@ stop:1 %light2); border: 0px solid transparent; } - diff --git a/src/smartplaylists/playlistgenerator.cpp b/src/smartplaylists/playlistgenerator.cpp index e3e9f38af..b7e69806b 100644 --- a/src/smartplaylists/playlistgenerator.cpp +++ b/src/smartplaylists/playlistgenerator.cpp @@ -32,7 +32,7 @@ const int PlaylistGenerator::kDefaultLimit = 20; const int PlaylistGenerator::kDefaultDynamicHistory = 5; const int PlaylistGenerator::kDefaultDynamicFuture = 15; -PlaylistGenerator::PlaylistGenerator() : QObject(nullptr) {} +PlaylistGenerator::PlaylistGenerator() : QObject(nullptr), backend_(nullptr) {} PlaylistGeneratorPtr PlaylistGenerator::Create(const Type type) { diff --git a/src/smartplaylists/playlistgeneratorinserter.cpp b/src/smartplaylists/playlistgeneratorinserter.cpp index 12edac2aa..e7f369488 100644 --- a/src/smartplaylists/playlistgeneratorinserter.cpp +++ b/src/smartplaylists/playlistgeneratorinserter.cpp @@ -38,6 +38,7 @@ PlaylistGeneratorInserter::PlaylistGeneratorInserter(TaskManager *task_manager, task_manager_(task_manager), collection_(collection), task_id_(-1), + destination_(nullptr), is_dynamic_(false) {} diff --git a/src/smartplaylists/smartplaylistsearchterm.cpp b/src/smartplaylists/smartplaylistsearchterm.cpp index cc0f05890..9501e744e 100644 --- a/src/smartplaylists/smartplaylistsearchterm.cpp +++ b/src/smartplaylists/smartplaylistsearchterm.cpp @@ -32,7 +32,7 @@ SmartPlaylistSearchTerm::SmartPlaylistSearchTerm() : field_(Field_Title), operator_(Op_Equals) {} SmartPlaylistSearchTerm::SmartPlaylistSearchTerm(Field field, Operator op, const QVariant &value) - : field_(field), operator_(op), value_(value) {} + : field_(field), operator_(op), value_(value), date_(Date_Hour) {} QString SmartPlaylistSearchTerm::ToSql() const { diff --git a/src/smartplaylists/smartplaylistsearchterm.h b/src/smartplaylists/smartplaylistsearchterm.h index 4b65355ce..89fad37d6 100644 --- a/src/smartplaylists/smartplaylistsearchterm.h +++ b/src/smartplaylists/smartplaylistsearchterm.h @@ -105,7 +105,8 @@ class SmartPlaylistSearchTerm { Date_Hour = 0, Date_Day, Date_Week, - Date_Month, Date_Year + Date_Month, + Date_Year }; explicit SmartPlaylistSearchTerm(); diff --git a/src/smartplaylists/smartplaylistwizard.cpp b/src/smartplaylists/smartplaylistwizard.cpp index a373c9f0c..33644fb54 100644 --- a/src/smartplaylists/smartplaylistwizard.cpp +++ b/src/smartplaylists/smartplaylistwizard.cpp @@ -36,7 +36,7 @@ class SmartPlaylistWizard::TypePage : public QWizardPage { public: - TypePage(QWidget *parent) : QWizardPage(parent), next_id_(-1) {} + explicit TypePage(QWidget *parent) : QWizardPage(parent), next_id_(-1) {} int nextId() const { return next_id_; } int next_id_; @@ -44,7 +44,7 @@ class SmartPlaylistWizard::TypePage : public QWizardPage { class SmartPlaylistWizard::FinishPage : public QWizardPage { public: - FinishPage(QWidget *parent) : QWizardPage(parent), ui_(new Ui_SmartPlaylistWizardFinishPage) { + explicit FinishPage(QWidget *parent) : QWizardPage(parent), ui_(new Ui_SmartPlaylistWizardFinishPage) { ui_->setupUi(this); connect(ui_->name, SIGNAL(textChanged(QString)), SIGNAL(completeChanged())); }