From 79434d3d4c7165903cca06740d171b59e763f189 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 2 Aug 2018 22:04:52 -0400 Subject: [PATCH] citra-qt: Use Qt 5 signal/slots where applicable Makes the signal/slot connections type-safe instead of string-based. --- .../debugger/graphics/graphics_breakpoint_observer.h | 8 ++++---- src/citra_qt/debugger/graphics/graphics_breakpoints.h | 11 +++++------ .../debugger/graphics/graphics_breakpoints_p.h | 1 - src/citra_qt/debugger/graphics/graphics_surface.h | 9 ++++----- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/citra_qt/debugger/graphics/graphics_breakpoint_observer.h b/src/citra_qt/debugger/graphics/graphics_breakpoint_observer.h index e77df4f5b8..6bb7833c11 100644 --- a/src/citra_qt/debugger/graphics/graphics_breakpoint_observer.h +++ b/src/citra_qt/debugger/graphics/graphics_breakpoint_observer.h @@ -23,11 +23,11 @@ public: void OnPicaBreakPointHit(Pica::DebugContext::Event event, void* data) override; void OnPicaResume() override; -private slots: - virtual void OnBreakPointHit(Pica::DebugContext::Event event, void* data) = 0; - virtual void OnResumed() = 0; - signals: void Resumed(); void BreakPointHit(Pica::DebugContext::Event event, void* data); + +private: + virtual void OnBreakPointHit(Pica::DebugContext::Event event, void* data) = 0; + virtual void OnResumed() = 0; }; diff --git a/src/citra_qt/debugger/graphics/graphics_breakpoints.h b/src/citra_qt/debugger/graphics/graphics_breakpoints.h index bec72a2db5..13fc84e746 100644 --- a/src/citra_qt/debugger/graphics/graphics_breakpoints.h +++ b/src/citra_qt/debugger/graphics/graphics_breakpoints.h @@ -26,18 +26,17 @@ public: void OnPicaBreakPointHit(Pica::DebugContext::Event event, void* data) override; void OnPicaResume() override; -public slots: - void OnBreakPointHit(Pica::DebugContext::Event event, void* data); - void OnItemDoubleClicked(const QModelIndex&); - void OnResumeRequested(); - void OnResumed(); - signals: void Resumed(); void BreakPointHit(Pica::DebugContext::Event event, void* data); void BreakPointsChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight); private: + void OnBreakPointHit(Pica::DebugContext::Event event, void* data); + void OnItemDoubleClicked(const QModelIndex&); + void OnResumeRequested(); + void OnResumed(); + QLabel* status_text; QPushButton* resume_button; diff --git a/src/citra_qt/debugger/graphics/graphics_breakpoints_p.h b/src/citra_qt/debugger/graphics/graphics_breakpoints_p.h index dc64706bd4..e4711dadc4 100644 --- a/src/citra_qt/debugger/graphics/graphics_breakpoints_p.h +++ b/src/citra_qt/debugger/graphics/graphics_breakpoints_p.h @@ -25,7 +25,6 @@ public: bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override; -public slots: void OnBreakPointHit(Pica::DebugContext::Event event); void OnResumed(); diff --git a/src/citra_qt/debugger/graphics/graphics_surface.h b/src/citra_qt/debugger/graphics/graphics_surface.h index 28f5650a73..123df60c51 100644 --- a/src/citra_qt/debugger/graphics/graphics_surface.h +++ b/src/citra_qt/debugger/graphics/graphics_surface.h @@ -86,16 +86,15 @@ public slots: void OnSurfacePickerYChanged(int new_value); void OnUpdate(); -private slots: +signals: + void Update(); + +private: void OnBreakPointHit(Pica::DebugContext::Event event, void* data) override; void OnResumed() override; void SaveSurface(); -signals: - void Update(); - -private: QComboBox* surface_source_list; CSpinBox* surface_address_control; QSpinBox* surface_width_control;