mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
DownloadManager: Improve logic for closeDownloadTab
It now can handle also new tabs opened in background
This commit is contained in:
parent
e10294db6d
commit
c6354259a8
@ -128,10 +128,13 @@ void DownloadManager::closeDownloadTab(const QUrl &url) const
|
||||
if (page->history()->count() != 0) {
|
||||
return false;
|
||||
}
|
||||
if (page->url() != QUrl() || page->requestedUrl() != QUrl()) {
|
||||
if (page->url() != QUrl()) {
|
||||
return false;
|
||||
}
|
||||
const QUrl tabUrl(view->webTab()->locationBar()->text());
|
||||
QUrl tabUrl = page->requestedUrl();
|
||||
if (tabUrl.isEmpty()) {
|
||||
tabUrl = QUrl(view->webTab()->locationBar()->text());
|
||||
}
|
||||
return tabUrl.host() == url.host();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user