From 00a68c5eea17db975446c499a6dbf84311441f04 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 6 Aug 2018 12:58:46 -0400 Subject: qt: Default destructors where applicable Makes code consistent with our style of defaulting special member functions where applicable. --- src/yuzu/debugger/graphics/graphics_surface.cpp | 3 ++- src/yuzu/debugger/wait_tree.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/yuzu/debugger') diff --git a/src/yuzu/debugger/graphics/graphics_surface.cpp b/src/yuzu/debugger/graphics/graphics_surface.cpp index ff3efcdaa..3f7103ab9 100644 --- a/src/yuzu/debugger/graphics/graphics_surface.cpp +++ b/src/yuzu/debugger/graphics/graphics_surface.cpp @@ -34,7 +34,8 @@ static Tegra::Texture::TextureFormat ConvertToTextureFormat( SurfacePicture::SurfacePicture(QWidget* parent, GraphicsSurfaceWidget* surface_widget_) : QLabel(parent), surface_widget(surface_widget_) {} -SurfacePicture::~SurfacePicture() {} + +SurfacePicture::~SurfacePicture() = default; void SurfacePicture::mousePressEvent(QMouseEvent* event) { // Only do something while the left mouse button is held down diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp index f5a5697a0..3b23d0bbe 100644 --- a/src/yuzu/debugger/wait_tree.cpp +++ b/src/yuzu/debugger/wait_tree.cpp @@ -14,7 +14,7 @@ #include "core/hle/kernel/timer.h" #include "core/hle/kernel/wait_object.h" -WaitTreeItem::~WaitTreeItem() {} +WaitTreeItem::~WaitTreeItem() = default; QColor WaitTreeItem::GetColor() const { return QColor(Qt::GlobalColor::black); -- cgit v1.2.3 From 7846295a8f5c74cecdebc467e902406fe7179547 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 6 Aug 2018 13:12:32 -0400 Subject: qt: Add missing override specifiers where applicable --- src/yuzu/debugger/graphics/graphics_surface.h | 6 +++--- src/yuzu/debugger/wait_tree.h | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/yuzu/debugger') diff --git a/src/yuzu/debugger/graphics/graphics_surface.h b/src/yuzu/debugger/graphics/graphics_surface.h index 58f9db465..323e39d94 100644 --- a/src/yuzu/debugger/graphics/graphics_surface.h +++ b/src/yuzu/debugger/graphics/graphics_surface.h @@ -22,11 +22,11 @@ class SurfacePicture : public QLabel { public: explicit SurfacePicture(QWidget* parent = nullptr, GraphicsSurfaceWidget* surface_widget = nullptr); - ~SurfacePicture(); + ~SurfacePicture() override; protected slots: - virtual void mouseMoveEvent(QMouseEvent* event); - virtual void mousePressEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event) override; + void mousePressEvent(QMouseEvent* event) override; private: GraphicsSurfaceWidget* surface_widget; diff --git a/src/yuzu/debugger/wait_tree.h b/src/yuzu/debugger/wait_tree.h index 6cbce6856..513b3c45d 100644 --- a/src/yuzu/debugger/wait_tree.h +++ b/src/yuzu/debugger/wait_tree.h @@ -25,11 +25,13 @@ class WaitTreeThread; class WaitTreeItem : public QObject { Q_OBJECT public: + ~WaitTreeItem() override; + virtual bool IsExpandable() const; virtual std::vector> GetChildren() const; virtual QString GetText() const = 0; virtual QColor GetColor() const; - virtual ~WaitTreeItem(); + void Expand(); WaitTreeItem* Parent() const; const std::vector>& Children() const; -- cgit v1.2.3