citra-qt: Use Qt 5 signal/slots where applicable

Makes the signal/slot connections type-safe instead of string-based.
This commit is contained in:
Lioncash 2018-08-02 22:04:52 -04:00 committed by fearlessTobi
parent 47025552c7
commit 79434d3d4c
4 changed files with 13 additions and 16 deletions

View file

@ -23,11 +23,11 @@ public:
void OnPicaBreakPointHit(Pica::DebugContext::Event event, void* data) override; void OnPicaBreakPointHit(Pica::DebugContext::Event event, void* data) override;
void OnPicaResume() override; void OnPicaResume() override;
private slots:
virtual void OnBreakPointHit(Pica::DebugContext::Event event, void* data) = 0;
virtual void OnResumed() = 0;
signals: signals:
void Resumed(); void Resumed();
void BreakPointHit(Pica::DebugContext::Event event, void* data); void BreakPointHit(Pica::DebugContext::Event event, void* data);
private:
virtual void OnBreakPointHit(Pica::DebugContext::Event event, void* data) = 0;
virtual void OnResumed() = 0;
}; };

View file

@ -26,18 +26,17 @@ public:
void OnPicaBreakPointHit(Pica::DebugContext::Event event, void* data) override; void OnPicaBreakPointHit(Pica::DebugContext::Event event, void* data) override;
void OnPicaResume() override; void OnPicaResume() override;
public slots:
void OnBreakPointHit(Pica::DebugContext::Event event, void* data);
void OnItemDoubleClicked(const QModelIndex&);
void OnResumeRequested();
void OnResumed();
signals: signals:
void Resumed(); void Resumed();
void BreakPointHit(Pica::DebugContext::Event event, void* data); void BreakPointHit(Pica::DebugContext::Event event, void* data);
void BreakPointsChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight); void BreakPointsChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);
private: private:
void OnBreakPointHit(Pica::DebugContext::Event event, void* data);
void OnItemDoubleClicked(const QModelIndex&);
void OnResumeRequested();
void OnResumed();
QLabel* status_text; QLabel* status_text;
QPushButton* resume_button; QPushButton* resume_button;

View file

@ -25,7 +25,6 @@ public:
bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override; bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override;
public slots:
void OnBreakPointHit(Pica::DebugContext::Event event); void OnBreakPointHit(Pica::DebugContext::Event event);
void OnResumed(); void OnResumed();

View file

@ -86,16 +86,15 @@ public slots:
void OnSurfacePickerYChanged(int new_value); void OnSurfacePickerYChanged(int new_value);
void OnUpdate(); void OnUpdate();
private slots: signals:
void Update();
private:
void OnBreakPointHit(Pica::DebugContext::Event event, void* data) override; void OnBreakPointHit(Pica::DebugContext::Event event, void* data) override;
void OnResumed() override; void OnResumed() override;
void SaveSurface(); void SaveSurface();
signals:
void Update();
private:
QComboBox* surface_source_list; QComboBox* surface_source_list;
CSpinBox* surface_address_control; CSpinBox* surface_address_control;
QSpinBox* surface_width_control; QSpinBox* surface_width_control;