citra-qt: Make constructors explicit where applicable

This commit is contained in:
Lioncash 2016-12-11 07:22:10 -05:00 committed by linkmauve
parent 327b23e4ce
commit d0e4d1182b
15 changed files with 35 additions and 32 deletions

View File

@ -23,7 +23,7 @@ class EmuThread : public QThread {
Q_OBJECT
public:
EmuThread(GRenderWindow* render_window);
explicit EmuThread(GRenderWindow* render_window);
/**
* Start emulation (on new thread)

View File

@ -13,7 +13,7 @@ class CallstackWidget : public QDockWidget {
Q_OBJECT
public:
CallstackWidget(QWidget* parent = nullptr);
explicit CallstackWidget(QWidget* parent = nullptr);
public slots:
void OnDebugModeEntered();

View File

@ -17,7 +17,7 @@ class DisassemblerModel : public QAbstractListModel {
Q_OBJECT
public:
DisassemblerModel(QObject* parent);
explicit DisassemblerModel(QObject* parent);
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
int rowCount(const QModelIndex& parent = QModelIndex()) const override;

View File

@ -13,7 +13,7 @@ class GPUCommandStreamItemModel : public QAbstractListModel,
Q_OBJECT
public:
GPUCommandStreamItemModel(QObject* parent);
explicit GPUCommandStreamItemModel(QObject* parent);
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;

View File

@ -20,8 +20,8 @@ class GraphicsBreakPointsWidget : public QDockWidget, Pica::DebugContext::BreakP
using Event = Pica::DebugContext::Event;
public:
GraphicsBreakPointsWidget(std::shared_ptr<Pica::DebugContext> debug_context,
QWidget* parent = nullptr);
explicit GraphicsBreakPointsWidget(std::shared_ptr<Pica::DebugContext> debug_context,
QWidget* parent = nullptr);
void OnPicaBreakPointHit(Pica::DebugContext::Event event, void* data) override;
void OnPicaResume() override;

View File

@ -20,7 +20,7 @@ public:
CommandIdRole = Qt::UserRole,
};
GPUCommandListModel(QObject* parent);
explicit GPUCommandListModel(QObject* parent);
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
@ -39,7 +39,7 @@ class GPUCommandListWidget : public QDockWidget {
Q_OBJECT
public:
GPUCommandListWidget(QWidget* parent = nullptr);
explicit GPUCommandListWidget(QWidget* parent = nullptr);
public slots:
void OnToggleTracing();

View File

@ -18,7 +18,8 @@ class SurfacePicture : public QLabel {
Q_OBJECT
public:
SurfacePicture(QWidget* parent = 0, GraphicsSurfaceWidget* surface_widget = nullptr);
explicit SurfacePicture(QWidget* parent = nullptr,
GraphicsSurfaceWidget* surface_widget = nullptr);
~SurfacePicture();
protected slots:
@ -71,8 +72,8 @@ class GraphicsSurfaceWidget : public BreakPointObserverDock {
static unsigned int NibblesPerPixel(Format format);
public:
GraphicsSurfaceWidget(std::shared_ptr<Pica::DebugContext> debug_context,
QWidget* parent = nullptr);
explicit GraphicsSurfaceWidget(std::shared_ptr<Pica::DebugContext> debug_context,
QWidget* parent = nullptr);
void Pick(int x, int y);
public slots:

View File

@ -12,8 +12,8 @@ class GraphicsTracingWidget : public BreakPointObserverDock {
Q_OBJECT
public:
GraphicsTracingWidget(std::shared_ptr<Pica::DebugContext> debug_context,
QWidget* parent = nullptr);
explicit GraphicsTracingWidget(std::shared_ptr<Pica::DebugContext> debug_context,
QWidget* parent = nullptr);
private slots:
void StartRecording();

View File

@ -19,7 +19,7 @@ class GraphicsVertexShaderModel : public QAbstractTableModel {
Q_OBJECT
public:
GraphicsVertexShaderModel(GraphicsVertexShaderWidget* parent);
explicit GraphicsVertexShaderModel(GraphicsVertexShaderWidget* parent);
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
int rowCount(const QModelIndex& parent = QModelIndex()) const override;

View File

@ -15,7 +15,7 @@ class ProfilerModel : public QAbstractItemModel {
Q_OBJECT
public:
ProfilerModel(QObject* parent);
explicit ProfilerModel(QObject* parent);
QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const override;
@ -37,7 +37,7 @@ class ProfilerWidget : public QDockWidget {
Q_OBJECT
public:
ProfilerWidget(QWidget* parent = nullptr);
explicit ProfilerWidget(QWidget* parent = nullptr);
private slots:
void setProfilingInfoUpdateEnabled(bool enable);
@ -53,7 +53,7 @@ class MicroProfileDialog : public QWidget {
Q_OBJECT
public:
MicroProfileDialog(QWidget* parent = nullptr);
explicit MicroProfileDialog(QWidget* parent = nullptr);
/// Returns a QAction that can be used to toggle visibility of this dialog.
QAction* toggleViewAction();

View File

@ -10,7 +10,7 @@ class GRamView : public QHexEdit {
Q_OBJECT
public:
GRamView(QWidget* parent = nullptr);
explicit GRamView(QWidget* parent = nullptr);
public slots:
void OnCPUStepped();

View File

@ -15,7 +15,7 @@ class RegistersWidget : public QDockWidget {
Q_OBJECT
public:
RegistersWidget(QWidget* parent = nullptr);
explicit RegistersWidget(QWidget* parent = nullptr);
public slots:
void OnDebugModeEntered();

View File

@ -51,7 +51,7 @@ private:
class WaitTreeText : public WaitTreeItem {
Q_OBJECT
public:
WaitTreeText(const QString& text);
explicit WaitTreeText(const QString& text);
QString GetText() const override;
private:
@ -67,7 +67,7 @@ public:
class WaitTreeWaitObject : public WaitTreeExpandableItem {
Q_OBJECT
public:
WaitTreeWaitObject(const Kernel::WaitObject& object);
explicit WaitTreeWaitObject(const Kernel::WaitObject& object);
static std::unique_ptr<WaitTreeWaitObject> make(const Kernel::WaitObject& object);
QString GetText() const override;
std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override;
@ -94,7 +94,7 @@ private:
class WaitTreeThread : public WaitTreeWaitObject {
Q_OBJECT
public:
WaitTreeThread(const Kernel::Thread& thread);
explicit WaitTreeThread(const Kernel::Thread& thread);
QString GetText() const override;
QColor GetColor() const override;
std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override;
@ -103,35 +103,37 @@ public:
class WaitTreeEvent : public WaitTreeWaitObject {
Q_OBJECT
public:
WaitTreeEvent(const Kernel::Event& object);
explicit WaitTreeEvent(const Kernel::Event& object);
std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override;
};
class WaitTreeMutex : public WaitTreeWaitObject {
Q_OBJECT
public:
WaitTreeMutex(const Kernel::Mutex& object);
explicit WaitTreeMutex(const Kernel::Mutex& object);
std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override;
};
class WaitTreeSemaphore : public WaitTreeWaitObject {
Q_OBJECT
public:
WaitTreeSemaphore(const Kernel::Semaphore& object);
explicit WaitTreeSemaphore(const Kernel::Semaphore& object);
std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override;
};
class WaitTreeTimer : public WaitTreeWaitObject {
Q_OBJECT
public:
WaitTreeTimer(const Kernel::Timer& object);
explicit WaitTreeTimer(const Kernel::Timer& object);
std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override;
};
class WaitTreeMutexList : public WaitTreeExpandableItem {
Q_OBJECT
public:
WaitTreeMutexList(const boost::container::flat_set<Kernel::SharedPtr<Kernel::Mutex>>& list);
explicit WaitTreeMutexList(
const boost::container::flat_set<Kernel::SharedPtr<Kernel::Mutex>>& list);
QString GetText() const override;
std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override;
@ -142,7 +144,7 @@ private:
class WaitTreeThreadList : public WaitTreeExpandableItem {
Q_OBJECT
public:
WaitTreeThreadList(const std::vector<Kernel::SharedPtr<Kernel::Thread>>& list);
explicit WaitTreeThreadList(const std::vector<Kernel::SharedPtr<Kernel::Thread>>& list);
QString GetText() const override;
std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const override;
@ -154,7 +156,7 @@ class WaitTreeModel : public QAbstractItemModel {
Q_OBJECT
public:
WaitTreeModel(QObject* parent = nullptr);
explicit WaitTreeModel(QObject* parent = nullptr);
QVariant data(const QModelIndex& index, int role) const override;
QModelIndex index(int row, int column, const QModelIndex& parent) const override;
@ -173,7 +175,7 @@ class WaitTreeWidget : public QDockWidget {
Q_OBJECT
public:
WaitTreeWidget(QWidget* parent = nullptr);
explicit WaitTreeWidget(QWidget* parent = nullptr);
public slots:
void OnDebugModeEntered();

View File

@ -55,7 +55,7 @@ class GHotkeysDialog : public QWidget {
Q_OBJECT
public:
GHotkeysDialog(QWidget* parent = nullptr);
explicit GHotkeysDialog(QWidget* parent = nullptr);
private:
Ui::hotkeys ui;

View File

@ -42,7 +42,7 @@ class CSpinBox : public QAbstractSpinBox {
Q_OBJECT
public:
CSpinBox(QWidget* parent = nullptr);
explicit CSpinBox(QWidget* parent = nullptr);
void stepBy(int steps) override;
StepEnabled stepEnabled() const override;