Add explicit
This commit is contained in:
@@ -42,7 +42,7 @@ class Database : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Database(Application *app, QObject *parent = nullptr, const QString &database_name = QString());
|
||||
explicit Database(Application *app, QObject *parent = nullptr, const QString &database_name = QString());
|
||||
~Database();
|
||||
|
||||
struct AttachedDatabase {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
class DBusScreensaver : public Screensaver {
|
||||
public:
|
||||
DBusScreensaver(const QString &service, const QString &path, const QString &interface);
|
||||
explicit DBusScreensaver(const QString &service, const QString &path, const QString &interface);
|
||||
|
||||
void Inhibit();
|
||||
void Uninhibit();
|
||||
|
||||
@@ -38,7 +38,7 @@ class DeleteFiles : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DeleteFiles(TaskManager *task_manager, std::shared_ptr<MusicStorage> storage);
|
||||
explicit DeleteFiles(TaskManager *task_manager, std::shared_ptr<MusicStorage> storage);
|
||||
~DeleteFiles();
|
||||
|
||||
static const int kBatchSize;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "musicstorage.h"
|
||||
|
||||
class FilesystemMusicStorage : public virtual MusicStorage {
|
||||
public:
|
||||
public:
|
||||
explicit FilesystemMusicStorage(const QString &root);
|
||||
~FilesystemMusicStorage() {}
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
bool CopyToStorage(const CopyJob &job);
|
||||
bool DeleteFromStorage(const DeleteJob &job);
|
||||
|
||||
private:
|
||||
private:
|
||||
QString root_;
|
||||
};
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class IconLoader {
|
||||
static void Init();
|
||||
static QIcon Load(const QString &name, const int size = 0);
|
||||
private:
|
||||
IconLoader() {}
|
||||
explicit IconLoader() {}
|
||||
static bool system_icons_;
|
||||
static bool custom_icons_;
|
||||
};
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
namespace IconMapper {
|
||||
|
||||
struct IconProperties {
|
||||
IconProperties() : min_size(0), max_size(0) {}
|
||||
explicit IconProperties() : min_size(0), max_size(0) {}
|
||||
IconProperties(const QStringList &_names, const int _min_size, const int _max_size) : names(_names), min_size(_min_size), max_size(_max_size) {}
|
||||
QStringList names;
|
||||
int min_size;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
class MacScreensaver : public Screensaver {
|
||||
public:
|
||||
MacScreensaver();
|
||||
explicit MacScreensaver();
|
||||
|
||||
void Inhibit();
|
||||
void Uninhibit();
|
||||
|
||||
@@ -38,7 +38,7 @@ class MacSystemTrayIcon : public SystemTrayIcon {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MacSystemTrayIcon(QObject *parent = nullptr);
|
||||
explicit MacSystemTrayIcon(QObject *parent = nullptr);
|
||||
~MacSystemTrayIcon();
|
||||
|
||||
void SetupMenu(QAction *previous, QAction *play, QAction *stop, QAction *stop_after, QAction *next, QAction *mute, QAction *love, QAction *quit);
|
||||
|
||||
@@ -100,7 +100,7 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, const CommandlineOptions& options, QWidget *parent = nullptr);
|
||||
explicit MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, const CommandlineOptions& options, QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
static const char *kSettingsGroup;
|
||||
|
||||
@@ -78,7 +78,7 @@ class Mpris2 : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Mpris2(Application *app, QObject *parent = nullptr);
|
||||
explicit Mpris2(Application *app, QObject *parent = nullptr);
|
||||
|
||||
// org.mpris.MediaPlayer2 MPRIS 2.0 Root interface
|
||||
Q_PROPERTY(bool CanQuit READ CanQuit)
|
||||
|
||||
@@ -32,7 +32,7 @@ class QObject;
|
||||
|
||||
class MultiSortFilterProxy : public QSortFilterProxyModel {
|
||||
public:
|
||||
MultiSortFilterProxy(QObject *parent = nullptr);
|
||||
explicit MultiSortFilterProxy(QObject *parent = nullptr);
|
||||
|
||||
void AddSortSpec(int role, Qt::SortOrder order = Qt::AscendingOrder);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
class MusicStorage {
|
||||
public:
|
||||
MusicStorage();
|
||||
explicit MusicStorage();
|
||||
virtual ~MusicStorage() {}
|
||||
|
||||
enum Role {
|
||||
|
||||
@@ -44,7 +44,7 @@ class NetworkProxyFactory : public QNetworkProxyFactory {
|
||||
QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query);
|
||||
|
||||
private:
|
||||
NetworkProxyFactory();
|
||||
explicit NetworkProxyFactory();
|
||||
|
||||
static NetworkProxyFactory *sInstance;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ class QSqlDatabase;
|
||||
// Rolls back the transaction if the object goes out of scope before Commit() is called.
|
||||
class ScopedTransaction : boost::noncopyable {
|
||||
public:
|
||||
ScopedTransaction(QSqlDatabase *db);
|
||||
explicit ScopedTransaction(QSqlDatabase *db);
|
||||
~ScopedTransaction();
|
||||
|
||||
void Commit();
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
class SettingsProvider {
|
||||
public:
|
||||
SettingsProvider();
|
||||
explicit SettingsProvider();
|
||||
virtual ~SettingsProvider() {}
|
||||
|
||||
virtual void set_group(const char *group) = 0;
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
template <typename T>
|
||||
class SimpleTreeItem {
|
||||
public:
|
||||
SimpleTreeItem(int _type, SimpleTreeModel<T>* _model); // For the root item
|
||||
SimpleTreeItem(int _type, const QString& _key, T* _parent = nullptr);
|
||||
explicit SimpleTreeItem(int _type, SimpleTreeModel<T>* _model); // For the root item
|
||||
explicit SimpleTreeItem(int _type, const QString& _key, T* _parent = nullptr);
|
||||
explicit SimpleTreeItem(int _type, T* _parent = nullptr);
|
||||
virtual ~SimpleTreeItem();
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ const QStringList Song::kArticles = QStringList() << "the " << "a " << "an ";
|
||||
|
||||
struct Song::Private : public QSharedData {
|
||||
|
||||
Private(Source source = Source_Unknown);
|
||||
explicit Private(Source source = Source_Unknown);
|
||||
|
||||
bool valid_;
|
||||
int id_;
|
||||
|
||||
@@ -103,7 +103,7 @@ class Song {
|
||||
FileType_Stream = 91,
|
||||
};
|
||||
|
||||
Song(Song::Source source = Song::Source_Unknown);
|
||||
explicit Song(Song::Source source = Song::Source_Unknown);
|
||||
Song(const Song &other);
|
||||
~Song();
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ class StandardItemIconLoader : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
StandardItemIconLoader(AlbumCoverLoader *cover_loader, QObject *parent = nullptr);
|
||||
explicit StandardItemIconLoader(AlbumCoverLoader *cover_loader, QObject *parent = nullptr);
|
||||
|
||||
AlbumCoverLoaderOptions *options() { return &cover_options_; }
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class SystemTrayIcon : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SystemTrayIcon(QObject *parent = nullptr);
|
||||
explicit SystemTrayIcon(QObject *parent = nullptr);
|
||||
|
||||
// Called once to create the icon's context menu
|
||||
virtual void SetupMenu(QAction *previous, QAction *play, QAction *stop, QAction *stop_after, QAction *next, QAction *mute, QAction *love, QAction *quit) = 0;
|
||||
|
||||
@@ -29,8 +29,7 @@ class QObject;
|
||||
// Improve QThread by adding a SetIoPriority function
|
||||
class Thread : public QThread {
|
||||
public:
|
||||
Thread(QObject* parent = nullptr)
|
||||
: QThread(parent), io_priority_(Utilities::IOPRIO_CLASS_NONE) {}
|
||||
explicit Thread(QObject* parent = nullptr) : QThread(parent), io_priority_(Utilities::IOPRIO_CLASS_NONE) {}
|
||||
|
||||
void SetIoPriority(Utilities::IoPriority priority) {
|
||||
io_priority_ = priority;
|
||||
|
||||
@@ -27,7 +27,7 @@ class QTranslator;
|
||||
|
||||
class Translations : public QObject {
|
||||
public:
|
||||
Translations();
|
||||
explicit Translations();
|
||||
~Translations();
|
||||
void LoadTranslation(const QString &prefix, const QString &path, const QString &language);
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ class Windows7ThumbBar : public QObject {
|
||||
|
||||
public:
|
||||
// Creates a list of buttons in the taskbar icon for this window. Does nothing and is safe to use on other operating systems too.
|
||||
Windows7ThumbBar(QWidget *widget = 0);
|
||||
explicit Windows7ThumbBar(QWidget *widget = 0);
|
||||
|
||||
static const int kIconSize;
|
||||
static const int kMaxButtonCount;
|
||||
|
||||
Reference in New Issue
Block a user