| 53 | } |
| 54 | |
| 55 | void showFileInExplorer(QString path) |
| 56 | { |
| 57 | QString cmd; |
| 58 | |
| 59 | #ifdef _WIN32 |
| 60 | path = path.replace("/", "\\"); |
| 61 | cmd = QString("explorer.exe /select,%1").arg(path); |
| 62 | #endif |
| 63 | |
| 64 | #ifdef ubu |
| 65 | path = path.replace("\\", "/"); |
| 66 | cmd = QString("nautilus %1").arg(path); |
| 67 | #endif |
| 68 | |
| 69 | #ifdef uos |
| 70 | path = path.replace("\\", "/"); |
| 71 | cmd = QString("dde-file-manager %1").arg(path); |
| 72 | #endif |
| 73 | |
| 74 | #if defined(Q_OS_MAC) |
| 75 | path = path.replace("\\", "/"); |
| 76 | cmd = QString("open -R %1").arg(path); |
| 77 | #endif |
| 78 | |
| 79 | QProcess process; |
| 80 | process.startDetached(cmd); |
| 81 | } |
no test coverage detected