Move new method into anonymous namespace

This commit is contained in:
Godkratos
2020-05-18 00:55:32 +12:00
parent d8b83aa8f5
commit c2522f3e43
+18 -14
View File
@@ -135,6 +135,24 @@ __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}
#endif
namespace {
QString GetAccountUsername() {
Service::Account::ProfileManager manager;
const auto current_user = manager.GetUser(Settings::values.current_user);
ASSERT(current_user);
Service::Account::ProfileBase profile;
if (!manager.GetProfileBase(*current_user, profile)) {
return {};
}
const auto text = Common::StringFromFixedZeroTerminatedBuffer(
reinterpret_cast<const char*>(profile.username.data()), profile.username.size());
return QString::fromStdString(text);
}
}
constexpr int default_mouse_timeout = 2500;
constexpr u64 DLC_BASE_TITLE_ID_MASK = 0xFFFFFFFFFFFFE000;
@@ -441,20 +459,6 @@ void GMainWindow::WebBrowserOpenPage(std::string_view filename, std::string_view
#endif
QString GetAccountUsername() {
Service::Account::ProfileManager manager;
const auto current_user = manager.GetUser(Settings::values.current_user);
ASSERT(current_user);
Service::Account::ProfileBase profile;
if (!manager.GetProfileBase(*current_user, profile)) {
return {};
}
const auto text = Common::StringFromFixedZeroTerminatedBuffer(
reinterpret_cast<const char*>(profile.username.data()), profile.username.size());
return QString::fromStdString(text);
}
void GMainWindow::InitializeWidgets() {
#ifdef YUZU_ENABLE_COMPATIBILITY_REPORTING
ui.action_Report_Compatibility->setVisible(true);