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

QMimeDatabase says an html file is text/x-qml

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes