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.
|
// Debug message will be stored in a buffer.
|
||||||
class BufferedDebug : public DebugBase<BufferedDebug> {
|
class BufferedDebug : public DebugBase<BufferedDebug> {
|
||||||
public:
|
public:
|
||||||
BufferedDebug() {}
|
BufferedDebug() = default;
|
||||||
explicit BufferedDebug(QtMsgType) : buf_(new QBuffer, later_deleter) {
|
explicit BufferedDebug(QtMsgType) : buf_(new QBuffer, later_deleter) {
|
||||||
buf_->open(QIODevice::WriteOnly);
|
buf_->open(QIODevice::WriteOnly);
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ class BufferedDebug : public DebugBase<BufferedDebug> {
|
||||||
// Debug message will be logged immediately.
|
// Debug message will be logged immediately.
|
||||||
class LoggedDebug : public DebugBase<LoggedDebug> {
|
class LoggedDebug : public DebugBase<LoggedDebug> {
|
||||||
public:
|
public:
|
||||||
LoggedDebug() {}
|
LoggedDebug() = default;
|
||||||
explicit LoggedDebug(QtMsgType t) : DebugBase(t) { nospace() << kMessageHandlerMagic; }
|
explicit LoggedDebug(QtMsgType t) : DebugBase(t) { nospace() << kMessageHandlerMagic; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
class FileRefFactory {
|
class FileRefFactory {
|
||||||
public:
|
public:
|
||||||
FileRefFactory() = default;
|
FileRefFactory() = default;
|
||||||
virtual ~FileRefFactory() {}
|
virtual ~FileRefFactory() = default;
|
||||||
virtual TagLib::FileRef *GetFileRef(const QString &filename) = 0;
|
virtual TagLib::FileRef *GetFileRef(const QString &filename) = 0;
|
||||||
|
|
||||||
private:
|
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::sizeExp() const { return exp2_; }
|
||||||
int FHT::size() const { return num_; }
|
int FHT::size() const { return num_; }
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
|
|
||||||
#include "settingsprovider.h"
|
#include "settingsprovider.h"
|
||||||
|
|
||||||
SettingsProvider::SettingsProvider() {}
|
SettingsProvider::SettingsProvider() = default;
|
||||||
|
|
||||||
DefaultSettingsProvider::DefaultSettingsProvider() {}
|
DefaultSettingsProvider::DefaultSettingsProvider() = default;
|
||||||
|
|
||||||
void DefaultSettingsProvider::set_group(const char *group) {
|
void DefaultSettingsProvider::set_group(const char *group) {
|
||||||
while (!backend_.group().isEmpty()) backend_.endGroup();
|
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(Song::Source source) : d(new Private(source)) {}
|
||||||
Song::Song(const Song &other) : d(other.d) {}
|
Song::Song(const Song &other) = default;
|
||||||
Song::~Song() {}
|
Song::~Song() = default;
|
||||||
|
|
||||||
Song &Song::operator=(const Song &other) {
|
Song &Song::operator=(const Song &other) {
|
||||||
d = other.d;
|
d = other.d;
|
||||||
|
|
|
@ -126,7 +126,7 @@ AlbumCoverChoiceController::AlbumCoverChoiceController(QWidget *parent) :
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AlbumCoverChoiceController::~AlbumCoverChoiceController() {}
|
AlbumCoverChoiceController::~AlbumCoverChoiceController() = default;
|
||||||
|
|
||||||
void AlbumCoverChoiceController::Init(Application *app) {
|
void AlbumCoverChoiceController::Init(Application *app) {
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ GPodLoader::GPodLoader(const QString &mount_point, TaskManager *task_manager, Co
|
||||||
original_thread_ = thread();
|
original_thread_ = thread();
|
||||||
}
|
}
|
||||||
|
|
||||||
GPodLoader::~GPodLoader() {}
|
GPodLoader::~GPodLoader() = default;
|
||||||
|
|
||||||
void GPodLoader::LoadDatabase() {
|
void GPodLoader::LoadDatabase() {
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ MtpLoader::MtpLoader(const QUrl &url, TaskManager *task_manager, CollectionBacke
|
||||||
original_thread_ = thread();
|
original_thread_ = thread();
|
||||||
}
|
}
|
||||||
|
|
||||||
MtpLoader::~MtpLoader() {}
|
MtpLoader::~MtpLoader() = default;
|
||||||
|
|
||||||
bool MtpLoader::Init() { return true; }
|
bool MtpLoader::Init() { return true; }
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ constexpr char Udisks2Lister::udisks2_service_[];
|
||||||
|
|
||||||
Udisks2Lister::Udisks2Lister(QObject *parent) : DeviceLister(parent) {}
|
Udisks2Lister::Udisks2Lister(QObject *parent) : DeviceLister(parent) {}
|
||||||
|
|
||||||
Udisks2Lister::~Udisks2Lister() {}
|
Udisks2Lister::~Udisks2Lister() = default;
|
||||||
|
|
||||||
QStringList Udisks2Lister::DeviceUniqueIDs() {
|
QStringList Udisks2Lister::DeviceUniqueIDs() {
|
||||||
QReadLocker locker(&device_data_lock_);
|
QReadLocker locker(&device_data_lock_);
|
||||||
|
|
|
@ -69,7 +69,7 @@ Engine::Base::Base(const EngineType type, QObject *parent)
|
||||||
channels_(0),
|
channels_(0),
|
||||||
about_to_end_emitted_(false) {}
|
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) {
|
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;
|
<< Playlist::Column_Bitrate;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlaylistFilter::~PlaylistFilter() {
|
PlaylistFilter::~PlaylistFilter() = default;
|
||||||
}
|
|
||||||
|
|
||||||
void PlaylistFilter::sort(int column, Qt::SortOrder order) {
|
void PlaylistFilter::sort(int column, Qt::SortOrder order) {
|
||||||
// Pass this through to the Playlist, it does sorting itself
|
// Pass this through to the Playlist, it does sorting itself
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
class SearchTermComparator {
|
class SearchTermComparator {
|
||||||
public:
|
public:
|
||||||
SearchTermComparator() = default;
|
SearchTermComparator() = default;
|
||||||
virtual ~SearchTermComparator() {}
|
virtual ~SearchTermComparator() = default;
|
||||||
virtual bool Matches(const QString &element) const = 0;
|
virtual bool Matches(const QString &element) const = 0;
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(SearchTermComparator)
|
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 {
|
void PlaylistItem::BindToQuery(QSqlQuery *query) const {
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ QobuzBaseRequest::QobuzBaseRequest(QobuzService *service, NetworkAccessManager *
|
||||||
network_(network)
|
network_(network)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
QobuzBaseRequest::~QobuzBaseRequest() {}
|
QobuzBaseRequest::~QobuzBaseRequest() = default;
|
||||||
|
|
||||||
QNetworkReply *QobuzBaseRequest::CreateRequest(const QString &ressource_name, const QList<Param> ¶ms_provided) {
|
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),
|
search_page_(nullptr),
|
||||||
previous_scrollarea_max_(0) {}
|
previous_scrollarea_max_(0) {}
|
||||||
|
|
||||||
SmartPlaylistQueryWizardPlugin::~SmartPlaylistQueryWizardPlugin() {}
|
SmartPlaylistQueryWizardPlugin::~SmartPlaylistQueryWizardPlugin() = default;
|
||||||
|
|
||||||
QString SmartPlaylistQueryWizardPlugin::name() const { return tr("Collection search"); }
|
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&) {
|
void SmartPlaylistsView::selectionChanged(const QItemSelection&, const QItemSelection&) {
|
||||||
emit ItemsSelectedChanged();
|
emit ItemsSelectedChanged();
|
||||||
|
|
|
@ -44,7 +44,7 @@ class RequestForUrlMatcher : public MatcherInterface<const QNetworkRequest&> {
|
||||||
RequestForUrlMatcher(const QString& contains, const QMap<QString, QString> &expected_params)
|
RequestForUrlMatcher(const QString& contains, const QMap<QString, QString> &expected_params)
|
||||||
: contains_(contains), expected_params_(expected_params) {}
|
: contains_(contains), expected_params_(expected_params) {}
|
||||||
|
|
||||||
~RequestForUrlMatcher() override {}
|
~RequestForUrlMatcher() override = default;
|
||||||
|
|
||||||
virtual bool Matches(const QNetworkRequest& req) const {
|
virtual bool Matches(const QNetworkRequest& req) const {
|
||||||
const QUrl& url = req.url();
|
const QUrl& url = req.url();
|
||||||
|
|
Loading…
Reference in New Issue