1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00

Fix open folder dialog for MacOS

This commit is contained in:
Dominik Louven 2018-11-27 19:27:10 +01:00
parent ef6dc7bc17
commit 958b96ae9a

View File

@ -24,7 +24,11 @@ QString QMLUtilities::fixWindowsPath(QString url)
void QMLUtilities::openFolderInExplorer(QString url) void QMLUtilities::openFolderInExplorer(QString url)
{ {
QProcess explorer; QProcess explorer;
#ifdef Q_OS_WIN
explorer.setProgram("explorer.exe"); explorer.setProgram("explorer.exe");
#elif defined(Q_OS_OSX)
explorer.setProgram("open");
#endif
QStringList args; QStringList args;
args.append(QDir::toNativeSeparators(url)); args.append(QDir::toNativeSeparators(url));
explorer.setArguments(args); explorer.setArguments(args);