Utility functions, status messages and model list

Ref T247 follow up
This commit is contained in:
Klaus Basan
2019-04-10 00:53:25 +02:00
committed by Mat Sutcliffe
parent 5c870a8404
commit fd1f6bcc84
5 changed files with 18 additions and 3 deletions

View File

@@ -169,7 +169,7 @@ namespace BlackMisc
QString CFileUtils::lastPathSegment(const QString &path)
{
if (path.isEmpty()) { return {}; }
if (path.endsWith('/')) { return CFileUtils::lastPathSegment(path.left(path.length() - 1)); }
if (path.endsWith('/')) { return CFileUtils::lastPathSegment(path.left(path.length() - 1)); }
if (!path.contains('/')) { return path; }
return path.mid(path.lastIndexOf('/') + 1);
}