diff options
| author | 2023-10-16 16:11:24 -0300 | |
|---|---|---|
| committer | 2023-10-16 16:11:24 -0300 | |
| commit | d759de9f96faa8f530b3724b79ccc04ab0d01a09 (patch) | |
| tree | c588c83861a268b37a8cf793ff2744314523ab35 /src | |
| parent | Sugestions and fixes. (diff) | |
| download | yuzu-d759de9f96faa8f530b3724b79ccc04ab0d01a09.tar.gz yuzu-d759de9f96faa8f530b3724b79ccc04ab0d01a09.tar.xz yuzu-d759de9f96faa8f530b3724b79ccc04ab0d01a09.zip | |
More missed suggestions
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/main.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index feb455763..90bb61c15 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -2995,12 +2995,10 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, | |||
| 2995 | // Messages in pre-defined message boxes for less code spaghetti | 2995 | // Messages in pre-defined message boxes for less code spaghetti |
| 2996 | bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QString& game_title) { | 2996 | bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QString& game_title) { |
| 2997 | QMessageBox::StandardButtons buttons; | 2997 | QMessageBox::StandardButtons buttons; |
| 2998 | std::string_view game_title_sv = game_title.toStdString(); | ||
| 2999 | 2998 | ||
| 3000 | int result = 0; | 2999 | int result = 0; |
| 3001 | 3000 | ||
| 3002 | switch (imsg) { | 3001 | switch (imsg) { |
| 3003 | |||
| 3004 | case GMainWindow::CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES: | 3002 | case GMainWindow::CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES: |
| 3005 | buttons = QMessageBox::Yes | QMessageBox::No; | 3003 | buttons = QMessageBox::Yes | QMessageBox::No; |
| 3006 | 3004 | ||
| @@ -3009,12 +3007,11 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt | |||
| 3009 | tr("Do you want to launch the game in fullscreen?"), buttons); | 3007 | tr("Do you want to launch the game in fullscreen?"), buttons); |
| 3010 | 3008 | ||
| 3011 | LOG_INFO(Frontend, "Shortcut will launch in fullscreen"); | 3009 | LOG_INFO(Frontend, "Shortcut will launch in fullscreen"); |
| 3012 | return (result == QMessageBox::No) ? false : true; | 3010 | return result == QMessageBox::Yes; |
| 3013 | 3011 | ||
| 3014 | case GMainWindow::CREATE_SHORTCUT_MSGBOX_SUCCESS: | 3012 | case GMainWindow::CREATE_SHORTCUT_MSGBOX_SUCCESS: |
| 3015 | QMessageBox::information(parent, tr("Create Shortcut"), | 3013 | QMessageBox::information(parent, tr("Create Shortcut"), |
| 3016 | tr("Successfully created a shortcut to %1").arg(game_title)); | 3014 | tr("Successfully created a shortcut to %1").arg(game_title)); |
| 3017 | LOG_INFO(Frontend, "Successfully created a shortcut to {}", game_title_sv); | ||
| 3018 | return true; | 3015 | return true; |
| 3019 | 3016 | ||
| 3020 | case GMainWindow::CREATE_SHORTCUT_MSGBOX_APPVOLATILE_WARNING: | 3017 | case GMainWindow::CREATE_SHORTCUT_MSGBOX_APPVOLATILE_WARNING: |
| @@ -3024,7 +3021,7 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt | |||
| 3024 | tr("This will create a shortcut to the current AppImage. This may " | 3021 | tr("This will create a shortcut to the current AppImage. This may " |
| 3025 | "not work well if you update. Continue?"), | 3022 | "not work well if you update. Continue?"), |
| 3026 | buttons); | 3023 | buttons); |
| 3027 | return (result == QMessageBox::StandardButton::Cancel) ? true : false; | 3024 | return result == QMessageBox::StandardButton::Ok; |
| 3028 | case GMainWindow::CREATE_SHORTCUT_MSGBOX_ADMIN: | 3025 | case GMainWindow::CREATE_SHORTCUT_MSGBOX_ADMIN: |
| 3029 | buttons = QMessageBox::Ok; | 3026 | buttons = QMessageBox::Ok; |
| 3030 | QMessageBox::critical(parent, tr("Create Shortcut"), | 3027 | QMessageBox::critical(parent, tr("Create Shortcut"), |
| @@ -3036,7 +3033,6 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt | |||
| 3036 | buttons = QMessageBox::Ok; | 3033 | buttons = QMessageBox::Ok; |
| 3037 | QMessageBox::critical(parent, tr("Create Shortcut"), | 3034 | QMessageBox::critical(parent, tr("Create Shortcut"), |
| 3038 | tr("Failed to create a shortcut to %1").arg(game_title), buttons); | 3035 | tr("Failed to create a shortcut to %1").arg(game_title), buttons); |
| 3039 | LOG_ERROR(Frontend, "Failed to create a shortcut to {}", game_title_sv); | ||
| 3040 | return true; | 3036 | return true; |
| 3041 | } | 3037 | } |
| 3042 | 3038 | ||