diff options
| author | 2018-08-06 21:32:25 -0400 | |
|---|---|---|
| committer | 2018-08-06 21:32:25 -0400 | |
| commit | 168958f8e20d2e3f8652b5e7dc7f58b650c683c5 (patch) | |
| tree | d4d37e6d25ddcf8f5e4980f392a601b78b78d684 /src | |
| parent | Merge pull request #940 from lioncash/private (diff) | |
| parent | qt/game_list_p: Remove redundant base class constructor invocations (diff) | |
| download | yuzu-168958f8e20d2e3f8652b5e7dc7f58b650c683c5.tar.gz yuzu-168958f8e20d2e3f8652b5e7dc7f58b650c683c5.tar.xz yuzu-168958f8e20d2e3f8652b5e7dc7f58b650c683c5.zip | |
Merge pull request #942 from lioncash/default
qt: Minor cleanup-related changes
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/about_dialog.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/about_dialog.h | 2 | ||||
| -rw-r--r-- | src/yuzu/bootmanager.h | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_debug.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_dialog.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_general.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_graphics.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_system.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/debugger/graphics/graphics_surface.cpp | 3 | ||||
| -rw-r--r-- | src/yuzu/debugger/graphics/graphics_surface.h | 6 | ||||
| -rw-r--r-- | src/yuzu/debugger/wait_tree.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/debugger/wait_tree.h | 4 | ||||
| -rw-r--r-- | src/yuzu/game_list_p.h | 17 | ||||
| -rw-r--r-- | src/yuzu/main.h | 2 |
14 files changed, 26 insertions, 24 deletions
diff --git a/src/yuzu/about_dialog.cpp b/src/yuzu/about_dialog.cpp index 39ed3bccf..a81ad2888 100644 --- a/src/yuzu/about_dialog.cpp +++ b/src/yuzu/about_dialog.cpp | |||
| @@ -15,4 +15,4 @@ AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AboutDia | |||
| 15 | Common::g_scm_desc, QString(Common::g_build_date).left(10))); | 15 | Common::g_scm_desc, QString(Common::g_build_date).left(10))); |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | AboutDialog::~AboutDialog() {} | 18 | AboutDialog::~AboutDialog() = default; |
diff --git a/src/yuzu/about_dialog.h b/src/yuzu/about_dialog.h index 2eb6e28f5..18e8c11a7 100644 --- a/src/yuzu/about_dialog.h +++ b/src/yuzu/about_dialog.h | |||
| @@ -16,7 +16,7 @@ class AboutDialog : public QDialog { | |||
| 16 | 16 | ||
| 17 | public: | 17 | public: |
| 18 | explicit AboutDialog(QWidget* parent); | 18 | explicit AboutDialog(QWidget* parent); |
| 19 | ~AboutDialog(); | 19 | ~AboutDialog() override; |
| 20 | 20 | ||
| 21 | private: | 21 | private: |
| 22 | std::unique_ptr<Ui::AboutDialog> ui; | 22 | std::unique_ptr<Ui::AboutDialog> ui; |
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h index 130bc613b..d0f990c64 100644 --- a/src/yuzu/bootmanager.h +++ b/src/yuzu/bootmanager.h | |||
| @@ -106,7 +106,7 @@ class GRenderWindow : public QWidget, public EmuWindow { | |||
| 106 | 106 | ||
| 107 | public: | 107 | public: |
| 108 | GRenderWindow(QWidget* parent, EmuThread* emu_thread); | 108 | GRenderWindow(QWidget* parent, EmuThread* emu_thread); |
| 109 | ~GRenderWindow(); | 109 | ~GRenderWindow() override; |
| 110 | 110 | ||
| 111 | // EmuWindow implementation | 111 | // EmuWindow implementation |
| 112 | void SwapBuffers() override; | 112 | void SwapBuffers() override; |
diff --git a/src/yuzu/configuration/configure_debug.cpp b/src/yuzu/configuration/configure_debug.cpp index 7fd07539a..45d84f19a 100644 --- a/src/yuzu/configuration/configure_debug.cpp +++ b/src/yuzu/configuration/configure_debug.cpp | |||
| @@ -24,7 +24,7 @@ ConfigureDebug::ConfigureDebug(QWidget* parent) : QWidget(parent), ui(new Ui::Co | |||
| 24 | }); | 24 | }); |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | ConfigureDebug::~ConfigureDebug() {} | 27 | ConfigureDebug::~ConfigureDebug() = default; |
| 28 | 28 | ||
| 29 | void ConfigureDebug::setConfiguration() { | 29 | void ConfigureDebug::setConfiguration() { |
| 30 | ui->toggle_gdbstub->setChecked(Settings::values.use_gdbstub); | 30 | ui->toggle_gdbstub->setChecked(Settings::values.use_gdbstub); |
diff --git a/src/yuzu/configuration/configure_dialog.cpp b/src/yuzu/configuration/configure_dialog.cpp index f66abf870..1ca7e876c 100644 --- a/src/yuzu/configuration/configure_dialog.cpp +++ b/src/yuzu/configuration/configure_dialog.cpp | |||
| @@ -12,7 +12,7 @@ ConfigureDialog::ConfigureDialog(QWidget* parent) : QDialog(parent), ui(new Ui:: | |||
| 12 | this->setConfiguration(); | 12 | this->setConfiguration(); |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | ConfigureDialog::~ConfigureDialog() {} | 15 | ConfigureDialog::~ConfigureDialog() = default; |
| 16 | 16 | ||
| 17 | void ConfigureDialog::setConfiguration() {} | 17 | void ConfigureDialog::setConfiguration() {} |
| 18 | 18 | ||
diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp index cb7d3f8bf..04afc8724 100644 --- a/src/yuzu/configuration/configure_general.cpp +++ b/src/yuzu/configuration/configure_general.cpp | |||
| @@ -24,7 +24,7 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent) | |||
| 24 | ui->use_docked_mode->setEnabled(!Core::System::GetInstance().IsPoweredOn()); | 24 | ui->use_docked_mode->setEnabled(!Core::System::GetInstance().IsPoweredOn()); |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | ConfigureGeneral::~ConfigureGeneral() {} | 27 | ConfigureGeneral::~ConfigureGeneral() = default; |
| 28 | 28 | ||
| 29 | void ConfigureGeneral::setConfiguration() { | 29 | void ConfigureGeneral::setConfiguration() { |
| 30 | ui->toggle_deepscan->setChecked(UISettings::values.gamedir_deepscan); | 30 | ui->toggle_deepscan->setChecked(UISettings::values.gamedir_deepscan); |
diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp index 3379b7963..4afe0f81b 100644 --- a/src/yuzu/configuration/configure_graphics.cpp +++ b/src/yuzu/configuration/configure_graphics.cpp | |||
| @@ -14,7 +14,7 @@ ConfigureGraphics::ConfigureGraphics(QWidget* parent) | |||
| 14 | this->setConfiguration(); | 14 | this->setConfiguration(); |
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | ConfigureGraphics::~ConfigureGraphics() {} | 17 | ConfigureGraphics::~ConfigureGraphics() = default; |
| 18 | 18 | ||
| 19 | enum class Resolution : int { | 19 | enum class Resolution : int { |
| 20 | Auto, | 20 | Auto, |
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp index 9be2c939c..e9ed9c38f 100644 --- a/src/yuzu/configuration/configure_system.cpp +++ b/src/yuzu/configuration/configure_system.cpp | |||
| @@ -35,7 +35,7 @@ ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui:: | |||
| 35 | this->setConfiguration(); | 35 | this->setConfiguration(); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | ConfigureSystem::~ConfigureSystem() {} | 38 | ConfigureSystem::~ConfigureSystem() = default; |
| 39 | 39 | ||
| 40 | void ConfigureSystem::setConfiguration() { | 40 | void ConfigureSystem::setConfiguration() { |
| 41 | enabled = !Core::System::GetInstance().IsPoweredOn(); | 41 | enabled = !Core::System::GetInstance().IsPoweredOn(); |
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( | |||
| 34 | 34 | ||
| 35 | SurfacePicture::SurfacePicture(QWidget* parent, GraphicsSurfaceWidget* surface_widget_) | 35 | SurfacePicture::SurfacePicture(QWidget* parent, GraphicsSurfaceWidget* surface_widget_) |
| 36 | : QLabel(parent), surface_widget(surface_widget_) {} | 36 | : QLabel(parent), surface_widget(surface_widget_) {} |
| 37 | SurfacePicture::~SurfacePicture() {} | 37 | |
| 38 | SurfacePicture::~SurfacePicture() = default; | ||
| 38 | 39 | ||
| 39 | void SurfacePicture::mousePressEvent(QMouseEvent* event) { | 40 | void SurfacePicture::mousePressEvent(QMouseEvent* event) { |
| 40 | // Only do something while the left mouse button is held down | 41 | // Only do something while the left mouse button is held down |
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 { | |||
| 22 | public: | 22 | public: |
| 23 | explicit SurfacePicture(QWidget* parent = nullptr, | 23 | explicit SurfacePicture(QWidget* parent = nullptr, |
| 24 | GraphicsSurfaceWidget* surface_widget = nullptr); | 24 | GraphicsSurfaceWidget* surface_widget = nullptr); |
| 25 | ~SurfacePicture(); | 25 | ~SurfacePicture() override; |
| 26 | 26 | ||
| 27 | protected slots: | 27 | protected slots: |
| 28 | virtual void mouseMoveEvent(QMouseEvent* event); | 28 | void mouseMoveEvent(QMouseEvent* event) override; |
| 29 | virtual void mousePressEvent(QMouseEvent* event); | 29 | void mousePressEvent(QMouseEvent* event) override; |
| 30 | 30 | ||
| 31 | private: | 31 | private: |
| 32 | GraphicsSurfaceWidget* surface_widget; | 32 | GraphicsSurfaceWidget* surface_widget; |
diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp index 2acfdb8a9..d0926d723 100644 --- a/src/yuzu/debugger/wait_tree.cpp +++ b/src/yuzu/debugger/wait_tree.cpp | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | #include "core/hle/kernel/timer.h" | 14 | #include "core/hle/kernel/timer.h" |
| 15 | #include "core/hle/kernel/wait_object.h" | 15 | #include "core/hle/kernel/wait_object.h" |
| 16 | 16 | ||
| 17 | WaitTreeItem::~WaitTreeItem() {} | 17 | WaitTreeItem::~WaitTreeItem() = default; |
| 18 | 18 | ||
| 19 | QColor WaitTreeItem::GetColor() const { | 19 | QColor WaitTreeItem::GetColor() const { |
| 20 | return QColor(Qt::GlobalColor::black); | 20 | return QColor(Qt::GlobalColor::black); |
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; | |||
| 25 | class WaitTreeItem : public QObject { | 25 | class WaitTreeItem : public QObject { |
| 26 | Q_OBJECT | 26 | Q_OBJECT |
| 27 | public: | 27 | public: |
| 28 | ~WaitTreeItem() override; | ||
| 29 | |||
| 28 | virtual bool IsExpandable() const; | 30 | virtual bool IsExpandable() const; |
| 29 | virtual std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const; | 31 | virtual std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const; |
| 30 | virtual QString GetText() const = 0; | 32 | virtual QString GetText() const = 0; |
| 31 | virtual QColor GetColor() const; | 33 | virtual QColor GetColor() const; |
| 32 | virtual ~WaitTreeItem(); | 34 | |
| 33 | void Expand(); | 35 | void Expand(); |
| 34 | WaitTreeItem* Parent() const; | 36 | WaitTreeItem* Parent() const; |
| 35 | const std::vector<std::unique_ptr<WaitTreeItem>>& Children() const; | 37 | const std::vector<std::unique_ptr<WaitTreeItem>>& Children() const; |
diff --git a/src/yuzu/game_list_p.h b/src/yuzu/game_list_p.h index a758b77aa..aa69a098f 100644 --- a/src/yuzu/game_list_p.h +++ b/src/yuzu/game_list_p.h | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <atomic> | 7 | #include <atomic> |
| 8 | #include <utility> | ||
| 8 | #include <QImage> | 9 | #include <QImage> |
| 9 | #include <QRunnable> | 10 | #include <QRunnable> |
| 10 | #include <QStandardItem> | 11 | #include <QStandardItem> |
| @@ -27,9 +28,8 @@ static QPixmap GetDefaultIcon(bool large) { | |||
| 27 | class GameListItem : public QStandardItem { | 28 | class GameListItem : public QStandardItem { |
| 28 | 29 | ||
| 29 | public: | 30 | public: |
| 30 | GameListItem() : QStandardItem() {} | 31 | GameListItem() = default; |
| 31 | GameListItem(const QString& string) : QStandardItem(string) {} | 32 | explicit GameListItem(const QString& string) : QStandardItem(string) {} |
| 32 | virtual ~GameListItem() override {} | ||
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | /** | 35 | /** |
| @@ -45,9 +45,8 @@ public: | |||
| 45 | static const int TitleRole = Qt::UserRole + 2; | 45 | static const int TitleRole = Qt::UserRole + 2; |
| 46 | static const int ProgramIdRole = Qt::UserRole + 3; | 46 | static const int ProgramIdRole = Qt::UserRole + 3; |
| 47 | 47 | ||
| 48 | GameListItemPath() : GameListItem() {} | 48 | GameListItemPath() = default; |
| 49 | GameListItemPath(const QString& game_path, const std::vector<u8>& smdh_data, u64 program_id) | 49 | GameListItemPath(const QString& game_path, const std::vector<u8>& smdh_data, u64 program_id) { |
| 50 | : GameListItem() { | ||
| 51 | setData(game_path, FullPathRole); | 50 | setData(game_path, FullPathRole); |
| 52 | setData(qulonglong(program_id), ProgramIdRole); | 51 | setData(qulonglong(program_id), ProgramIdRole); |
| 53 | } | 52 | } |
| @@ -75,8 +74,8 @@ class GameListItemSize : public GameListItem { | |||
| 75 | public: | 74 | public: |
| 76 | static const int SizeRole = Qt::UserRole + 1; | 75 | static const int SizeRole = Qt::UserRole + 1; |
| 77 | 76 | ||
| 78 | GameListItemSize() : GameListItem() {} | 77 | GameListItemSize() = default; |
| 79 | GameListItemSize(const qulonglong size_bytes) : GameListItem() { | 78 | explicit GameListItemSize(const qulonglong size_bytes) { |
| 80 | setData(size_bytes, SizeRole); | 79 | setData(size_bytes, SizeRole); |
| 81 | } | 80 | } |
| 82 | 81 | ||
| @@ -111,7 +110,7 @@ class GameListWorker : public QObject, public QRunnable { | |||
| 111 | 110 | ||
| 112 | public: | 111 | public: |
| 113 | GameListWorker(QString dir_path, bool deep_scan) | 112 | GameListWorker(QString dir_path, bool deep_scan) |
| 114 | : QObject(), QRunnable(), dir_path(dir_path), deep_scan(deep_scan) {} | 113 | : dir_path(std::move(dir_path)), deep_scan(deep_scan) {} |
| 115 | 114 | ||
| 116 | public slots: | 115 | public slots: |
| 117 | /// Starts the processing of directory tree information. | 116 | /// Starts the processing of directory tree information. |
diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 074bba3f9..a60d831b9 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h | |||
| @@ -43,7 +43,7 @@ public: | |||
| 43 | void filterBarSetChecked(bool state); | 43 | void filterBarSetChecked(bool state); |
| 44 | void UpdateUITheme(); | 44 | void UpdateUITheme(); |
| 45 | GMainWindow(); | 45 | GMainWindow(); |
| 46 | ~GMainWindow(); | 46 | ~GMainWindow() override; |
| 47 | 47 | ||
| 48 | signals: | 48 | signals: |
| 49 | 49 | ||