forked from qt-creator/qt-creator
FileUtils: Drop the QTC_CHECK for !endsWith(slash)
As exercised by the test directories as Utils::FileName are actually supported. The resulting fileName() is empty. Change-Id: Ie20ac58c1d0f416d711c8cc3281054c0d70c449e Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -592,7 +592,6 @@ QString FileName::fileName(int pathComponents) const
|
|||||||
if (pathComponents < 0)
|
if (pathComponents < 0)
|
||||||
return *this;
|
return *this;
|
||||||
const QChar slash = QLatin1Char('/');
|
const QChar slash = QLatin1Char('/');
|
||||||
QTC_CHECK(!endsWith(slash));
|
|
||||||
int i = lastIndexOf(slash);
|
int i = lastIndexOf(slash);
|
||||||
if (pathComponents == 0 || i == -1)
|
if (pathComponents == 0 || i == -1)
|
||||||
return mid(i + 1);
|
return mid(i + 1);
|
||||||
|
Reference in New Issue
Block a user