mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-31 09:44:50 +01:00
Use default
This commit is contained in:
parent
1abbd5ecbc
commit
589bdf5dcd
@ -99,7 +99,7 @@ class DebugBase : public QDebug {
|
||||
// Debug message will be stored in a buffer.
|
||||
class BufferedDebug : public DebugBase<BufferedDebug> {
|
||||
public:
|
||||
BufferedDebug() {}
|
||||
BufferedDebug() = default;
|
||||
explicit BufferedDebug(QtMsgType) : buf_(new QBuffer, later_deleter) {
|
||||
buf_->open(QIODevice::WriteOnly);
|
||||
|
||||
@ -118,7 +118,7 @@ class BufferedDebug : public DebugBase<BufferedDebug> {
|
||||
// Debug message will be logged immediately.
|
||||
class LoggedDebug : public DebugBase<LoggedDebug> {
|
||||
public:
|
||||
LoggedDebug() {}
|
||||
LoggedDebug() = default;
|
||||
explicit LoggedDebug(QtMsgType t) : DebugBase(t) { nospace() << kMessageHandlerMagic; }
|
||||
};
|
||||
|
||||
|
@ -91,7 +91,7 @@
|
||||
class FileRefFactory {
|
||||
public:
|
||||
FileRefFactory() = default;
|
||||
virtual ~FileRefFactory() {}
|
||||
virtual ~FileRefFactory() = default;
|
||||
virtual TagLib::FileRef *GetFileRef(const QString &filename) = 0;
|
||||
|
||||
private:
|
||||
|
@ -35,7 +35,7 @@ FHT::FHT(int n) : num_((n < 3) ? 0 : 1 << n), exp2_((n < 3) ? -1 : n) {
|
||||
}
|
||||
}
|
||||
|
||||
FHT::~FHT() {}
|
||||
FHT::~FHT() = default;
|
||||
|
||||
int FHT::sizeExp() const { return exp2_; }
|
||||
int FHT::size() const { return num_; }
|
||||
|
@ -23,9 +23,9 @@
|
||||
|
||||
#include "settingsprovider.h"
|
||||
|
||||
SettingsProvider::SettingsProvider() {}
|
||||
SettingsProvider::SettingsProvider() = default;
|
||||
|
||||
DefaultSettingsProvider::DefaultSettingsProvider() {}
|
||||
DefaultSettingsProvider::DefaultSettingsProvider() = default;
|
||||
|
||||
void DefaultSettingsProvider::set_group(const char *group) {
|
||||
while (!backend_.group().isEmpty()) backend_.endGroup();
|
||||
|
@ -275,8 +275,8 @@ Song::Private::Private(Song::Source source)
|
||||
{}
|
||||
|
||||
Song::Song(Song::Source source) : d(new Private(source)) {}
|
||||
Song::Song(const Song &other) : d(other.d) {}
|
||||
Song::~Song() {}
|
||||
Song::Song(const Song &other) = default;
|
||||
Song::~Song() = default;
|
||||
|
||||
Song &Song::operator=(const Song &other) {
|
||||
d = other.d;
|
||||
|
@ -126,7 +126,7 @@ AlbumCoverChoiceController::AlbumCoverChoiceController(QWidget *parent) :
|
||||
|
||||
}
|
||||
|
||||
AlbumCoverChoiceController::~AlbumCoverChoiceController() {}
|
||||
AlbumCoverChoiceController::~AlbumCoverChoiceController() = default;
|
||||
|
||||
void AlbumCoverChoiceController::Init(Application *app) {
|
||||
|
||||
|
@ -47,7 +47,7 @@ GPodLoader::GPodLoader(const QString &mount_point, TaskManager *task_manager, Co
|
||||
original_thread_ = thread();
|
||||
}
|
||||
|
||||
GPodLoader::~GPodLoader() {}
|
||||
GPodLoader::~GPodLoader() = default;
|
||||
|
||||
void GPodLoader::LoadDatabase() {
|
||||
|
||||
|
@ -41,7 +41,7 @@ MtpLoader::MtpLoader(const QUrl &url, TaskManager *task_manager, CollectionBacke
|
||||
original_thread_ = thread();
|
||||
}
|
||||
|
||||
MtpLoader::~MtpLoader() {}
|
||||
MtpLoader::~MtpLoader() = default;
|
||||
|
||||
bool MtpLoader::Init() { return true; }
|
||||
|
||||
|
@ -54,7 +54,7 @@ constexpr char Udisks2Lister::udisks2_service_[];
|
||||
|
||||
Udisks2Lister::Udisks2Lister(QObject *parent) : DeviceLister(parent) {}
|
||||
|
||||
Udisks2Lister::~Udisks2Lister() {}
|
||||
Udisks2Lister::~Udisks2Lister() = default;
|
||||
|
||||
QStringList Udisks2Lister::DeviceUniqueIDs() {
|
||||
QReadLocker locker(&device_data_lock_);
|
||||
|
@ -69,7 +69,7 @@ Engine::Base::Base(const EngineType type, QObject *parent)
|
||||
channels_(0),
|
||||
about_to_end_emitted_(false) {}
|
||||
|
||||
Engine::Base::~Base() {}
|
||||
Engine::Base::~Base() = default;
|
||||
|
||||
bool Engine::Base::Load(const QUrl &stream_url, const QUrl &original_url, const TrackChangeFlags, const bool force_stop_at_end, const quint64 beginning_nanosec, const qint64 end_nanosec) {
|
||||
|
||||
|
@ -69,8 +69,7 @@ PlaylistFilter::PlaylistFilter(QObject *parent)
|
||||
<< Playlist::Column_Bitrate;
|
||||
}
|
||||
|
||||
PlaylistFilter::~PlaylistFilter() {
|
||||
}
|
||||
PlaylistFilter::~PlaylistFilter() = default;
|
||||
|
||||
void PlaylistFilter::sort(int column, Qt::SortOrder order) {
|
||||
// Pass this through to the Playlist, it does sorting itself
|
||||
|
@ -36,7 +36,7 @@
|
||||
class SearchTermComparator {
|
||||
public:
|
||||
SearchTermComparator() = default;
|
||||
virtual ~SearchTermComparator() {}
|
||||
virtual ~SearchTermComparator() = default;
|
||||
virtual bool Matches(const QString &element) const = 0;
|
||||
private:
|
||||
Q_DISABLE_COPY(SearchTermComparator)
|
||||
|
@ -80,7 +80,7 @@ PlaylistItem *PlaylistItem::NewFromSong(const Song &song) {
|
||||
|
||||
}
|
||||
|
||||
PlaylistItem::~PlaylistItem() {}
|
||||
PlaylistItem::~PlaylistItem() = default;
|
||||
|
||||
void PlaylistItem::BindToQuery(QSqlQuery *query) const {
|
||||
|
||||
|
@ -49,7 +49,7 @@ QobuzBaseRequest::QobuzBaseRequest(QobuzService *service, NetworkAccessManager *
|
||||
network_(network)
|
||||
{}
|
||||
|
||||
QobuzBaseRequest::~QobuzBaseRequest() {}
|
||||
QobuzBaseRequest::~QobuzBaseRequest() = default;
|
||||
|
||||
QNetworkReply *QobuzBaseRequest::CreateRequest(const QString &ressource_name, const QList<Param> ¶ms_provided) {
|
||||
|
||||
|
@ -50,4 +50,4 @@ LastFMScrobbler::LastFMScrobbler(Application *app, QObject *parent) : Scrobbling
|
||||
|
||||
}
|
||||
|
||||
LastFMScrobbler::~LastFMScrobbler() {}
|
||||
LastFMScrobbler::~LastFMScrobbler() = default;
|
||||
|
@ -50,4 +50,4 @@ LibreFMScrobbler::LibreFMScrobbler(Application *app, QObject *parent) : Scrobbli
|
||||
|
||||
}
|
||||
|
||||
LibreFMScrobbler::~LibreFMScrobbler() {}
|
||||
LibreFMScrobbler::~LibreFMScrobbler() = default;
|
||||
|
@ -86,7 +86,7 @@ SmartPlaylistQueryWizardPlugin::SmartPlaylistQueryWizardPlugin(Application *app,
|
||||
search_page_(nullptr),
|
||||
previous_scrollarea_max_(0) {}
|
||||
|
||||
SmartPlaylistQueryWizardPlugin::~SmartPlaylistQueryWizardPlugin() {}
|
||||
SmartPlaylistQueryWizardPlugin::~SmartPlaylistQueryWizardPlugin() = default;
|
||||
|
||||
QString SmartPlaylistQueryWizardPlugin::name() const { return tr("Collection search"); }
|
||||
|
||||
|
@ -39,7 +39,7 @@ SmartPlaylistsView::SmartPlaylistsView(QWidget *_parent) : QListView(_parent) {
|
||||
|
||||
}
|
||||
|
||||
SmartPlaylistsView::~SmartPlaylistsView() {}
|
||||
SmartPlaylistsView::~SmartPlaylistsView() = default;
|
||||
|
||||
void SmartPlaylistsView::selectionChanged(const QItemSelection&, const QItemSelection&) {
|
||||
emit ItemsSelectedChanged();
|
||||
|
@ -44,7 +44,7 @@ class RequestForUrlMatcher : public MatcherInterface<const QNetworkRequest&> {
|
||||
RequestForUrlMatcher(const QString& contains, const QMap<QString, QString> &expected_params)
|
||||
: contains_(contains), expected_params_(expected_params) {}
|
||||
|
||||
~RequestForUrlMatcher() override {}
|
||||
~RequestForUrlMatcher() override = default;
|
||||
|
||||
virtual bool Matches(const QNetworkRequest& req) const {
|
||||
const QUrl& url = req.url();
|
||||
|
Loading…
x
Reference in New Issue
Block a user