Workaround for malfunctioning "Show in file browser" feature in Linux
(issue #4877).
This commit is contained in:
parent
918ffd4d77
commit
d3387f8ef8
@ -38,6 +38,7 @@
|
||||
#include <QIODevice>
|
||||
#include <QMetaEnum>
|
||||
#include <QMouseEvent>
|
||||
#include <QProcess>
|
||||
#include <QStringList>
|
||||
#include <QTcpServer>
|
||||
#include <QtDebug>
|
||||
@ -58,7 +59,6 @@
|
||||
#include <sys/statvfs.h>
|
||||
#elif defined(Q_OS_WIN32)
|
||||
#include <windows.h>
|
||||
#include <QProcess>
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
@ -76,7 +76,6 @@
|
||||
#include "CoreServices/CoreServices.h"
|
||||
#include "IOKit/ps/IOPowerSources.h"
|
||||
#include "IOKit/ps/IOPSKeys.h"
|
||||
#include <QProcess>
|
||||
#endif
|
||||
|
||||
namespace Utilities {
|
||||
@ -411,7 +410,9 @@ void OpenInFileBrowser(const QList<QUrl>& urls) {
|
||||
#elif defined(Q_OS_WIN32)
|
||||
ShowFileInExplorer(path);
|
||||
#else
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(directory));
|
||||
QStringList args;
|
||||
args << directory;
|
||||
QProcess::startDetached("xdg-open", args);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user