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

[TabIcons] Fixed incorrectly showing icon of tabs in some rare cases.

It now correctly shows error sign on tab when error page is loaded.
This commit is contained in:
nowrep 2013-03-14 15:25:40 +01:00
parent 79567c5896
commit ff55c915b3
2 changed files with 1 additions and 14 deletions

View File

@ -51,7 +51,7 @@ TabbedWebView::TabbedWebView(QupZilla* mainClass, WebTab* webTab)
connect(this, SIGNAL(urlChanged(QUrl)), this, SLOT(urlChanged(QUrl))); connect(this, SIGNAL(urlChanged(QUrl)), this, SLOT(urlChanged(QUrl)));
connect(this, SIGNAL(titleChanged(QString)), this, SLOT(titleChanged())); connect(this, SIGNAL(titleChanged(QString)), this, SLOT(titleChanged()));
connect(this, SIGNAL(iconChanged()), this, SLOT(slotIconChanged())); connect(this, SIGNAL(iconChanged()), this, SLOT(showIcon()));
connect(this, SIGNAL(statusBarMessage(QString)), p_QupZilla->statusBar(), SLOT(showMessage(QString))); connect(this, SIGNAL(statusBarMessage(QString)), p_QupZilla->statusBar(), SLOT(showMessage(QString)));
@ -70,18 +70,6 @@ void TabbedWebView::setWebPage(WebPage* page)
connect(page, SIGNAL(linkHovered(QString,QString,QString)), this, SLOT(linkHovered(QString,QString,QString))); connect(page, SIGNAL(linkHovered(QString,QString,QString)), this, SLOT(linkHovered(QString,QString,QString)));
} }
void TabbedWebView::slotIconChanged()
{
const QString &urlScheme = url().scheme();
if (urlScheme == QLatin1String("file") || urlScheme == QLatin1String("qupzilla")
|| title().contains(tr("Failed loading page"))) {
return;
}
showIcon();
}
void TabbedWebView::inspectElement() void TabbedWebView::inspectElement()
{ {
p_QupZilla->showWebInspector(false); p_QupZilla->showWebInspector(false);

View File

@ -75,7 +75,6 @@ private slots:
void urlChanged(const QUrl &url); void urlChanged(const QUrl &url);
void linkHovered(const QString &link, const QString &title, const QString &content); void linkHovered(const QString &link, const QString &title, const QString &content);
void setIp(const QHostInfo &info); void setIp(const QHostInfo &info);
void slotIconChanged();
void inspectElement(); void inspectElement();