Skip to content
  • Stefano Crocco's avatar
    Use QWebEngineDownloadItem::page() if possible · 30995139
    Stefano Crocco authored
    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
    30995139