MCPcopy Create free account
hub / github.com/KDAB/GammaRay / absoluteExecutablePath

Function absoluteExecutablePath

launcher/core/probeabidetector_win.cpp:126–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126QString 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
150QString ProbeABIDetector::qtCoreForExecutable(const QString &path)
151{

Callers 1

qtCoreForExecutableMethod · 0.85

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected