Merge pull request #5135 from Morph1984/applets-shadow

applets: Resolve variable shadowing
This commit is contained in:
bunnei 2020-12-08 17:43:59 -08:00 committed by GitHub
commit 05a703e15d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 19 additions and 19 deletions

View File

@ -136,7 +136,7 @@ void Auth::Execute() {
} }
void Auth::AuthFinished(bool is_successful) { void Auth::AuthFinished(bool is_successful) {
this->successful = is_successful; successful = is_successful;
struct Return { struct Return {
ResultCode result_code; ResultCode result_code;

View File

@ -660,8 +660,8 @@ QtControllerSelector::QtControllerSelector(GMainWindow& parent) {
QtControllerSelector::~QtControllerSelector() = default; QtControllerSelector::~QtControllerSelector() = default;
void QtControllerSelector::ReconfigureControllers( void QtControllerSelector::ReconfigureControllers(
std::function<void()> callback, const Core::Frontend::ControllerParameters& parameters) const { std::function<void()> callback_, const Core::Frontend::ControllerParameters& parameters) const {
this->callback = std::move(callback); callback = std::move(callback_);
emit MainWindowReconfigureControllers(parameters); emit MainWindowReconfigureControllers(parameters);
} }

View File

@ -147,7 +147,7 @@ public:
~QtControllerSelector() override; ~QtControllerSelector() override;
void ReconfigureControllers( void ReconfigureControllers(
std::function<void()> callback, std::function<void()> callback_,
const Core::Frontend::ControllerParameters& parameters) const override; const Core::Frontend::ControllerParameters& parameters) const override;
signals: signals:

View File

@ -17,7 +17,7 @@ QtErrorDisplay::QtErrorDisplay(GMainWindow& parent) {
QtErrorDisplay::~QtErrorDisplay() = default; QtErrorDisplay::~QtErrorDisplay() = default;
void QtErrorDisplay::ShowError(ResultCode error, std::function<void()> finished) const { void QtErrorDisplay::ShowError(ResultCode error, std::function<void()> finished) const {
this->callback = std::move(finished); callback = std::move(finished);
emit MainWindowDisplayError( emit MainWindowDisplayError(
tr("An error has occured.\nPlease try again or contact the developer of the " tr("An error has occured.\nPlease try again or contact the developer of the "
"software.\n\nError Code: %1-%2 (0x%3)") "software.\n\nError Code: %1-%2 (0x%3)")
@ -28,7 +28,7 @@ void QtErrorDisplay::ShowError(ResultCode error, std::function<void()> finished)
void QtErrorDisplay::ShowErrorWithTimestamp(ResultCode error, std::chrono::seconds time, void QtErrorDisplay::ShowErrorWithTimestamp(ResultCode error, std::chrono::seconds time,
std::function<void()> finished) const { std::function<void()> finished) const {
this->callback = std::move(finished); callback = std::move(finished);
const QDateTime date_time = QDateTime::fromSecsSinceEpoch(time.count()); const QDateTime date_time = QDateTime::fromSecsSinceEpoch(time.count());
emit MainWindowDisplayError( emit MainWindowDisplayError(
@ -44,7 +44,7 @@ void QtErrorDisplay::ShowErrorWithTimestamp(ResultCode error, std::chrono::secon
void QtErrorDisplay::ShowCustomErrorText(ResultCode error, std::string dialog_text, void QtErrorDisplay::ShowCustomErrorText(ResultCode error, std::string dialog_text,
std::string fullscreen_text, std::string fullscreen_text,
std::function<void()> finished) const { std::function<void()> finished) const {
this->callback = std::move(finished); callback = std::move(finished);
emit MainWindowDisplayError( emit MainWindowDisplayError(
tr("An error has occured.\nError Code: %1-%2 (0x%3)\n\n%4\n\n%5") tr("An error has occured.\nError Code: %1-%2 (0x%3)\n\n%4\n\n%5")
.arg(static_cast<u32>(error.module.Value()) + 2000, 4, 10, QChar::fromLatin1('0')) .arg(static_cast<u32>(error.module.Value()) + 2000, 4, 10, QChar::fromLatin1('0'))

View File

@ -150,8 +150,8 @@ QtProfileSelector::QtProfileSelector(GMainWindow& parent) {
QtProfileSelector::~QtProfileSelector() = default; QtProfileSelector::~QtProfileSelector() = default;
void QtProfileSelector::SelectProfile( void QtProfileSelector::SelectProfile(
std::function<void(std::optional<Common::UUID>)> callback) const { std::function<void(std::optional<Common::UUID>)> callback_) const {
this->callback = std::move(callback); callback = std::move(callback_);
emit MainWindowSelectProfile(); emit MainWindowSelectProfile();
} }

View File

@ -60,7 +60,7 @@ public:
explicit QtProfileSelector(GMainWindow& parent); explicit QtProfileSelector(GMainWindow& parent);
~QtProfileSelector() override; ~QtProfileSelector() override;
void SelectProfile(std::function<void(std::optional<Common::UUID>)> callback) const override; void SelectProfile(std::function<void(std::optional<Common::UUID>)> callback_) const override;
signals: signals:
void MainWindowSelectProfile() const; void MainWindowSelectProfile() const;

View File

@ -135,8 +135,8 @@ void QtSoftwareKeyboard::RequestText(std::function<void(std::optional<std::u16st
} }
void QtSoftwareKeyboard::SendTextCheckDialog(std::u16string error_message, void QtSoftwareKeyboard::SendTextCheckDialog(std::u16string error_message,
std::function<void()> finished_check) const { std::function<void()> finished_check_) const {
this->finished_check = std::move(finished_check); finished_check = std::move(finished_check_);
emit MainWindowTextCheckDialog(error_message); emit MainWindowTextCheckDialog(error_message);
} }

View File

@ -61,7 +61,7 @@ public:
void RequestText(std::function<void(std::optional<std::u16string>)> out, void RequestText(std::function<void(std::optional<std::u16string>)> out,
Core::Frontend::SoftwareKeyboardParameters parameters) const override; Core::Frontend::SoftwareKeyboardParameters parameters) const override;
void SendTextCheckDialog(std::u16string error_message, void SendTextCheckDialog(std::u16string error_message,
std::function<void()> finished_check) const override; std::function<void()> finished_check_) const override;
signals: signals:
void MainWindowGetText(Core::Frontend::SoftwareKeyboardParameters parameters) const; void MainWindowGetText(Core::Frontend::SoftwareKeyboardParameters parameters) const;

View File

@ -87,10 +87,10 @@ QtWebBrowser::QtWebBrowser(GMainWindow& main_window) {
QtWebBrowser::~QtWebBrowser() = default; QtWebBrowser::~QtWebBrowser() = default;
void QtWebBrowser::OpenPageLocal(std::string_view url, std::function<void()> unpack_romfs_callback, void QtWebBrowser::OpenPageLocal(std::string_view url, std::function<void()> unpack_romfs_callback_,
std::function<void()> finished_callback) { std::function<void()> finished_callback_) {
this->unpack_romfs_callback = std::move(unpack_romfs_callback); unpack_romfs_callback = std::move(unpack_romfs_callback_);
this->finished_callback = std::move(finished_callback); finished_callback = std::move(finished_callback_);
const auto index = url.find('?'); const auto index = url.find('?');
if (index == std::string::npos) { if (index == std::string::npos) {

View File

@ -37,8 +37,8 @@ public:
explicit QtWebBrowser(GMainWindow& main_window); explicit QtWebBrowser(GMainWindow& main_window);
~QtWebBrowser() override; ~QtWebBrowser() override;
void OpenPageLocal(std::string_view url, std::function<void()> unpack_romfs_callback, void OpenPageLocal(std::string_view url, std::function<void()> unpack_romfs_callback_,
std::function<void()> finished_callback) override; std::function<void()> finished_callback_) override;
signals: signals:
void MainWindowOpenPage(std::string_view filename, std::string_view additional_args) const; void MainWindowOpenPage(std::string_view filename, std::string_view additional_args) const;