Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.7.1, 5.9.5, 5.11.0
-
None
-
56a2b70247270c780247a1d2dcc670c3f0f5ab80
Description
QMLEngine test implicit imports with stat c function function instead of using QFile::exists like it does on Windows.
In QQmlTypeLoader::absoluteFilePath (qqmltypeloader.cpp) :
bool exists = false; #ifdef Q_OS_UNIX struct stat statBuf; // XXX Avoid encoding entire path. Should store encoded dirpath in cache if (::stat(QFile::encodeName(path).constData(), &statBuf) == 0) exists = S_ISREG(statBuf.st_mode); #else exists = QFile::exists(path); #endif fileSet->insert(fileName, new bool(exists)); if (exists) absoluteFilePath = path;
I use QAbstractFileEngine to make my own data package. It works on Windows but not on Android and MacOS (My abstract file engine is never called on my implicit imports)