| 258 | } |
| 259 | |
| 260 | QString ResolveExecutable(QString path) |
| 261 | { |
| 262 | if (path.isEmpty()) |
| 263 | { |
| 264 | return QString(); |
| 265 | } |
| 266 | if(!path.contains('/')) |
| 267 | { |
| 268 | path = QStandardPaths::findExecutable(path); |
| 269 | } |
| 270 | QFileInfo pathInfo(path); |
| 271 | if(!pathInfo.exists() || !pathInfo.isExecutable()) |
| 272 | { |
| 273 | return QString(); |
| 274 | } |
| 275 | return pathInfo.absoluteFilePath(); |
| 276 | } |
| 277 | |
| 278 | /** |
| 279 | * Normalize path |
no test coverage detected