DownloadManager: Don't try to close not restored tabs

BUG: 392565
FIXED-IN: 3.0.1
remotes/origin/Falkon/3.0
David Rosca 8 years ago
parent 7c078ad70e
commit b6fa82aa8e
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
  1. 3
      src/lib/downloads/downloadmanager.cpp

@ -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;
}

Loading…
Cancel
Save