1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Fixed updating url in locationbar when browsing through history back and

forward
This commit is contained in:
nowrep 2011-10-15 18:08:52 +02:00
parent 722a79aef1
commit e263572e56
4 changed files with 9 additions and 19 deletions

View File

@ -20,7 +20,7 @@
#include "qupzilla.h"
#include "webpage.h"
AdBlockIcon::AdBlockIcon(QupZilla *mainClass, QWidget *parent)
AdBlockIcon::AdBlockIcon(QupZilla* mainClass, QWidget* parent)
: ClickableLabel(parent)
, p_QupZilla(mainClass)
{

View File

@ -237,8 +237,6 @@ int TabWidget::addView(QUrl url, const QString &title, OpenUrlIn openIn, bool se
tabBar()->setTabsClosable(false);
else tabBar()->setTabsClosable(true);
// connect(weView(index), SIGNAL(siteIconChanged()), p_QupZilla->locationBar(), SLOT(siteIconChanged()));
// connect(weView(index), SIGNAL(showUrl(QUrl)), p_QupZilla->locationBar(), SLOT(showUrl(QUrl)));
connect(webView, SIGNAL(wantsCloseTab(int)), this, SLOT(closeTab(int)));
connect(webView, SIGNAL(changed()), mApp, SLOT(setStateChanged()));
connect(webView, SIGNAL(ipChanged(QString)), p_QupZilla->ipLabel(), SLOT(setText(QString)));

View File

@ -45,7 +45,7 @@ WebTab::WebTab(QupZilla* mainClass, LocationBar* locationBar)
connect(m_view, SIGNAL(iconChanged()), m_locationBar, SLOT(siteIconChanged()));
connect(m_view, SIGNAL(loadStarted()), m_locationBar, SLOT(clearIcon()));
connect(m_view, SIGNAL(loadFinished(bool)), m_locationBar, SLOT(siteIconChanged()));
connect(m_view, SIGNAL(urlChanged(QUrl)), m_locationBar, SLOT(showUrl(QUrl)));
connect(m_view, SIGNAL(showUrl(QUrl)), m_locationBar, SLOT(showUrl(QUrl)));
connect(m_view, SIGNAL(rssChanged(bool)), m_locationBar, SLOT(showRSSIcon(bool)));
connect(m_view->webPage(), SIGNAL(privacyChanged(bool)), m_locationBar, SLOT(setPrivacy(bool)));
}

View File

@ -118,12 +118,13 @@ bool WebView::isCurrent()
void WebView::urlChanged(const QUrl &url)
{
if (isCurrent()) {
emit showUrl(url);
if (isCurrent())
p_QupZilla->navigationBar()->refreshHistory();
}
if (m_lastUrl != url)
emit changed();
emit showUrl(url);
}
void WebView::linkClicked(const QUrl &url)
@ -134,9 +135,6 @@ void WebView::linkClicked(const QUrl &url)
void WebView::setProgress(int prog)
{
m_progress = prog;
if (isCurrent()) {
emit showUrl(url());
}
checkRss();
if (isCurrent()) {
@ -156,10 +154,6 @@ void WebView::loadStarted()
if (title().isNull())
tabWidget()->setTabText(tabIndex(),tr("Loading..."));
if (isCurrent()) {
emit showUrl(url());
}
m_currentIp.clear();
// if (m_loadingTimer)
@ -216,18 +210,16 @@ void WebView::setIp(const QHostInfo &info)
void WebView::loadFinished(bool state)
{
Q_UNUSED(state);
if (!animationLoading(tabIndex(), false))
return;
if (animationLoading(tabIndex(), false)->movie())
animationLoading(tabIndex(), false)->movie()->stop();
m_isLoading = false;
if (m_lastUrl!=url())
if (m_lastUrl != url())
mApp->history()->addHistoryEntry(this);
if (isCurrent())
emit showUrl(url());
emit showUrl(url());
iconChanged();
m_lastUrl = url();