FilePath: Fix parsing of qrc paths

Change-Id: I50d404bafb8d1cb4f0663cd424e1034ae26bb903
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Marcus Tillmanns
2022-08-08 09:17:50 +02:00
parent 3af72077a0
commit aeb33310cb
2 changed files with 11 additions and 2 deletions

View File

@@ -821,8 +821,13 @@ void FilePath::setRootAndPath(QStringView path, OsType osType)
m_root = "/";
m_path = path.mid(1).toString();
} else if (path.startsWith(':')) {
m_root = ":/";
m_path = path.mid(2).toString();
if (path.length() > 1 && path[1] == '/') {
m_root = ":/";
m_path = path.mid(2).toString();
} else {
m_root = ":";
m_path = path.mid(1).toString();
}
} else {
m_root.clear();
m_path = path.toString();