aboutsummaryrefslogtreecommitdiff
path: root/launcher/DesktopServices.h
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2023-08-04 19:42:36 +0200
committerGitHub <noreply@github.com>2023-08-04 19:42:36 +0200
commitae793f6cf11658c9abc5111e82d5ba7b3e6af127 (patch)
treeed41f30e2c0f02e4be1d42324b3f05fbab75b2cd /launcher/DesktopServices.h
parent50c7d39e082f0a7dbd977401e16d5adf534d9770 (diff)
parent1d638e018ac40fbfb35dd117f9a948c0cf35eadd (diff)
downloadPrismLauncher-ae793f6cf11658c9abc5111e82d5ba7b3e6af127.tar.gz
PrismLauncher-ae793f6cf11658c9abc5111e82d5ba7b3e6af127.tar.bz2
PrismLauncher-ae793f6cf11658c9abc5111e82d5ba7b3e6af127.zip
Merge pull request #1459 from Scrumplex/format
Diffstat (limited to 'launcher/DesktopServices.h')
-rw-r--r--launcher/DesktopServices.h85
1 files changed, 42 insertions, 43 deletions
diff --git a/launcher/DesktopServices.h b/launcher/DesktopServices.h
index b1948cc2..151db555 100644
--- a/launcher/DesktopServices.h
+++ b/launcher/DesktopServices.h
@@ -1,51 +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);
-
- /**
- * 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 {
+/**
+ * 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