mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
WebInspector: Don't show inspector actions when JavaScript is disabled
WebInspector doesn't work without JavaScript.
This commit is contained in:
parent
8fd47fe27d
commit
7cd86e144b
|
@ -24,6 +24,7 @@
|
|||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <QNetworkReply>
|
||||
#include <QWebEngineSettings>
|
||||
|
||||
QList<QWebEngineView*> WebInspector::s_views;
|
||||
|
||||
|
@ -85,7 +86,13 @@ void WebInspector::inspectElement()
|
|||
|
||||
bool WebInspector::isEnabled()
|
||||
{
|
||||
return qEnvironmentVariableIsSet("QTWEBENGINE_REMOTE_DEBUGGING");
|
||||
if (!qEnvironmentVariableIsSet("QTWEBENGINE_REMOTE_DEBUGGING")) {
|
||||
return false;
|
||||
}
|
||||
if (!QWebEngineSettings::defaultSettings()->testAttribute(QWebEngineSettings::JavascriptEnabled)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void WebInspector::pushView(QWebEngineView *view)
|
||||
|
|
Loading…
Reference in New Issue
Block a user