forked from qt-creator/qt-creator
Use Utils::FileName in abi
Use FileName when passing in a file to extract ABIs from. Also convert some helper functions in baseqtversion to use FileNames in favor of normal strings. Change-Id: I41c724c4c05bb4ff0d8b832f84fffa08d64762d9 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -669,13 +669,13 @@ Abi Abi::hostAbi()
|
||||
return Abi(arch, os, subos, format, QSysInfo::WordSize);
|
||||
}
|
||||
|
||||
QList<Abi> Abi::abisOfBinary(const QString &path)
|
||||
QList<Abi> Abi::abisOfBinary(const Utils::FileName &path)
|
||||
{
|
||||
QList<Abi> tmp;
|
||||
if (path.isEmpty())
|
||||
return tmp;
|
||||
|
||||
QFile f(path);
|
||||
QFile f(path.toString());
|
||||
if (!f.exists())
|
||||
return tmp;
|
||||
|
||||
@@ -692,7 +692,7 @@ QList<Abi> Abi::abisOfBinary(const QString &path)
|
||||
|
||||
while (!data.isEmpty()) {
|
||||
if ((getUint8(data, 58) != 0x60 || getUint8(data, 59) != 0x0a)) {
|
||||
qWarning() << path << ": Thought it was an ar-file, but it is not!";
|
||||
qWarning() << path.toString() << ": Thought it was an ar-file, but it is not!";
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -857,7 +857,7 @@ void ProjectExplorer::ProjectExplorerPlugin::testAbiOfBinary()
|
||||
QFETCH(QString, file);
|
||||
QFETCH(QStringList, abis);
|
||||
|
||||
QList<ProjectExplorer::Abi> result = Abi::abisOfBinary(file);
|
||||
QList<ProjectExplorer::Abi> result = Abi::abisOfBinary(Utils::FileName::fromString(file));
|
||||
QCOMPARE(result.count(), abis.count());
|
||||
for (int i = 0; i < abis.count(); ++i)
|
||||
QCOMPARE(result.at(i).toString(), abis.at(i));
|
||||
|
||||
Reference in New Issue
Block a user