| 24 | ProbeABIDetector::ProbeABIDetector() = default; |
| 25 | |
| 26 | ProbeABI ProbeABIDetector::abiForExecutable(const QString &path) const |
| 27 | { |
| 28 | const QVector<ProbeABI> abis = abiForQtCore(qtCoreForExecutable(path)); |
| 29 | if (abis.isEmpty()) { |
| 30 | return {}; |
| 31 | } |
| 32 | // Assume you want to run the one your system cpu is about if it exists |
| 33 | // It could be improved asking the user which of the multiple abis |
| 34 | // they want to run |
| 35 | for (const ProbeABI &abi : abis) { |
| 36 | if (abi.architecture() == QSysInfo::currentCpuArchitecture()) { |
| 37 | return abi; |
| 38 | } |
| 39 | } |
| 40 | return abis[0]; |
| 41 | } |
| 42 | |
| 43 | ProbeABI ProbeABIDetector::abiForProcess(qint64 pid) const |
| 44 | { |