mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56: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();
|
m_downloadPage = webPage->mainFrame()->url();
|
||||||
else if (webPage->history()->canGoBack())
|
else if (webPage->history()->canGoBack())
|
||||||
m_downloadPage = webPage->history()->backItem().url();
|
m_downloadPage = webPage->history()->backItem().url();
|
||||||
|
else if (webPage->history()->count() == 0)
|
||||||
|
webPage->getView()->closeTab();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ public:
|
|||||||
void populateNetworkRequest(QNetworkRequest &request);
|
void populateNetworkRequest(QNetworkRequest &request);
|
||||||
~WebPage();
|
~WebPage();
|
||||||
|
|
||||||
|
WebView* getView() { return m_view; }
|
||||||
void setSSLCertificate(const QSslCertificate &cert);
|
void setSSLCertificate(const QSslCertificate &cert);
|
||||||
QSslCertificate sslCertificate();
|
QSslCertificate sslCertificate();
|
||||||
QString userAgentForUrl(const QUrl &url) const;
|
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 slotReload(){ if (page()) {emit ipChanged(m_currentIp); page()->triggerAction(QWebPage::Reload);} }
|
||||||
void iconChanged();
|
void iconChanged();
|
||||||
void selectAll();
|
void selectAll();
|
||||||
|
void closeTab();
|
||||||
|
|
||||||
void zoomIn();
|
void zoomIn();
|
||||||
void zoomOut();
|
void zoomOut();
|
||||||
@ -90,7 +91,6 @@ private slots:
|
|||||||
void linkHovered(const QString &link, const QString &title, const QString &content);
|
void linkHovered(const QString &link, const QString &title, const QString &content);
|
||||||
void openUrlInNewWindow();
|
void openUrlInNewWindow();
|
||||||
void openUrlInNewTab();
|
void openUrlInNewTab();
|
||||||
void closeTab();
|
|
||||||
void downloadLinkToDisk();
|
void downloadLinkToDisk();
|
||||||
void sendLinkByMail();
|
void sendLinkByMail();
|
||||||
void bookmarkLink();
|
void bookmarkLink();
|
||||||
|
Loading…
Reference in New Issue
Block a user