| 124 | } |
| 125 | |
| 126 | QString absoluteExecutablePath(const QString &path) |
| 127 | { |
| 128 | if (QFile::exists(path)) { |
| 129 | return path; |
| 130 | } |
| 131 | |
| 132 | // see if Qt can find the executable (this can still fail for relative paths without extension) |
| 133 | const auto searchedPath = QStandardPaths::findExecutable(path); |
| 134 | if (!searchedPath.isEmpty()) { |
| 135 | return searchedPath; |
| 136 | } |
| 137 | |
| 138 | // attempt to appends missing .exe extensions |
| 139 | const auto pathExt = qEnvironmentVariable("PATHEXT").toLower().split(QLatin1Char(';')); |
| 140 | for (const auto &ext : pathExt) { |
| 141 | const auto extendedPath = path + ext; |
| 142 | if (QFile::exists(extendedPath)) { |
| 143 | return extendedPath; |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | return path; |
| 148 | } |
| 149 | |
| 150 | QString ProbeABIDetector::qtCoreForExecutable(const QString &path) |
| 151 | { |
no test coverage detected