1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

Do not add an item to history only if reloading.

Should fix #666.
This commit is contained in:
Franz Fellner 2012-12-08 21:18:30 +01:00
parent 4e114b69c5
commit 251ab8af66
2 changed files with 5 additions and 1 deletions

View File

@ -54,6 +54,7 @@ WebView::WebView(QWidget* parent)
, m_actionStop(0)
, m_actionsInitialized(false)
, m_disableTouchMocking(false)
, m_isReloading(false)
{
connect(this, SIGNAL(loadStarted()), this, SLOT(slotLoadStarted()));
connect(this, SIGNAL(loadProgress(int)), this, SLOT(slotLoadProgress(int)));
@ -294,6 +295,7 @@ void WebView::zoomReset()
void WebView::reload()
{
m_isReloading = true;
if (QWebView::url().isEmpty() && !m_aboutToLoadUrl.isEmpty()) {
load(m_aboutToLoadUrl);
return;
@ -357,12 +359,13 @@ void WebView::slotLoadFinished()
m_actionReload->setEnabled(true);
}
if (m_lastUrl != url()) {
if (!m_isReloading) {
mApp->history()->addHistoryEntry(this);
}
mApp->autoFill()->completePage(page());
m_isReloading = false;
m_lastUrl = url();
}

View File

@ -169,6 +169,7 @@ private:
bool m_actionsInitialized;
bool m_disableTouchMocking;
bool m_isReloading;
};
#endif // WEBVIEW_H