diff --git a/src/plugins/projectexplorer/abi.cpp b/src/plugins/projectexplorer/abi.cpp index 0582fb4d3aa..ba4acf1f519 100644 --- a/src/plugins/projectexplorer/abi.cpp +++ b/src/plugins/projectexplorer/abi.cpp @@ -31,7 +31,6 @@ #include #include -#include #include #include #include @@ -1168,9 +1167,6 @@ Abis Abi::abisOfBinary(const Utils::FilePath &path) && getUint8(data, 6) == '>' && getUint8(data, 7) == 0x0a) { // We got an ar file: possibly a static lib for ELF, PE or Mach-O - QFile f(path.toString()); - const bool canRead = f.open(QFile::ReadOnly); - data = data.mid(8); // Cut of ar file magic quint64 offset = 8; @@ -1196,14 +1192,8 @@ Abis Abi::abisOfBinary(const Utils::FilePath &path) if (!tmp.isEmpty() && tmp.at(0).binaryFormat() != MachOFormat) break; - if (!canRead) { - // FIXME: Implement remote - QTC_ASSERT(!path.needsDevice(), return {}); - } - offset += (offset % 2); // ar is 2 byte aligned - f.seek(offset); - data = f.read(1024); + data = path.fileContents(1024, offset); } } else { tmp = abiOf(data);