diff options
| author | crueter <crueter@eden-emu.dev> | 2026-02-25 03:38:13 +0100 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-02-25 03:38:13 +0100 |
| commit | 00e2128fab729e3f6ff2726ea779da65f77b5818 (patch) | |
| tree | 6e3ad81957ddd80d4417e115d69ba354d9079bd3 /src/qt_common/abstract/frontend.cpp | |
| parent | f25582833aa5d9cc8e540c217cf301eab9e607e7 (diff) | |
[desktop] Allow deletion of add-ons from the add-on menu (#3626)
Adds a location param to the Patch struct which can be used to delete
any installed mods at the user's request. You can delete multiple at
once too, or just one by right-clicking
You are not able to delete game updates, DLC, or SDMC mods.
Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3626
Reviewed-by: DraVee <dravee@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Diffstat (limited to 'src/qt_common/abstract/frontend.cpp')
| -rw-r--r-- | src/qt_common/abstract/frontend.cpp | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/src/qt_common/abstract/frontend.cpp b/src/qt_common/abstract/frontend.cpp index 58f1fe6aa8..620256c2d8 100644 --- a/src/qt_common/abstract/frontend.cpp +++ b/src/qt_common/abstract/frontend.cpp @@ -14,41 +14,38 @@ namespace QtCommon::Frontend { -StandardButton ShowMessage( - Icon icon, const QString &title, const QString &text, StandardButtons buttons, QObject *parent) -{ +StandardButton ShowMessage(Icon icon, const QString& title, const QString& text, + StandardButtons buttons, QObject* parent) { #ifdef YUZU_QT_WIDGETS - QMessageBox *box = new QMessageBox(icon, title, text, buttons, (QWidget *) parent); + QMessageBox* box = new QMessageBox(icon, title, text, buttons, (QWidget*)parent); return static_cast<QMessageBox::StandardButton>(box->exec()); #endif // TODO(crueter): If Qt Widgets is disabled... // need a way to reference icon/buttons too } -const QString GetOpenFileName(const QString &title, - const QString &dir, - const QString &filter, - QString *selectedFilter, - Options options) -{ +const QString GetOpenFileName(const QString& title, const QString& dir, const QString& filter, + QString* selectedFilter, Options options) { #ifdef YUZU_QT_WIDGETS return QFileDialog::getOpenFileName(rootObject, title, dir, filter, selectedFilter, options); #endif } -const QString GetSaveFileName(const QString &title, - const QString &dir, - const QString &filter, - QString *selectedFilter, - Options options) -{ +const QStringList GetOpenFileNames(const QString& title, const QString& dir, const QString& filter, + QString* selectedFilter, Options options) { +#ifdef YUZU_QT_WIDGETS + return QFileDialog::getOpenFileNames(rootObject, title, dir, filter, selectedFilter, options); +#endif +} + +const QString GetSaveFileName(const QString& title, const QString& dir, const QString& filter, + QString* selectedFilter, Options options) { #ifdef YUZU_QT_WIDGETS return QFileDialog::getSaveFileName(rootObject, title, dir, filter, selectedFilter, options); #endif } -const QString GetExistingDirectory(const QString& caption, const QString& dir, - Options options) { +const QString GetExistingDirectory(const QString& caption, const QString& dir, Options options) { #ifdef YUZU_QT_WIDGETS return QFileDialog::getExistingDirectory(rootObject, caption, dir, options); #endif @@ -59,7 +56,7 @@ int Choice(const QString& title, const QString& caption, const QStringList& opti box.setText(caption); box.setWindowTitle(title); - for (const QString &opt : options) { + for (const QString& opt : options) { box.addButton(opt, QMessageBox::AcceptRole); } |
