mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Merge pull request #670 from ff2000/master
Add history item in any case but reload()
This commit is contained in:
commit
712e5735b7
@ -65,7 +65,6 @@ void LocationCompleter::showMostVisited()
|
|||||||
void LocationCompleter::currentChanged(const QModelIndex &index)
|
void LocationCompleter::currentChanged(const QModelIndex &index)
|
||||||
{
|
{
|
||||||
if (m_ignoreCurrentChangedSignal) {
|
if (m_ignoreCurrentChangedSignal) {
|
||||||
m_ignoreCurrentChangedSignal = false;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,6 +123,7 @@ void LocationCompleter::adjustPopupSize()
|
|||||||
s_view->resize(s_view->width(), popupHeight);
|
s_view->resize(s_view->width(), popupHeight);
|
||||||
m_ignoreCurrentChangedSignal = true;
|
m_ignoreCurrentChangedSignal = true;
|
||||||
s_view->setCurrentIndex(QModelIndex());
|
s_view->setCurrentIndex(QModelIndex());
|
||||||
|
m_ignoreCurrentChangedSignal = false;
|
||||||
s_view->show();
|
s_view->show();
|
||||||
|
|
||||||
m_originalText = m_locationBar->text();
|
m_originalText = m_locationBar->text();
|
||||||
|
@ -54,6 +54,7 @@ WebView::WebView(QWidget* parent)
|
|||||||
, m_actionStop(0)
|
, m_actionStop(0)
|
||||||
, m_actionsInitialized(false)
|
, m_actionsInitialized(false)
|
||||||
, m_disableTouchMocking(false)
|
, m_disableTouchMocking(false)
|
||||||
|
, m_isReloading(false)
|
||||||
{
|
{
|
||||||
connect(this, SIGNAL(loadStarted()), this, SLOT(slotLoadStarted()));
|
connect(this, SIGNAL(loadStarted()), this, SLOT(slotLoadStarted()));
|
||||||
connect(this, SIGNAL(loadProgress(int)), this, SLOT(slotLoadProgress(int)));
|
connect(this, SIGNAL(loadProgress(int)), this, SLOT(slotLoadProgress(int)));
|
||||||
@ -294,6 +295,7 @@ void WebView::zoomReset()
|
|||||||
|
|
||||||
void WebView::reload()
|
void WebView::reload()
|
||||||
{
|
{
|
||||||
|
m_isReloading = true;
|
||||||
if (QWebView::url().isEmpty() && !m_aboutToLoadUrl.isEmpty()) {
|
if (QWebView::url().isEmpty() && !m_aboutToLoadUrl.isEmpty()) {
|
||||||
load(m_aboutToLoadUrl);
|
load(m_aboutToLoadUrl);
|
||||||
return;
|
return;
|
||||||
@ -357,12 +359,13 @@ void WebView::slotLoadFinished()
|
|||||||
m_actionReload->setEnabled(true);
|
m_actionReload->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_lastUrl != url()) {
|
if (!m_isReloading) {
|
||||||
mApp->history()->addHistoryEntry(this);
|
mApp->history()->addHistoryEntry(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
mApp->autoFill()->completePage(page());
|
mApp->autoFill()->completePage(page());
|
||||||
|
|
||||||
|
m_isReloading = false;
|
||||||
m_lastUrl = url();
|
m_lastUrl = url();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,6 +169,7 @@ private:
|
|||||||
bool m_actionsInitialized;
|
bool m_actionsInitialized;
|
||||||
|
|
||||||
bool m_disableTouchMocking;
|
bool m_disableTouchMocking;
|
||||||
|
bool m_isReloading;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // WEBVIEW_H
|
#endif // WEBVIEW_H
|
||||||
|
Loading…
Reference in New Issue
Block a user