Line 0
Link Here
|
|
|
1 |
--- api/gui/DesktopServices.cpp.orig 2017-12-18 00:19:43 UTC |
2 |
+++ api/gui/DesktopServices.cpp |
3 |
@@ -7,7 +7,7 @@ |
4 |
/** |
5 |
* This shouldn't exist, but until QTBUG-9328 and other unreported bugs are fixed, it needs to be a thing. |
6 |
*/ |
7 |
-#if defined(Q_OS_LINUX) |
8 |
+#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) |
9 |
|
10 |
#include <unistd.h> |
11 |
#include <errno.h> |
12 |
@@ -83,7 +83,7 @@ bool openDirectory(const QString &path, |
13 |
{ |
14 |
return QDesktopServices::openUrl(QUrl::fromLocalFile(dir.absolutePath())); |
15 |
}; |
16 |
-#if defined(Q_OS_LINUX) |
17 |
+#if defined(Q_OS_LINUX) || defined (Q_OS_FREEBSD) |
18 |
return IndirectOpen(f); |
19 |
#else |
20 |
return f(); |
21 |
@@ -97,7 +97,7 @@ bool openFile(const QString &path) |
22 |
{ |
23 |
return QDesktopServices::openUrl(QUrl::fromLocalFile(path)); |
24 |
}; |
25 |
-#if defined(Q_OS_LINUX) |
26 |
+#if defined(Q_OS_LINUX) || defined (Q_OS_FREEBSD) |
27 |
return IndirectOpen(f); |
28 |
#else |
29 |
return f(); |
30 |
@@ -107,7 +107,7 @@ bool openFile(const QString &path) |
31 |
bool openFile(const QString &application, const QString &path, const QString &workingDirectory, qint64 *pid) |
32 |
{ |
33 |
qDebug() << "Opening file" << path << "using" << application; |
34 |
-#if defined(Q_OS_LINUX) |
35 |
+#if defined(Q_OS_LINUX) || defined (Q_OS_FREEBSD) |
36 |
// FIXME: the pid here is fake. So if something depends on it, it will likely misbehave |
37 |
return IndirectOpen([&]() |
38 |
{ |
39 |
@@ -121,7 +121,7 @@ bool openFile(const QString &application |
40 |
bool run(const QString &application, const QStringList &args, const QString &workingDirectory, qint64 *pid) |
41 |
{ |
42 |
qDebug() << "Running" << application << "with args" << args.join(' '); |
43 |
-#if defined(Q_OS_LINUX) |
44 |
+#if defined(Q_OS_LINUX) || defined (Q_OS_FREEBSD) |
45 |
// FIXME: the pid here is fake. So if something depends on it, it will likely misbehave |
46 |
return IndirectOpen([&]() |
47 |
{ |
48 |
@@ -139,7 +139,7 @@ bool openUrl(const QUrl &url) |
49 |
{ |
50 |
return QDesktopServices::openUrl(url); |
51 |
}; |
52 |
-#if defined(Q_OS_LINUX) |
53 |
+#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) |
54 |
return IndirectOpen(f); |
55 |
#else |
56 |
return f(); |