| 284 | } |
| 285 | |
| 286 | QString ResolveExecutable(QString path) |
| 287 | { |
| 288 | if (path.isEmpty()) { |
| 289 | return QString(); |
| 290 | } |
| 291 | if (!path.contains('/')) { |
| 292 | path = QStandardPaths::findExecutable(path); |
| 293 | } |
| 294 | QFileInfo pathInfo(path); |
| 295 | if (!pathInfo.exists() || !pathInfo.isExecutable()) { |
| 296 | return QString(); |
| 297 | } |
| 298 | return pathInfo.absoluteFilePath(); |
| 299 | } |
| 300 | |
| 301 | /** |
| 302 | * Normalize path |
no test coverage detected