MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / resolveSystemTool

Function resolveSystemTool

app/src/Licensing/MachineID.cpp:40–49  ·  view source on GitHub ↗

* @brief Resolves a system tool to an absolute path, falling back to its bare name. */

Source from the content-addressed store, hash-verified

38 * @brief Resolves a system tool to an absolute path, falling back to its bare name.
39 */
40static QString resolveSystemTool(const QStringList& candidates, const QString& fallbackName)
41{
42 for (const auto& path : candidates) {
43 QFileInfo info(path);
44 if (info.exists() && info.isExecutable())
45 return path;
46 }
47
48 return fallbackName;
49}
50
51/**
52 * @brief Waits for a fingerprint helper, killing it if it wedges; the timeout

Callers 4

readLinuxIdFunction · 0.85
readMacIdFunction · 0.85
readWindowsIdFunction · 0.85
readBsdIdFunction · 0.85

Calls 1

existsMethod · 0.80

Tested by

no test coverage detected