forked from qt-creator/qt-creator
Utils: Add a FilePath::isResourceFile function
Change-Id: I281e91bc24f5c32a5d64c31e73b7fc2f31cbade2 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user