Merge pull request #942 from lioncash/default
qt: Minor cleanup-related changes
This commit is contained in:
commit
168958f8e2
14 changed files with 26 additions and 24 deletions
|
@ -15,4 +15,4 @@ AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AboutDia
|
||||||
Common::g_scm_desc, QString(Common::g_build_date).left(10)));
|
Common::g_scm_desc, QString(Common::g_build_date).left(10)));
|
||||||
}
|
}
|
||||||
|
|
||||||
AboutDialog::~AboutDialog() {}
|
AboutDialog::~AboutDialog() = default;
|
||||||
|
|
|
@ -16,7 +16,7 @@ class AboutDialog : public QDialog {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit AboutDialog(QWidget* parent);
|
explicit AboutDialog(QWidget* parent);
|
||||||
~AboutDialog();
|
~AboutDialog() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<Ui::AboutDialog> ui;
|
std::unique_ptr<Ui::AboutDialog> ui;
|
||||||
|
|
|
@ -106,7 +106,7 @@ class GRenderWindow : public QWidget, public EmuWindow {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GRenderWindow(QWidget* parent, EmuThread* emu_thread);
|
GRenderWindow(QWidget* parent, EmuThread* emu_thread);
|
||||||
~GRenderWindow();
|
~GRenderWindow() override;
|
||||||
|
|
||||||
// EmuWindow implementation
|
// EmuWindow implementation
|
||||||
void SwapBuffers() override;
|
void SwapBuffers() override;
|
||||||
|
|
|
@ -24,7 +24,7 @@ ConfigureDebug::ConfigureDebug(QWidget* parent) : QWidget(parent), ui(new Ui::Co
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigureDebug::~ConfigureDebug() {}
|
ConfigureDebug::~ConfigureDebug() = default;
|
||||||
|
|
||||||
void ConfigureDebug::setConfiguration() {
|
void ConfigureDebug::setConfiguration() {
|
||||||
ui->toggle_gdbstub->setChecked(Settings::values.use_gdbstub);
|
ui->toggle_gdbstub->setChecked(Settings::values.use_gdbstub);
|
||||||
|
|
|
@ -12,7 +12,7 @@ ConfigureDialog::ConfigureDialog(QWidget* parent) : QDialog(parent), ui(new Ui::
|
||||||
this->setConfiguration();
|
this->setConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigureDialog::~ConfigureDialog() {}
|
ConfigureDialog::~ConfigureDialog() = default;
|
||||||
|
|
||||||
void ConfigureDialog::setConfiguration() {}
|
void ConfigureDialog::setConfiguration() {}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent)
|
||||||
ui->use_docked_mode->setEnabled(!Core::System::GetInstance().IsPoweredOn());
|
ui->use_docked_mode->setEnabled(!Core::System::GetInstance().IsPoweredOn());
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigureGeneral::~ConfigureGeneral() {}
|
ConfigureGeneral::~ConfigureGeneral() = default;
|
||||||
|
|
||||||
void ConfigureGeneral::setConfiguration() {
|
void ConfigureGeneral::setConfiguration() {
|
||||||
ui->toggle_deepscan->setChecked(UISettings::values.gamedir_deepscan);
|
ui->toggle_deepscan->setChecked(UISettings::values.gamedir_deepscan);
|
||||||
|
|
|
@ -14,7 +14,7 @@ ConfigureGraphics::ConfigureGraphics(QWidget* parent)
|
||||||
this->setConfiguration();
|
this->setConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigureGraphics::~ConfigureGraphics() {}
|
ConfigureGraphics::~ConfigureGraphics() = default;
|
||||||
|
|
||||||
enum class Resolution : int {
|
enum class Resolution : int {
|
||||||
Auto,
|
Auto,
|
||||||
|
|
|
@ -35,7 +35,7 @@ ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::
|
||||||
this->setConfiguration();
|
this->setConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigureSystem::~ConfigureSystem() {}
|
ConfigureSystem::~ConfigureSystem() = default;
|
||||||
|
|
||||||
void ConfigureSystem::setConfiguration() {
|
void ConfigureSystem::setConfiguration() {
|
||||||
enabled = !Core::System::GetInstance().IsPoweredOn();
|
enabled = !Core::System::GetInstance().IsPoweredOn();
|
||||||
|
|
|
@ -34,7 +34,8 @@ static Tegra::Texture::TextureFormat ConvertToTextureFormat(
|
||||||
|
|
||||||
SurfacePicture::SurfacePicture(QWidget* parent, GraphicsSurfaceWidget* surface_widget_)
|
SurfacePicture::SurfacePicture(QWidget* parent, GraphicsSurfaceWidget* surface_widget_)
|
||||||
: QLabel(parent), surface_widget(surface_widget_) {}
|
: QLabel(parent), surface_widget(surface_widget_) {}
|
||||||
SurfacePicture::~SurfacePicture() {}
|
|
||||||
|
SurfacePicture::~SurfacePicture() = default;
|
||||||
|
|
||||||
void SurfacePicture::mousePressEvent(QMouseEvent* event) {
|
void SurfacePicture::mousePressEvent(QMouseEvent* event) {
|
||||||
// Only do something while the left mouse button is held down
|
// Only do something while the left mouse button is held down
|
||||||
|
|
|
@ -22,11 +22,11 @@ class SurfacePicture : public QLabel {
|
||||||
public:
|
public:
|
||||||
explicit SurfacePicture(QWidget* parent = nullptr,
|
explicit SurfacePicture(QWidget* parent = nullptr,
|
||||||
GraphicsSurfaceWidget* surface_widget = nullptr);
|
GraphicsSurfaceWidget* surface_widget = nullptr);
|
||||||
~SurfacePicture();
|
~SurfacePicture() override;
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
virtual void mouseMoveEvent(QMouseEvent* event);
|
void mouseMoveEvent(QMouseEvent* event) override;
|
||||||
virtual void mousePressEvent(QMouseEvent* event);
|
void mousePressEvent(QMouseEvent* event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GraphicsSurfaceWidget* surface_widget;
|
GraphicsSurfaceWidget* surface_widget;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include "core/hle/kernel/timer.h"
|
#include "core/hle/kernel/timer.h"
|
||||||
#include "core/hle/kernel/wait_object.h"
|
#include "core/hle/kernel/wait_object.h"
|
||||||
|
|
||||||
WaitTreeItem::~WaitTreeItem() {}
|
WaitTreeItem::~WaitTreeItem() = default;
|
||||||
|
|
||||||
QColor WaitTreeItem::GetColor() const {
|
QColor WaitTreeItem::GetColor() const {
|
||||||
return QColor(Qt::GlobalColor::black);
|
return QColor(Qt::GlobalColor::black);
|
||||||
|
|
|
@ -25,11 +25,13 @@ class WaitTreeThread;
|
||||||
class WaitTreeItem : public QObject {
|
class WaitTreeItem : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
~WaitTreeItem() override;
|
||||||
|
|
||||||
virtual bool IsExpandable() const;
|
virtual bool IsExpandable() const;
|
||||||
virtual std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const;
|
virtual std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const;
|
||||||
virtual QString GetText() const = 0;
|
virtual QString GetText() const = 0;
|
||||||
virtual QColor GetColor() const;
|
virtual QColor GetColor() const;
|
||||||
virtual ~WaitTreeItem();
|
|
||||||
void Expand();
|
void Expand();
|
||||||
WaitTreeItem* Parent() const;
|
WaitTreeItem* Parent() const;
|
||||||
const std::vector<std::unique_ptr<WaitTreeItem>>& Children() const;
|
const std::vector<std::unique_ptr<WaitTreeItem>>& Children() const;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
#include <utility>
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
#include <QRunnable>
|
#include <QRunnable>
|
||||||
#include <QStandardItem>
|
#include <QStandardItem>
|
||||||
|
@ -27,9 +28,8 @@ static QPixmap GetDefaultIcon(bool large) {
|
||||||
class GameListItem : public QStandardItem {
|
class GameListItem : public QStandardItem {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GameListItem() : QStandardItem() {}
|
GameListItem() = default;
|
||||||
GameListItem(const QString& string) : QStandardItem(string) {}
|
explicit GameListItem(const QString& string) : QStandardItem(string) {}
|
||||||
virtual ~GameListItem() override {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,9 +45,8 @@ public:
|
||||||
static const int TitleRole = Qt::UserRole + 2;
|
static const int TitleRole = Qt::UserRole + 2;
|
||||||
static const int ProgramIdRole = Qt::UserRole + 3;
|
static const int ProgramIdRole = Qt::UserRole + 3;
|
||||||
|
|
||||||
GameListItemPath() : GameListItem() {}
|
GameListItemPath() = default;
|
||||||
GameListItemPath(const QString& game_path, const std::vector<u8>& smdh_data, u64 program_id)
|
GameListItemPath(const QString& game_path, const std::vector<u8>& smdh_data, u64 program_id) {
|
||||||
: GameListItem() {
|
|
||||||
setData(game_path, FullPathRole);
|
setData(game_path, FullPathRole);
|
||||||
setData(qulonglong(program_id), ProgramIdRole);
|
setData(qulonglong(program_id), ProgramIdRole);
|
||||||
}
|
}
|
||||||
|
@ -75,8 +74,8 @@ class GameListItemSize : public GameListItem {
|
||||||
public:
|
public:
|
||||||
static const int SizeRole = Qt::UserRole + 1;
|
static const int SizeRole = Qt::UserRole + 1;
|
||||||
|
|
||||||
GameListItemSize() : GameListItem() {}
|
GameListItemSize() = default;
|
||||||
GameListItemSize(const qulonglong size_bytes) : GameListItem() {
|
explicit GameListItemSize(const qulonglong size_bytes) {
|
||||||
setData(size_bytes, SizeRole);
|
setData(size_bytes, SizeRole);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,7 +110,7 @@ class GameListWorker : public QObject, public QRunnable {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GameListWorker(QString dir_path, bool deep_scan)
|
GameListWorker(QString dir_path, bool deep_scan)
|
||||||
: QObject(), QRunnable(), dir_path(dir_path), deep_scan(deep_scan) {}
|
: dir_path(std::move(dir_path)), deep_scan(deep_scan) {}
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
/// Starts the processing of directory tree information.
|
/// Starts the processing of directory tree information.
|
||||||
|
|
|
@ -43,7 +43,7 @@ public:
|
||||||
void filterBarSetChecked(bool state);
|
void filterBarSetChecked(bool state);
|
||||||
void UpdateUITheme();
|
void UpdateUITheme();
|
||||||
GMainWindow();
|
GMainWindow();
|
||||||
~GMainWindow();
|
~GMainWindow() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue