diff --git a/src/base/path.cpp b/src/base/path.cpp index bf8b8d481..21437b19d 100644 --- a/src/base/path.cpp +++ b/src/base/path.cpp @@ -95,11 +95,17 @@ bool Path::isEmpty() const bool Path::isAbsolute() const { + // `QDir::isAbsolutePath` treats `:` as a path to QResource, so handle it manually + if (m_pathStr.startsWith(u':')) + return false; return QDir::isAbsolutePath(m_pathStr); } bool Path::isRelative() const { + // `QDir::isRelativePath` treats `:` as a path to QResource, so handle it manually + if (m_pathStr.startsWith(u':')) + return true; return QDir::isRelativePath(m_pathStr); }