summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2022-11-16 01:25:09 +0100
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2022-11-16 01:25:09 +0100
commite94bcf03cb20d65b6bda65fccb3f259783c8ff86 (patch)
tree1454f82a8648a81b3d70267fb1985947db975724
parentconfigure_profile_manager: Remove profile picture border (diff)
downloadyuzu-e94bcf03cb20d65b6bda65fccb3f259783c8ff86.tar
yuzu-e94bcf03cb20d65b6bda65fccb3f259783c8ff86.tar.gz
yuzu-e94bcf03cb20d65b6bda65fccb3f259783c8ff86.tar.bz2
yuzu-e94bcf03cb20d65b6bda65fccb3f259783c8ff86.tar.lz
yuzu-e94bcf03cb20d65b6bda65fccb3f259783c8ff86.tar.xz
yuzu-e94bcf03cb20d65b6bda65fccb3f259783c8ff86.tar.zst
yuzu-e94bcf03cb20d65b6bda65fccb3f259783c8ff86.zip
-rw-r--r--src/yuzu/configuration/configure_profile_manager.cpp8
-rw-r--r--src/yuzu/configuration/configure_profile_manager.h10
2 files changed, 10 insertions, 8 deletions
diff --git a/src/yuzu/configuration/configure_profile_manager.cpp b/src/yuzu/configuration/configure_profile_manager.cpp
index 9493cb82e..a47089988 100644
--- a/src/yuzu/configuration/configure_profile_manager.cpp
+++ b/src/yuzu/configuration/configure_profile_manager.cpp
@@ -115,7 +115,7 @@ ConfigureProfileManager::ConfigureProfileManager(const Core::System& system_, QW
&ConfigureProfileManager::ConfirmDeleteUser);
connect(ui->pm_set_image, &QPushButton::clicked, this, &ConfigureProfileManager::SetUserImage);
- confirm_dialog = std::make_unique<ConfigureProfileManagerDeleteDialog>(this);
+ confirm_dialog = new ConfigureProfileManagerDeleteDialog(this);
scene = new QGraphicsScene;
ui->current_user_icon->setScene(scene);
@@ -246,7 +246,7 @@ void ConfigureProfileManager::ConfirmDeleteUser() {
confirm_dialog->show();
}
-void ConfigureProfileManager::DeleteUser(const Common::UUID uuid) {
+void ConfigureProfileManager::DeleteUser(const Common::UUID& uuid) {
if (Settings::values.current_user.GetValue() == tree_view->currentIndex().row()) {
Settings::values.current_user = 0;
}
@@ -324,7 +324,7 @@ void ConfigureProfileManager::SetUserImage() {
}
ConfigureProfileManagerDeleteDialog::ConfigureProfileManagerDeleteDialog(QWidget* parent)
- : QDialog(parent) {
+ : QDialog{parent} {
auto dialog_vbox_layout = new QVBoxLayout(this);
dialog_button_box =
new QDialogButtonBox(QDialogButtonBox::Yes | QDialogButtonBox::No, Qt::Horizontal, parent);
@@ -354,7 +354,7 @@ ConfigureProfileManagerDeleteDialog::ConfigureProfileManagerDeleteDialog(QWidget
ConfigureProfileManagerDeleteDialog::~ConfigureProfileManagerDeleteDialog() = default;
-void ConfigureProfileManagerDeleteDialog::SetInfo(const QString username, const Common::UUID uuid,
+void ConfigureProfileManagerDeleteDialog::SetInfo(const QString& username, const Common::UUID& uuid,
std::function<void()> accept_callback) {
label_info->setText(
tr("Name: %1\nUUID: %2").arg(username, QString::fromStdString(uuid.FormattedString())));
diff --git a/src/yuzu/configuration/configure_profile_manager.h b/src/yuzu/configuration/configure_profile_manager.h
index 6e5cb748d..c4b1a334e 100644
--- a/src/yuzu/configuration/configure_profile_manager.h
+++ b/src/yuzu/configuration/configure_profile_manager.h
@@ -10,7 +10,9 @@
#include <QList>
#include <QWidget>
-#include "common/uuid.h"
+namespace Common {
+struct UUID;
+}
namespace Core {
class System;
@@ -37,7 +39,7 @@ public:
explicit ConfigureProfileManagerDeleteDialog(QWidget* parent);
~ConfigureProfileManagerDeleteDialog();
- void SetInfo(const QString username, const Common::UUID uuid,
+ void SetInfo(const QString& username, const Common::UUID& uuid,
std::function<void()> accept_callback);
private:
@@ -68,7 +70,7 @@ private:
void AddUser();
void RenameUser();
void ConfirmDeleteUser();
- void DeleteUser(const Common::UUID uuid);
+ void DeleteUser(const Common::UUID& uuid);
void SetUserImage();
QVBoxLayout* layout;
@@ -76,7 +78,7 @@ private:
QStandardItemModel* item_model;
QGraphicsScene* scene;
- std::unique_ptr<ConfigureProfileManagerDeleteDialog> confirm_dialog;
+ ConfigureProfileManagerDeleteDialog* confirm_dialog;
std::vector<QList<QStandardItem*>> list_items;