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

QMimeDatabase says an html file is text/x-qml

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: P2: Important P2: Important
    • None
    • 5.13.0
    • Core: Other
    • None
    • Linux/X11

      Running this code (attached) with the attached html file

       

      #include <QDebug>
      #include <QMimeDatabase>
      #include <QUrl>
      
      int main(int /*argc*/, char ** /*argv*/)
      {
          QMimeDatabase db;
          QMimeType mime = db.mimeTypeForUrl(QUrl::fromLocalFile("./qt-labs-calendar-qmlmodule.html"));
          qDebug() << "MIME TYPE is " << mime.name();
      
          return 0;
      }

       

      returns MIME TYPE is "text/x-qml"

       

      When it's clearly not the case.

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

            dfaure_kdab David Faure
            tsdgeos_kdab Albert Astals Cid
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes