12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- From aa8d71af8ef16b88ebabaae420ccc65dd8fcaab4 Mon Sep 17 00:00:00 2001
- From: dada513 <dada513@protonmail.com>
- Date: Sat, 1 Jan 2022 02:54:30 +0100
- Subject: [PATCH] Fix crash in Flatpak
- ---
- launcher/DesktopServices.cpp | 20 --------------------
- 1 file changed, 20 deletions(-)
- diff --git a/launcher/DesktopServices.cpp b/launcher/DesktopServices.cpp
- index dcc1b0ce..f754d325 100644
- --- a/launcher/DesktopServices.cpp
- +++ b/launcher/DesktopServices.cpp
- @@ -83,11 +83,7 @@ bool openDirectory(const QString &path, bool ensureExists)
- {
- return QDesktopServices::openUrl(QUrl::fromLocalFile(dir.absolutePath()));
- };
- -#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
- - return IndirectOpen(f);
- -#else
- return f();
- -#endif
- }
-
- bool openFile(const QString &path)
- @@ -97,25 +93,13 @@ bool openFile(const QString &path)
- {
- return QDesktopServices::openUrl(QUrl::fromLocalFile(path));
- };
- -#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
- - return IndirectOpen(f);
- -#else
- return f();
- -#endif
- }
-
- bool openFile(const QString &application, const QString &path, const QString &workingDirectory, qint64 *pid)
- {
- qDebug() << "Opening file" << path << "using" << application;
- -#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([&]()
- - {
- - return QProcess::startDetached(application, QStringList() << path, workingDirectory);
- - }, pid);
- -#else
- return QProcess::startDetached(application, QStringList() << path, workingDirectory, pid);
- -#endif
- }
-
- bool run(const QString &application, const QStringList &args, const QString &workingDirectory, qint64 *pid)
- @@ -139,11 +123,7 @@ bool openUrl(const QUrl &url)
- {
- return QDesktopServices::openUrl(url);
- };
- -#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
- - return IndirectOpen(f);
- -#else
- return f();
- -#endif
- }
-
- }
- --
- 2.33.1
|