summaryrefslogtreecommitdiff
path: root/games/multimc/files/patch-api_gui_DesktopServices.cpp
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2018-06-06 15:54:57 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2018-06-06 15:54:57 +0000
commit0ab76735dc6b38ccc38049f466bfd5912fea688e (patch)
tree266fef7eff13f5868b58ec455ad6d545e4c40ad0 /games/multimc/files/patch-api_gui_DesktopServices.cpp
parentRemove expired port: (diff)
New port: games/multimc
MultiMC is a custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once. It also allows you to easily install and remove mods by simply dragging and dropping. WWW: https://multimc.org PR: 224823 Submitted by: tsundoku <me@tsundoku.ne.jp> (based on)
Diffstat (limited to 'games/multimc/files/patch-api_gui_DesktopServices.cpp')
-rw-r--r--games/multimc/files/patch-api_gui_DesktopServices.cpp56
1 files changed, 56 insertions, 0 deletions
diff --git a/games/multimc/files/patch-api_gui_DesktopServices.cpp b/games/multimc/files/patch-api_gui_DesktopServices.cpp
new file mode 100644
index 000000000000..40db6824a165
--- /dev/null
+++ b/games/multimc/files/patch-api_gui_DesktopServices.cpp
@@ -0,0 +1,56 @@
+--- api/gui/DesktopServices.cpp.orig 2017-12-18 00:19:43 UTC
++++ api/gui/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,
+ {
+ 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
+ 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();