aboutsummaryrefslogtreecommitdiff
path: root/launcher/DesktopServices.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@users.noreply.github.com>2021-12-30 20:00:45 +0100
committerGitHub <noreply@github.com>2021-12-30 20:00:45 +0100
commit3efcccf334e28d03605dd0597f53f900105cf04b (patch)
treeecafd89c7eb90d04f428c907da86c7d6b134c166 /launcher/DesktopServices.cpp
parent5e909a4e852a5bf3ba9dec9081b4839773bfc0ce (diff)
parentf42c3a953c15b01632131435e4885f9acc3b1f1a (diff)
downloadPrismLauncher-3efcccf334e28d03605dd0597f53f900105cf04b.tar.gz
PrismLauncher-3efcccf334e28d03605dd0597f53f900105cf04b.tar.bz2
PrismLauncher-3efcccf334e28d03605dd0597f53f900105cf04b.zip
Merge pull request #4345 from graemeg/freebsd-support
Adds FreeBSD support to MultiMC
Diffstat (limited to 'launcher/DesktopServices.cpp')
-rw-r--r--launcher/DesktopServices.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/launcher/DesktopServices.cpp b/launcher/DesktopServices.cpp
index 5368ddc8..dcc1b0ce 100644
--- a/launcher/DesktopServices.cpp
+++ b/launcher/DesktopServices.cpp
@@ -7,7 +7,7 @@
/**
* This shouldn't exist, but until QTBUG-9328 and other unreported bugs are fixed, it needs to be a thing.
*/
-#if defined(Q_OS_LINUX)
+#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
#include <unistd.h>
#include <errno.h>
@@ -83,7 +83,7 @@ bool openDirectory(const QString &path, bool ensureExists)
{
return QDesktopServices::openUrl(QUrl::fromLocalFile(dir.absolutePath()));
};
-#if defined(Q_OS_LINUX)
+#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
return IndirectOpen(f);
#else
return f();
@@ -97,7 +97,7 @@ bool openFile(const QString &path)
{
return QDesktopServices::openUrl(QUrl::fromLocalFile(path));
};
-#if defined(Q_OS_LINUX)
+#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
return IndirectOpen(f);
#else
return f();
@@ -107,7 +107,7 @@ bool openFile(const QString &path)
bool openFile(const QString &application, const QString &path, const QString &workingDirectory, qint64 *pid)
{
qDebug() << "Opening file" << path << "using" << application;
-#if defined(Q_OS_LINUX)
+#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
// FIXME: the pid here is fake. So if something depends on it, it will likely misbehave
return IndirectOpen([&]()
{
@@ -121,7 +121,7 @@ bool openFile(const QString &application, const QString &path, const QString &wo
bool run(const QString &application, const QStringList &args, const QString &workingDirectory, qint64 *pid)
{
qDebug() << "Running" << application << "with args" << args.join(' ');
-#if defined(Q_OS_LINUX)
+#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
// FIXME: the pid here is fake. So if something depends on it, it will likely misbehave
return IndirectOpen([&]()
{
@@ -139,7 +139,7 @@ bool openUrl(const QUrl &url)
{
return QDesktopServices::openUrl(url);
};
-#if defined(Q_OS_LINUX)
+#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
return IndirectOpen(f);
#else
return f();