main: Add GMainWindow hooks for Error display

This commit is contained in:
Zach Hilman 2019-03-11 19:45:22 -04:00
parent a04d36c5a4
commit 8f8049e846
4 changed files with 11 additions and 3 deletions

View File

@ -1,4 +1,4 @@
// Copyright 2018 yuzu emulator team // Copyright 2019 yuzu emulator team
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.

View File

@ -41,7 +41,7 @@ struct SystemErrorArg {
std::array<char, 0x800> main_text; std::array<char, 0x800> main_text;
std::array<char, 0x800> detail_text; std::array<char, 0x800> detail_text;
}; };
static_assert(sizeof(SystemErrorArg) == 0x1018, "ApplicationErrorArg has incorrect size."); static_assert(sizeof(SystemErrorArg) == 0x1018, "SystemErrorArg has incorrect size.");
struct ApplicationErrorArg { struct ApplicationErrorArg {
u8 mode; u8 mode;
@ -77,7 +77,7 @@ ResultCode Decode64BitError(u64 error) {
return {static_cast<ErrorModule>(module), static_cast<u32>(description)}; return {static_cast<ErrorModule>(module), static_cast<u32>(description)};
} }
} // namespace } // Anonymous namespace
Error::Error(const Core::Frontend::ErrorApplet& frontend) : frontend(frontend) {} Error::Error(const Core::Frontend::ErrorApplet& frontend) : frontend(frontend) {}

View File

@ -1589,6 +1589,11 @@ void GMainWindow::OnLoadComplete() {
loading_screen->OnLoadComplete(); loading_screen->OnLoadComplete();
} }
void GMainWindow::ErrorDisplayDisplayError(QString body) {
QMessageBox::critical(this, tr("Error Display"), body);
emit ErrorDisplayFinished();
}
void GMainWindow::OnMenuReportCompatibility() { void GMainWindow::OnMenuReportCompatibility() {
if (!Settings::values.yuzu_token.empty() && !Settings::values.yuzu_username.empty()) { if (!Settings::values.yuzu_token.empty() && !Settings::values.yuzu_username.empty()) {
CompatDB compatdb{this}; CompatDB compatdb{this};

View File

@ -102,6 +102,8 @@ signals:
// Signal that tells widgets to update icons to use the current theme // Signal that tells widgets to update icons to use the current theme
void UpdateThemedIcons(); void UpdateThemedIcons();
void ErrorDisplayFinished();
void ProfileSelectorFinishedSelection(std::optional<Service::Account::UUID> uuid); void ProfileSelectorFinishedSelection(std::optional<Service::Account::UUID> uuid);
void SoftwareKeyboardFinishedText(std::optional<std::u16string> text); void SoftwareKeyboardFinishedText(std::optional<std::u16string> text);
void SoftwareKeyboardFinishedCheckDialog(); void SoftwareKeyboardFinishedCheckDialog();
@ -111,6 +113,7 @@ signals:
public slots: public slots:
void OnLoadComplete(); void OnLoadComplete();
void ErrorDisplayDisplayError(QString body);
void ProfileSelectorSelectProfile(); void ProfileSelectorSelectProfile();
void SoftwareKeyboardGetText(const Core::Frontend::SoftwareKeyboardParameters& parameters); void SoftwareKeyboardGetText(const Core::Frontend::SoftwareKeyboardParameters& parameters);
void SoftwareKeyboardInvokeCheckDialog(std::u16string error_message); void SoftwareKeyboardInvokeCheckDialog(std::u16string error_message);