Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-68463

QMLEngine is not compatible with QAbstractFileEngine on unix

    XMLWordPrintable

Details

    • 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)

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            erikv Erik Verbruggen
            raynorr Bruno Deligny
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes