1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02:00

Fixed unwanted updating history by reloading current web page (for

example sunSpider test)
This commit is contained in:
nowrep 2011-03-10 16:23:53 +01:00
parent 6414c808dc
commit a51ad25981
2 changed files with 8 additions and 6 deletions

View File

@ -37,6 +37,7 @@ WebView::WebView(QupZilla* mainClass, QWidget *parent)
,m_isLoading(false)
,m_currentZoom(100)
,m_aboutToLoadUrl(QUrl())
,m_lastUrl(QUrl())
,m_wantsClose(false)
,m_page(new WebPage(this, p_QupZilla))
//,m_loadingTimer(0)
@ -188,15 +189,15 @@ void WebView::loadFinished(bool state)
if (m_progress>100) qDebug() << "bug"; //cannot be more than 100
m_isLoading = false;
mApp->history()->addHistoryEntry(this);
if (isCurrent()) {
if (m_lastUrl!=url())
mApp->history()->addHistoryEntry(this);
if (isCurrent())
emit showUrl(url());
}
iconChanged();
if (!p_QupZilla->locationBar()->hasFocus())
setFocus();
m_lastUrl = url();
// if (!p_QupZilla->locationBar()->hasFocus()) Ok lets disable it, confusing with gaining focus
// setFocus();
//Fix the bug where sometimes icon is not available at the moment
if (icon().isNull())

View File

@ -121,6 +121,7 @@ private:
QList<int> m_zoomLevels;
int m_currentZoom;
QUrl m_aboutToLoadUrl;
QUrl m_lastUrl;
bool m_wantsClose;
QString m_currentIp;
QList<QPair<QString,QString> > m_rss;