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:
Ulf Hermann
2017-09-08 09:58:30 +02:00
parent d809e3fb8f
commit 565ebaeb9a

View File

@@ -592,7 +592,6 @@ QString FileName::fileName(int pathComponents) const
if (pathComponents < 0)
return *this;
const QChar slash = QLatin1Char('/');
QTC_CHECK(!endsWith(slash));
int i = lastIndexOf(slash);
if (pathComponents == 0 || i == -1)
return mid(i + 1);