FilePath: Fix UNC root/path parsing

* Fixed UNC path parsing to correctly split between root and path
* Fixed tst_fileutils to correspond to windows path handling.

Change-Id: I2849738696a39e8282068ab164514f806f2c5fcf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Marcus Tillmanns
2022-08-11 10:50:06 +02:00
parent e31d7b227e
commit 50bedd5544
4 changed files with 34 additions and 38 deletions

View File

@@ -496,4 +496,12 @@ QTCREATOR_UTILS_EXPORT QString chopIfEndsWith(QString str, QChar c)
return str;
}
QTCREATOR_UTILS_EXPORT QStringView chopIfEndsWith(QStringView str, QChar c)
{
if (str.endsWith(c))
str.chop(1);
return str;
}
} // namespace Utils