1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-24 04:36:34 +01:00

WebPage: Remove setJavaScriptEnabled method

This commit is contained in:
David Rosca 2018-01-09 14:14:15 +01:00
parent 6b90851d8c
commit 287631d37b
3 changed files with 2 additions and 9 deletions

View File

@ -583,11 +583,6 @@ void WebPage::javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, cons
std::cout << qPrintable(sourceID) << ":" << lineNumber << " " << qPrintable(message);
}
void WebPage::setJavaScriptEnabled(bool enabled)
{
settings()->setAttribute(QWebEngineSettings::JavascriptEnabled, enabled);
}
QWebEnginePage* WebPage::createWindow(QWebEnginePage::WebWindowType type)
{
TabbedWebView *tView = qobject_cast<TabbedWebView*>(view());

View File

@ -61,8 +61,6 @@ public:
void javaScriptAlert(const QUrl &securityOrigin, const QString &msg) Q_DECL_OVERRIDE;
void javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString &message, int lineNumber, const QString &sourceID) override;
void setJavaScriptEnabled(bool enabled);
bool hasMultipleUsernames() const;
QVector<PasswordEntry> autoFillData() const;

View File

@ -1,6 +1,6 @@
/* ============================================================
* StatusBarIcons - Extra icons in statusbar for Falkon
* Copyright (C) 2013-2017 David Rosca <nowrep@gmail.com>
* Copyright (C) 2013-2018 David Rosca <nowrep@gmail.com>
*
* 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
@ -88,7 +88,7 @@ void SBI_JavaScriptIcon::toggleJavaScript()
}
bool current = testCurrentPageWebAttribute(QWebEngineSettings::JavascriptEnabled);
currentPage()->setJavaScriptEnabled(!current);
setCurrentPageWebAttribute(QWebEngineSettings::JavascriptEnabled, !current);
m_window->weView()->reload();