Changeset View
Changeset View
Standalone View
Standalone View
webenginepart/src/webenginepartdownloadmanager.cpp
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | 71 | } else if (!page) { | |||
---|---|---|---|---|---|
72 | qDebug() << "Couldn't find a part wanting to download" << it->url(); | 72 | qDebug() << "Couldn't find a part wanting to download" << it->url(); | ||
73 | return; | 73 | return; | ||
74 | } | 74 | } | ||
75 | page->download(it->url(), forceNew); | 75 | page->download(it->url(), forceNew); | ||
76 | } | 76 | } | ||
77 | 77 | | |||
78 | void WebEnginePartDownloadManager::recordNavigationRequest(WebEnginePage *page, const QUrl& url) | 78 | void WebEnginePartDownloadManager::recordNavigationRequest(WebEnginePage *page, const QUrl& url) | ||
79 | { | 79 | { | ||
80 | qDebug() << url; | 80 | // qDebug() << url; | ||
81 | m_requests.insert(url, page); | 81 | m_requests.insert(url, page); | ||
82 | } | 82 | } | ||
83 | 83 | | |||
84 | WebEnginePage* WebEnginePartDownloadManager::pageForDownload(QWebEngineDownloadItem* it) | 84 | WebEnginePage* WebEnginePartDownloadManager::pageForDownload(QWebEngineDownloadItem* it) | ||
85 | { | 85 | { | ||
86 | WebEnginePage *page = m_requests.value(it->url()); | 86 | WebEnginePage *page = m_requests.value(it->url()); | ||
87 | if (!page && !m_pages.isEmpty()) { | 87 | if (!page && !m_pages.isEmpty()) { | ||
88 | page = m_pages.first(); | 88 | page = m_pages.first(); | ||
89 | } | 89 | } | ||
90 | return page; | 90 | return page; | ||
91 | } | 91 | } |