Change some explicit usage

This commit is contained in:
Jonas Kvinge
2020-06-26 22:41:38 +02:00
parent 740f9581e6
commit dc36aee7ff
28 changed files with 38 additions and 38 deletions

View File

@@ -129,7 +129,7 @@ class Database : public QObject {
class MemoryDatabase : public Database {
public:
MemoryDatabase(Application *app, QObject *parent = nullptr)
explicit MemoryDatabase(Application *app, QObject *parent = nullptr)
: Database(app, parent, ":memory:") {}
~MemoryDatabase() override {
// Make sure Qt doesn't reuse the same database

View File

@@ -31,7 +31,7 @@ class MimeData : public QMimeData {
Q_OBJECT
public:
MimeData(bool clear = false, bool play_now = false, bool enqueue = false, bool enqueue_next_now = false, bool open_in_new_playlist = false)
explicit MimeData(bool clear = false, bool play_now = false, bool enqueue = false, bool enqueue_next_now = false, bool open_in_new_playlist = false)
: override_user_settings_(false),
clear_first_(clear),
play_now_(play_now),

View File

@@ -43,7 +43,7 @@ class QtSystemTrayIcon : public SystemTrayIcon {
Q_OBJECT
public:
QtSystemTrayIcon(QObject *parent = nullptr);
explicit QtSystemTrayIcon(QObject *parent = nullptr);
~QtSystemTrayIcon() override;
void SetupMenu(QAction *previous, QAction *play, QAction *stop, QAction *stop_after, QAction *next, QAction *mute, QAction *love, QAction *quit) override;

View File

@@ -32,7 +32,7 @@ class ScopedGObject {
public:
ScopedGObject() : object_(nullptr) {}
explicit ScopedGObject(const ScopedGObject& other) : object_(nullptr) {
ScopedGObject(const ScopedGObject& other) : object_(nullptr) {
reset(other.object_);
}

View File

@@ -57,7 +57,7 @@ class UrlHandler : public QObject {
Error,
};
LoadResult(const QUrl &original_url = QUrl(), const Type type = NoMoreTracks, const QUrl &stream_url = QUrl(), const Song::FileType filetype = Song::FileType_Stream, const int samplerate = -1, const int bit_depth = -1, const qint64 length_nanosec = -1, const QString error = QString());
explicit LoadResult(const QUrl &original_url = QUrl(), const Type type = NoMoreTracks, const QUrl &stream_url = QUrl(), const Song::FileType filetype = Song::FileType_Stream, const int samplerate = -1, const int bit_depth = -1, const qint64 length_nanosec = -1, const QString error = QString());
// The url that the playlist item has in Url().
// Might be something unplayable like lastfm://...

View File

@@ -174,7 +174,7 @@ class ScopedWCharArray {
QString ToString() const { return QString::fromWCharArray(data_.get()); }
wchar_t *get() const { return data_.get(); }
operator wchar_t*() const { return get(); }
explicit operator wchar_t*() const { return get(); }
int characters() const { return chars_; }
int bytes() const { return (chars_ + 1) *sizeof(wchar_t); }