mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Fixed toggling WebInspector. It now shows correct inspector everytime.
This commit is contained in:
parent
d5638fbc27
commit
bb8e1ffdb5
@ -1316,7 +1316,7 @@ void QupZilla::showWebInspector(bool toggle)
|
||||
{
|
||||
if (m_webInspectorDock) {
|
||||
if (toggle) {
|
||||
m_webInspectorDock.data()->setVisible(!m_webInspectorDock.data()->isVisible());
|
||||
m_webInspectorDock.data()->toggleVisibility();
|
||||
}
|
||||
else {
|
||||
m_webInspectorDock.data()->show();
|
||||
|
@ -58,10 +58,12 @@ QupZillaSchemeReply::QupZillaSchemeReply(const QNetworkRequest &req, QObject* pa
|
||||
setOperation(QNetworkAccessManager::GetOperation);
|
||||
setRequest(req);
|
||||
setUrl(req.url());
|
||||
|
||||
m_pageName = req.url().path();
|
||||
if (m_pageName == "about" || m_pageName == "reportbug" || m_pageName == "start" ||
|
||||
m_pageName == "speeddial" || m_pageName == "config") {
|
||||
|
||||
QStringList knownPages;
|
||||
knownPages << "about" << "reportbug" << "start" << "speeddial" << "config";
|
||||
|
||||
if (knownPages.contains(m_pageName)) {
|
||||
m_buffer.open(QIODevice::ReadWrite);
|
||||
setError(QNetworkReply::NoError, tr("No Error"));
|
||||
|
||||
|
@ -34,6 +34,16 @@ WebInspectorDockWidget::WebInspectorDockWidget(QupZilla* mainClass)
|
||||
show();
|
||||
}
|
||||
|
||||
void WebInspectorDockWidget::toggleVisibility()
|
||||
{
|
||||
if (isVisible()) {
|
||||
close();
|
||||
}
|
||||
else {
|
||||
show();
|
||||
}
|
||||
}
|
||||
|
||||
void WebInspectorDockWidget::close()
|
||||
{
|
||||
p_QupZilla->weView()->webTab()->setInspectorVisible(false);
|
||||
|
@ -44,6 +44,8 @@ public:
|
||||
explicit WebInspectorDockWidget(QupZilla* mainClass);
|
||||
~WebInspectorDockWidget();
|
||||
|
||||
void toggleVisibility();
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
@ -294,7 +294,7 @@ void WebPage::featurePermissionRequested(QWebFrame* frame, const QWebPage::Featu
|
||||
}
|
||||
#endif
|
||||
|
||||
bool WebPage::event(QEvent *event)
|
||||
bool WebPage::event(QEvent* event)
|
||||
{
|
||||
if (event->type() == QEvent::Leave) {
|
||||
// QWebPagePrivate::leaveEvent():
|
||||
|
@ -20,6 +20,8 @@ RESOURCES = akn_res.qrc
|
||||
TRANSLATIONS = \
|
||||
translations/cs_CZ.ts \
|
||||
translations/de_DE.ts \
|
||||
translations/id_ID.ts \
|
||||
translations/ja_JP.ts \
|
||||
translations/nl_NL.ts \
|
||||
translations/sr_BA.ts \
|
||||
translations/sr_RS.ts \
|
||||
|
@ -4,6 +4,8 @@
|
||||
<file>data/copyright</file>
|
||||
<file>locale/cs_CZ.qm</file>
|
||||
<file>locale/de_DE.qm</file>
|
||||
<file>locale/id_ID.qm</file>
|
||||
<file>locale/ja_JP.qm</file>
|
||||
<file>locale/nl_NL.qm</file>
|
||||
<file>locale/sr_BA.qm</file>
|
||||
<file>locale/sr_RS.qm</file>
|
||||
|
@ -28,6 +28,8 @@ RESOURCES = mousegestures.qrc
|
||||
TRANSLATIONS = \
|
||||
translations/cs_CZ.ts \
|
||||
translations/de_DE.ts \
|
||||
translations/id_ID.ts \
|
||||
translations/ja_JP.ts \
|
||||
translations/nl_NL.ts \
|
||||
translations/sk_SK.ts \
|
||||
translations/sr_BA.ts \
|
||||
|
@ -14,6 +14,8 @@
|
||||
<file>data/copyright</file>
|
||||
<file>locale/cs_CZ.qm</file>
|
||||
<file>locale/de_DE.qm</file>
|
||||
<file>locale/id_ID.qm</file>
|
||||
<file>locale/ja_JP.qm</file>
|
||||
<file>locale/nl_NL.qm</file>
|
||||
<file>locale/sk_SK.qm</file>
|
||||
<file>locale/sr_BA.qm</file>
|
||||
|
Loading…
Reference in New Issue
Block a user