mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
TabbedWebView: Bring back showing hovered link url in statusbar
This commit is contained in:
parent
286c714593
commit
e854afb5d3
|
@ -1,6 +1,6 @@
|
||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - WebKit based browser
|
||||||
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2015 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -130,9 +130,10 @@ void StatusBarMessage::showMessage(const QString &message)
|
||||||
|
|
||||||
int horizontalScrollSize = 0;
|
int horizontalScrollSize = 0;
|
||||||
int verticalScrollSize = 0;
|
int verticalScrollSize = 0;
|
||||||
const int scrollbarSize = m_window->style()->pixelMetric(QStyle::PM_ScrollBarExtent);
|
|
||||||
|
|
||||||
#if QTWEBENGINE_DISABLED
|
#if QTWEBENGINE_DISABLED
|
||||||
|
const int scrollbarSize = m_window->style()->pixelMetric(QStyle::PM_ScrollBarExtent);
|
||||||
|
|
||||||
if (mainFrame->scrollBarMaximum(Qt::Horizontal)) {
|
if (mainFrame->scrollBarMaximum(Qt::Horizontal)) {
|
||||||
horizontalScrollSize = scrollbarSize;
|
horizontalScrollSize = scrollbarSize;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - WebKit based browser
|
||||||
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2015 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -57,9 +57,7 @@ void TabbedWebView::setWebPage(WebPage* page)
|
||||||
page->setParent(this);
|
page->setParent(this);
|
||||||
setPage(page);
|
setPage(page);
|
||||||
|
|
||||||
#if QTWEBENGINE_DISABLED
|
connect(page, &WebPage::linkHovered, this, &TabbedWebView::linkHovered);
|
||||||
connect(page, SIGNAL(linkHovered(QString,QString,QString)), this, SLOT(linkHovered(QString,QString,QString)));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BrowserWindow* TabbedWebView::browserWindow() const
|
BrowserWindow* TabbedWebView::browserWindow() const
|
||||||
|
@ -160,20 +158,13 @@ void TabbedWebView::setIp(const QHostInfo &info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabbedWebView::linkHovered(const QString &link, const QString &title, const QString &content)
|
void TabbedWebView::linkHovered(const QString &link)
|
||||||
{
|
{
|
||||||
Q_UNUSED(title)
|
|
||||||
Q_UNUSED(content)
|
|
||||||
|
|
||||||
if (m_webTab->isCurrentTab() && m_window) {
|
if (m_webTab->isCurrentTab() && m_window) {
|
||||||
if (link.isEmpty()) {
|
if (link.isEmpty()) {
|
||||||
m_window->statusBarMessage()->clearMessage();
|
m_window->statusBarMessage()->clearMessage();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// QUrl::fromEncoded(link.toUtf8());
|
|
||||||
// Don't decode link from percent encoding (to show all utf8 chars), as it doesn't
|
|
||||||
// works correctly in all cases
|
|
||||||
// See #1095
|
|
||||||
m_window->statusBarMessage()->showMessage(link);
|
m_window->statusBarMessage()->showMessage(link);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - WebKit based browser
|
||||||
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2015 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -67,7 +67,7 @@ private slots:
|
||||||
void slotLoadFinished();
|
void slotLoadFinished();
|
||||||
void slotLoadProgress(int prog);
|
void slotLoadProgress(int prog);
|
||||||
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);
|
||||||
void setIp(const QHostInfo &info);
|
void setIp(const QHostInfo &info);
|
||||||
|
|
||||||
void inspectElement();
|
void inspectElement();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user