aboutsummaryrefslogtreecommitdiff
path: root/launcher/DesktopServices.h
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-08-05 19:09:10 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-08-05 19:09:10 +0300
commitb2fdd8359405c93d0d93aa8c68971c986a1f68cb (patch)
tree59859119373213ce04b2f5e2d7a95227b57be609 /launcher/DesktopServices.h
parent149b6d59cf848a3b3cd50b3aee1c112e9c47e633 (diff)
parentae793f6cf11658c9abc5111e82d5ba7b3e6af127 (diff)
downloadPrismLauncher-b2fdd8359405c93d0d93aa8c68971c986a1f68cb.tar.gz
PrismLauncher-b2fdd8359405c93d0d93aa8c68971c986a1f68cb.tar.bz2
PrismLauncher-b2fdd8359405c93d0d93aa8c68971c986a1f68cb.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into download_threads
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/DesktopServices.h')
-rw-r--r--launcher/DesktopServices.h72
1 files changed, 42 insertions, 30 deletions
diff --git a/launcher/DesktopServices.h b/launcher/DesktopServices.h
index 21c9cae0..151db555 100644
--- a/launcher/DesktopServices.h
+++ b/launcher/DesktopServices.h
@@ -1,38 +1,50 @@
#pragma once
-#include <QUrl>
#include <QString>
+#include <QUrl>
/**
* This wraps around QDesktopServices and adds workarounds where needed
* Use this instead of QDesktopServices!
*/
-namespace DesktopServices
-{
- /**
- * Open a file in whatever application is applicable
- */
- bool openFile(const QString &path);
-
- /**
- * Open a file in the specified application
- */
- bool openFile(const QString &application, const QString &path, const QString & workingDirectory = QString(), qint64 *pid = 0);
-
- /**
- * Run an application
- */
- bool run(const QString &application,const QStringList &args, const QString & workingDirectory = QString(), qint64 *pid = 0);
-
- /**
- * Open a directory
- */
- bool openDirectory(const QString &path, bool ensureExists = false);
-
- /**
- * Open the URL, most likely in a browser. Maybe.
- */
- bool openUrl(const QUrl &url);
-
- bool isFlatpak();
-}
+namespace DesktopServices {
+/**
+ * Open a file in whatever application is applicable
+ */
+bool openFile(const QString& path);
+
+/**
+ * Open a file in the specified application
+ */
+bool openFile(const QString& application, const QString& path, const QString& workingDirectory = QString(), qint64* pid = 0);
+
+/**
+ * Run an application
+ */
+bool run(const QString& application, const QStringList& args, const QString& workingDirectory = QString(), qint64* pid = 0);
+
+/**
+ * Open a directory
+ */
+bool openDirectory(const QString& path, bool ensureExists = false);
+
+/**
+ * Open the URL, most likely in a browser. Maybe.
+ */
+bool openUrl(const QUrl& url);
+
+/**
+ * Determine whether the launcher is running in a Flatpak environment
+ */
+bool isFlatpak();
+
+/**
+ * Determine whether the launcher is running in a Snap environment
+ */
+bool isSnap();
+
+/**
+ * Determine whether the launcher is running in a sandboxed (Flatpak or Snap) environment
+ */
+bool isSandbox();
+} // namespace DesktopServices