aboutsummaryrefslogtreecommitdiff
path: root/src/qt_common/util/game.cpp
diff options
context:
space:
mode:
authorcrueter <crueter@eden-emu.dev>2026-03-10 05:37:45 +0100
committercrueter <crueter@eden-emu.dev>2026-03-10 05:37:45 +0100
commit0ff1d215c81bda45e84c45d0dddb1f7ffb81f7b1 (patch)
tree5c5da4c6ae10d26e369d2f23cf6059039bf3d7f8 /src/qt_common/util/game.cpp
parent07e3a2aa46d1b8e9e28fdc3b306d1628e5c92f3e (diff)
[desktop] Port some QtCommon changes from QML branch (#3703)
- Linker now resolves implementation differences - Remove unneeded ifdefs - Better abstractions overall Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3703 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Diffstat (limited to 'src/qt_common/util/game.cpp')
-rw-r--r--src/qt_common/util/game.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/qt_common/util/game.cpp b/src/qt_common/util/game.cpp
index 34fbd04ff9..3e07b9d6b5 100644
--- a/src/qt_common/util/game.cpp
+++ b/src/qt_common/util/game.cpp
@@ -403,29 +403,29 @@ void ResetMetadata(bool show_message) {
inline constexpr bool CreateShortcutMessagesGUI(ShortcutMessages imsg, const QString& game_title)
{
int result = 0;
- QMessageBox::StandardButtons buttons;
+ using namespace QtCommon::Frontend;
+ int buttons;
+
switch (imsg) {
case ShortcutMessages::Fullscreen:
- buttons = QMessageBox::Yes | QMessageBox::No;
- result
- = QtCommon::Frontend::Information(tr("Create Shortcut"),
- tr("Do you want to launch the game in fullscreen?"),
- buttons);
- return result == QMessageBox::Yes;
+ buttons = Yes | No;
+ result = QtCommon::Frontend::Information(
+ tr("Create Shortcut"), tr("Do you want to launch the game in fullscreen?"), buttons);
+ return result == Yes;
case ShortcutMessages::Success:
- QtCommon::Frontend::Information(tr("Shortcut Created"),
- tr("Successfully created a shortcut to %1").arg(game_title));
+ QtCommon::Frontend::Information(
+ tr("Shortcut Created"), tr("Successfully created a shortcut to %1").arg(game_title));
return false;
case ShortcutMessages::Volatile:
- buttons = QMessageBox::StandardButton::Ok | QMessageBox::StandardButton::Cancel;
+ buttons = Ok | Cancel;
result = QtCommon::Frontend::Warning(
tr("Shortcut may be Volatile!"),
tr("This will create a shortcut to the current AppImage. This may "
"not work well if you update. Continue?"),
buttons);
- return result == QMessageBox::Ok;
+ return result == Ok;
default:
- buttons = QMessageBox::Ok;
+ buttons = Ok;
QtCommon::Frontend::Critical(tr("Failed to Create Shortcut"),
tr("Failed to create a shortcut to %1").arg(game_title),
buttons);