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

When saving an mhtml page QWebEngineDownloadRequest::isSavePageDownload() returns false

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.6
    • 6.5.1
    • WebEngine
    • None
    • ba20f9e89 (dev), 28b183a76 (6.6)

    Description

      When saving a webpage to MHTML, the associated QWebEngineDownloadRequest returns the following values:

      • isSavePageDownload() => true
      • mimeType() => "application/x-mimearchive"

       

      However, when the current webpage is already an MHTML file, saving the page gives a QWebEngineDownloadRequest with the following values: 

      • isSavePageDownload() => false
      • mimeType() => "multipart/related"

      Step 1

      The initial MHTML file is created from a web page by using 

      QWebEnginePage::triggerAction(QWebEnginePage::SavePage); 
      //or
      QWebEngineView::triggerAction(QWebEnginePage::SavePage); 
      

      The download request is handled with QWebEngineProfile::downloadRequested().

      Step 2

      The MHTML file is then opened with

      auto page = new QWebEnginePage();
      page->setUrl(QUrl::fromLocalFile(pathToMhtml);
      

      Step 3

      Finaly a new SavePage action is triggered just like in step 1.

      Attachments

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

        Activity

          People

            davidsz Szabolcs David
            bterrier Benjamin Terrier
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes