mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +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) {
|
if (page->history()->count() != 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (page->url() != QUrl() || page->requestedUrl() != QUrl()) {
|
if (page->url() != QUrl()) {
|
||||||
return false;
|
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();
|
return tabUrl.host() == url.host();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user