mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
When downloading a file from a blank tab with no history (fe. from
target="_blank" link), the blank tab will be closed after starting download
This commit is contained in:
parent
ff34a62a79
commit
8b9bfd7c0d
@ -92,6 +92,8 @@ DownloadItem::DownloadItem(QListWidgetItem* item, QNetworkReply* reply, QString
|
||||
m_downloadPage = webPage->mainFrame()->url();
|
||||
else if (webPage->history()->canGoBack())
|
||||
m_downloadPage = webPage->history()->backItem().url();
|
||||
else if (webPage->history()->count() == 0)
|
||||
webPage->getView()->closeTab();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,6 +45,7 @@ public:
|
||||
void populateNetworkRequest(QNetworkRequest &request);
|
||||
~WebPage();
|
||||
|
||||
WebView* getView() { return m_view; }
|
||||
void setSSLCertificate(const QSslCertificate &cert);
|
||||
QSslCertificate sslCertificate();
|
||||
QString userAgentForUrl(const QUrl &url) const;
|
||||
|
@ -69,6 +69,7 @@ public slots:
|
||||
void slotReload(){ if (page()) {emit ipChanged(m_currentIp); page()->triggerAction(QWebPage::Reload);} }
|
||||
void iconChanged();
|
||||
void selectAll();
|
||||
void closeTab();
|
||||
|
||||
void zoomIn();
|
||||
void zoomOut();
|
||||
@ -90,7 +91,6 @@ private slots:
|
||||
void linkHovered(const QString &link, const QString &title, const QString &content);
|
||||
void openUrlInNewWindow();
|
||||
void openUrlInNewTab();
|
||||
void closeTab();
|
||||
void downloadLinkToDisk();
|
||||
void sendLinkByMail();
|
||||
void bookmarkLink();
|
||||
|
Loading…
Reference in New Issue
Block a user