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

QMimeDatabase says an html file is text/x-qml

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • 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

        1. main.cpp
          0.3 kB
          Albert Astals Cid
        2. qt-labs-calendar-qmlmodule.html
          4 kB
          Albert Astals Cid

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: