forked from qt-creator/qt-creator
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:
@@ -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"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user