Utils: Add a FilePath::isResourceFile function

Change-Id: I281e91bc24f5c32a5d64c31e73b7fc2f31cbade2
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
hjk
2024-01-26 16:52:22 +01:00
parent bb7a50e16e
commit 0d4b3b5196
2 changed files with 10 additions and 0 deletions

View File

@@ -241,6 +241,15 @@ bool FilePath::isRootPath() const
return *this == HostOsInfo::root();
}
bool FilePath::isResourceFile() const
{
if (scheme() == u"qrc")
return true;
if (needsDevice())
return false;
return pathView().startsWith(':');
}
QString FilePath::encodedHost() const
{
QString result = host().toString();