Skip to content
Commit 30995139 authored by Stefano Crocco's avatar Stefano Crocco
Browse files

Use QWebEngineDownloadItem::page() if possible

Summary:
Starting from Qt 5.12.0, QWebEngineDownloadItem knows which page
requested the download, so there's no more need to record calls to
WebEnginePage::acceptNavigationRequest and use them to try to guess the
correct page.

WebEngineDownloadManager still keeps a list of all pages because,
according to the documentation, QWebEngineDownloadItem::page() can
return nullptr "if the download was not triggered by content in a page".
If this happens, one of the pages (chosen arbitrarily) is used.

Test Plan:
Compile Konqueror using Qt 5.12.0 or later, try to download a file and check
that it happens correctly

Reviewers: dfaure

Reviewed By: dfaure

Differential Revision: https://phabricator.kde.org/D22272
parent 64ff2921
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment