| 71 | |
| 72 | namespace DesktopServices { |
| 73 | bool openDirectory(const QString &path, bool ensureExists) |
| 74 | { |
| 75 | qDebug() << "Opening directory" << path; |
| 76 | QDir parentPath; |
| 77 | QDir dir(path); |
| 78 | if (!dir.exists()) |
| 79 | { |
| 80 | parentPath.mkpath(dir.absolutePath()); |
| 81 | } |
| 82 | auto f = [&]() |
| 83 | { |
| 84 | return QDesktopServices::openUrl(QUrl::fromLocalFile(dir.absolutePath())); |
| 85 | }; |
| 86 | #if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) |
| 87 | return IndirectOpen(f); |
| 88 | #else |
| 89 | return f(); |
| 90 | #endif |
| 91 | } |
| 92 | |
| 93 | bool openFile(const QString &path) |
| 94 | { |
no test coverage detected