| 783 | } |
| 784 | |
| 785 | QString ResolveExecutable(QString path) |
| 786 | { |
| 787 | if (path.isEmpty()) { |
| 788 | return QString(); |
| 789 | } |
| 790 | if (!path.contains('/')) { |
| 791 | path = QStandardPaths::findExecutable(path); |
| 792 | } |
| 793 | QFileInfo pathInfo(path); |
| 794 | if (!pathInfo.exists() || !pathInfo.isExecutable()) { |
| 795 | return QString(); |
| 796 | } |
| 797 | return pathInfo.absoluteFilePath(); |
| 798 | } |
| 799 | |
| 800 | /** |
| 801 | * Normalize path |
no test coverage detected