1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

DownloadManager: Don't try to close not restored tabs

BUG: 392565
FIXED-IN: 3.0.1
This commit is contained in:
David Rosca 2018-03-31 17:16:55 +02:00
parent 7c078ad70e
commit b6fa82aa8e
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -122,6 +122,9 @@ void DownloadManager::closeDownloadTab(const QUrl &url) const
{
// Attempt to close empty tab that was opened only for loading the download url
auto testWebView = [](TabbedWebView *view, const QUrl &url) {
if (!view->webTab()->isRestored()) {
return false;
}
if (view->browserWindow()->tabWidget()->tabBar()->normalTabsCount() < 2) {
return false;
}