mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-30 10:29:59 +03:00
Merge pull request #351 from Scrumplex/fix-trash
This commit is contained in:
parent
7a5a4de6ea
commit
63a3dd1919
7 changed files with 27 additions and 24 deletions
|
|
@ -44,6 +44,7 @@
|
|||
#include <QStandardPaths>
|
||||
#include <QTextStream>
|
||||
#include <QUrl>
|
||||
#include "DesktopServices.h"
|
||||
|
||||
#if defined Q_OS_WIN32
|
||||
#include <objbase.h>
|
||||
|
|
@ -228,6 +229,9 @@ bool trash(QString path, QString *pathInTrash = nullptr)
|
|||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
|
||||
return false;
|
||||
#else
|
||||
// FIXME: Figure out trash in Flatpak. Qt seemingly doesn't use the Trash portal
|
||||
if (DesktopServices::isFlatpak())
|
||||
return false;
|
||||
return QFile::moveToTrash(path, pathInTrash);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue