Utils: add FilePath::(complete)suffix

The same as FilePath::(complete)baseName avoid some toFileInfo.

Change-Id: Id1901ce2a4bef675215a9e020280df1c846df405
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2021-06-04 09:13:49 +02:00
parent eafc52cf1e
commit aa8d2dc2d1
7 changed files with 37 additions and 8 deletions

View File

@@ -79,7 +79,7 @@ static QStringList libraryNameFilter()
static bool hasLibSuffix(const FilePath &path)
{
return (HostOsInfo::isWindowsHost() && path.endsWith(".dll"))
|| (HostOsInfo::isLinuxHost() && path.toFileInfo().completeSuffix().startsWith(".so"))
|| (HostOsInfo::isLinuxHost() && path.completeSuffix().startsWith(".so"))
|| (HostOsInfo::isMacHost() && path.endsWith(".dylib"));
}