summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-10-24 15:25:13 +0200
committerZach Hilman <zachhilman@gmail.com>2018-10-24 15:25:20 +0200
commite7ac42677be6c13e5286fb42004aa94b0da45391 (patch)
tree91982bf07856c1de33d99f7187665b5c481be04f
parentprofile_manager: Create save data if it doesn't exist on use (diff)
downloadyuzu-e7ac42677be6c13e5286fb42004aa94b0da45391.tar
yuzu-e7ac42677be6c13e5286fb42004aa94b0da45391.tar.gz
yuzu-e7ac42677be6c13e5286fb42004aa94b0da45391.tar.bz2
yuzu-e7ac42677be6c13e5286fb42004aa94b0da45391.tar.lz
yuzu-e7ac42677be6c13e5286fb42004aa94b0da45391.tar.xz
yuzu-e7ac42677be6c13e5286fb42004aa94b0da45391.tar.zst
yuzu-e7ac42677be6c13e5286fb42004aa94b0da45391.zip
-rw-r--r--src/yuzu/configuration/configure_system.cpp14
-rw-r--r--src/yuzu/configuration/configure_system.h6
2 files changed, 15 insertions, 5 deletions
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp
index a88fabc36..83cc49dfc 100644
--- a/src/yuzu/configuration/configure_system.cpp
+++ b/src/yuzu/configuration/configure_system.cpp
@@ -15,6 +15,7 @@
#include "common/logging/backend.h"
#include "common/string_util.h"
#include "core/core.h"
+#include "core/hle/service/acc/profile_manager.h"
#include "core/settings.h"
#include "ui_configure_system.h"
#include "yuzu/configuration/configure_system.h"
@@ -266,6 +267,7 @@ void ConfigureSystem::RenameUser() {
if (!ok)
return;
+ std::fill(profile.username.begin(), profile.username.end(), '\0');
const auto username_std = new_username.toStdString();
if (username_std.size() > profile.username.size()) {
std::copy_n(username_std.begin(), std::min(profile.username.size(), username_std.size()),
@@ -280,7 +282,10 @@ void ConfigureSystem::RenameUser() {
user, 0,
new QStandardItem{
GetIcon(*uuid).scaled(64, 64, Qt::IgnoreAspectRatio, Qt::SmoothTransformation),
- QString::fromStdString(username_std + '\n' + uuid->FormatSwitch())});
+ tr("%1\n%2", "%1 is the profile username, %2 is the formatted UUID (e.g. "
+ "00112233-4455-6677-8899-AABBCCDDEEFF))")
+ .arg(QString::fromStdString(username_std),
+ QString::fromStdString(uuid->FormatSwitch()))});
UpdateCurrentUser();
}
@@ -290,9 +295,10 @@ void ConfigureSystem::DeleteUser() {
ASSERT(uuid != boost::none);
const auto username = GetAccountUsername(*uuid);
- const auto confirm = QMessageBox::question(
- this, tr("Confirm Delete"),
- tr("You are about to delete user with name %1. Are you sure?").arg(username.c_str()));
+ const auto confirm =
+ QMessageBox::question(this, tr("Confirm Delete"),
+ tr("You are about to delete user with name %1. Are you sure?")
+ .arg(QString::fromStdString(username)));
if (confirm == QMessageBox::No)
return;
diff --git a/src/yuzu/configuration/configure_system.h b/src/yuzu/configuration/configure_system.h
index 6adadfccf..b73e0719c 100644
--- a/src/yuzu/configuration/configure_system.h
+++ b/src/yuzu/configuration/configure_system.h
@@ -8,7 +8,11 @@
#include <QList>
#include <QWidget>
-#include "core/hle/service/acc/profile_manager.h"
+
+namespace Service::Account {
+class ProfileManager;
+struct UUID;
+} // namespace Service::Account
class QGraphicsScene;
class QStandardItem;