mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-01 16:05:07 +01:00
Merge pull request #4130 from FearlessTobi/port-942
Port #942 from yuzu: "qt: Minor cleanup-related changes"
This commit is contained in:
commit
05118a2326
@ -17,6 +17,4 @@ AboutDialog::AboutDialog(QWidget* parent)
|
||||
Common::g_scm_desc, QString(Common::g_build_date).left(10)));
|
||||
}
|
||||
|
||||
AboutDialog::~AboutDialog() {
|
||||
delete ui;
|
||||
}
|
||||
AboutDialog::~AboutDialog() = default;
|
||||
|
@ -2,9 +2,9 @@
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#ifndef ABOUTDIALOG_H
|
||||
#define ABOUTDIALOG_H
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
@ -16,10 +16,8 @@ class AboutDialog : public QDialog {
|
||||
|
||||
public:
|
||||
explicit AboutDialog(QWidget* parent = 0);
|
||||
~AboutDialog();
|
||||
~AboutDialog() override;
|
||||
|
||||
private:
|
||||
Ui::AboutDialog* ui;
|
||||
std::unique_ptr<Ui::AboutDialog> ui;
|
||||
};
|
||||
|
||||
#endif // ABOUTDIALOG_H
|
||||
|
@ -106,7 +106,7 @@ class GRenderWindow : public QWidget, public EmuWindow {
|
||||
|
||||
public:
|
||||
GRenderWindow(QWidget* parent, EmuThread* emu_thread);
|
||||
~GRenderWindow();
|
||||
~GRenderWindow() override;
|
||||
|
||||
// EmuWindow implementation
|
||||
void SwapBuffers() override;
|
||||
|
@ -25,7 +25,7 @@ ConfigureDebug::ConfigureDebug(QWidget* parent) : QWidget(parent), ui(new Ui::Co
|
||||
ui->toggle_cpu_jit->setEnabled(!Core::System::GetInstance().IsPoweredOn());
|
||||
}
|
||||
|
||||
ConfigureDebug::~ConfigureDebug() {}
|
||||
ConfigureDebug::~ConfigureDebug() = default;
|
||||
|
||||
void ConfigureDebug::setConfiguration() {
|
||||
ui->toggle_gdbstub->setChecked(Settings::values.use_gdbstub);
|
||||
|
@ -17,7 +17,7 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, const HotkeyRegistry& registry
|
||||
&ConfigureDialog::onLanguageChanged);
|
||||
}
|
||||
|
||||
ConfigureDialog::~ConfigureDialog() {}
|
||||
ConfigureDialog::~ConfigureDialog() = default;
|
||||
|
||||
void ConfigureDialog::setConfiguration() {}
|
||||
|
||||
|
@ -40,7 +40,7 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent)
|
||||
ui->updateBox->setVisible(UISettings::values.updater_found);
|
||||
}
|
||||
|
||||
ConfigureGeneral::~ConfigureGeneral() {}
|
||||
ConfigureGeneral::~ConfigureGeneral() = default;
|
||||
|
||||
void ConfigureGeneral::setConfiguration() {
|
||||
ui->toggle_check_exit->setChecked(UISettings::values.confirm_before_closing);
|
||||
|
@ -52,7 +52,7 @@ ConfigureGraphics::ConfigureGraphics(QWidget* parent)
|
||||
});
|
||||
}
|
||||
|
||||
ConfigureGraphics::~ConfigureGraphics() {}
|
||||
ConfigureGraphics::~ConfigureGraphics() = default;
|
||||
|
||||
void ConfigureGraphics::setConfiguration() {
|
||||
ui->toggle_hw_renderer->setChecked(Settings::values.use_hw_renderer);
|
||||
|
@ -235,7 +235,7 @@ ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::
|
||||
ConfigureTime();
|
||||
}
|
||||
|
||||
ConfigureSystem::~ConfigureSystem() {}
|
||||
ConfigureSystem::~ConfigureSystem() = default;
|
||||
|
||||
void ConfigureSystem::setConfiguration() {
|
||||
enabled = !Core::System::GetInstance().IsPoweredOn();
|
||||
|
@ -24,7 +24,8 @@
|
||||
|
||||
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
|
||||
|
@ -20,11 +20,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;
|
||||
|
@ -13,7 +13,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);
|
||||
|
@ -27,11 +27,13 @@ class WaitTreeThread;
|
||||
class WaitTreeItem : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
~WaitTreeItem() override;
|
||||
|
||||
virtual bool IsExpandable() const;
|
||||
virtual std::vector<std::unique_ptr<WaitTreeItem>> GetChildren() const;
|
||||
virtual QString GetText() const = 0;
|
||||
virtual QColor GetColor() const;
|
||||
virtual ~WaitTreeItem();
|
||||
|
||||
void Expand();
|
||||
WaitTreeItem* Parent() const;
|
||||
const std::vector<std::unique_ptr<WaitTreeItem>>& Children() const;
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <atomic>
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <QCoreApplication>
|
||||
#include <QFileInfo>
|
||||
#include <QImage>
|
||||
@ -142,11 +143,10 @@ public:
|
||||
// used to access type from item index
|
||||
static const int TypeRole = Qt::UserRole + 1;
|
||||
static const int SortRole = Qt::UserRole + 2;
|
||||
GameListItem() : QStandardItem() {}
|
||||
GameListItem(const QString& string) : QStandardItem(string) {
|
||||
GameListItem() = default;
|
||||
explicit GameListItem(const QString& string) : QStandardItem(string) {
|
||||
setData(string, SortRole);
|
||||
}
|
||||
virtual ~GameListItem() override {}
|
||||
};
|
||||
|
||||
/**
|
||||
@ -161,9 +161,8 @@ public:
|
||||
static const int FullPathRole = SortRole + 1;
|
||||
static const int ProgramIdRole = SortRole + 2;
|
||||
|
||||
GameListItemPath() : GameListItem() {}
|
||||
GameListItemPath(const QString& game_path, const std::vector<u8>& smdh_data, u64 program_id)
|
||||
: GameListItem() {
|
||||
GameListItemPath() = default;
|
||||
GameListItemPath(const QString& game_path, const std::vector<u8>& smdh_data, u64 program_id) {
|
||||
setData(type(), TypeRole);
|
||||
setData(game_path, FullPathRole);
|
||||
setData(qulonglong(program_id), ProgramIdRole);
|
||||
@ -284,8 +283,8 @@ class GameListItemSize : public GameListItem {
|
||||
public:
|
||||
static const int SizeRole = SortRole;
|
||||
|
||||
GameListItemSize() : GameListItem() {}
|
||||
GameListItemSize(const qulonglong size_bytes) : GameListItem() {
|
||||
GameListItemSize() = default;
|
||||
explicit GameListItemSize(const qulonglong size_bytes) {
|
||||
setData(type(), TypeRole);
|
||||
setData(size_bytes, SizeRole);
|
||||
}
|
||||
@ -376,7 +375,7 @@ public:
|
||||
explicit GameListWorker(
|
||||
QList<UISettings::GameDir>& game_dirs,
|
||||
const std::unordered_map<std::string, std::pair<QString, QString>>& compatibility_list)
|
||||
: QObject(), QRunnable(), game_dirs(game_dirs), compatibility_list(compatibility_list) {}
|
||||
: game_dirs(game_dirs), compatibility_list(compatibility_list) {}
|
||||
|
||||
public slots:
|
||||
/// Starts the processing of directory tree information.
|
||||
|
Loading…
Reference in New Issue
Block a user