mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
Revert "[jsoptions] Added "Disable or change context menu" option"
It broke Inspect Element action.
This reverts commit f6de3bd5a0
.
This commit is contained in:
parent
a1a8fb90f5
commit
0133886b06
|
@ -50,7 +50,6 @@ void QzSettings::loadSettings()
|
||||||
allowJsHideMenuBar = settings.value("allowJavaScriptHideMenuBar", true).toBool();
|
allowJsHideMenuBar = settings.value("allowJavaScriptHideMenuBar", true).toBool();
|
||||||
allowJsHideStatusBar = settings.value("allowJavaScriptHideStatusBar", true).toBool();
|
allowJsHideStatusBar = settings.value("allowJavaScriptHideStatusBar", true).toBool();
|
||||||
allowJsHideToolBar = settings.value("allowJavaScriptHideToolBar", true).toBool();
|
allowJsHideToolBar = settings.value("allowJavaScriptHideToolBar", true).toBool();
|
||||||
allowJsDisableContextMenu = settings.value("allowJavaScriptDisableContextMenu", true).toBool();
|
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
settings.beginGroup("Browser-Tabs-Settings");
|
settings.beginGroup("Browser-Tabs-Settings");
|
||||||
|
|
|
@ -51,7 +51,6 @@ public:
|
||||||
bool allowJsHideMenuBar;
|
bool allowJsHideMenuBar;
|
||||||
bool allowJsHideStatusBar;
|
bool allowJsHideStatusBar;
|
||||||
bool allowJsHideToolBar;
|
bool allowJsHideToolBar;
|
||||||
bool allowJsDisableContextMenu;
|
|
||||||
|
|
||||||
QStringList autoOpenProtocols;
|
QStringList autoOpenProtocols;
|
||||||
QStringList blockedProtocols;
|
QStringList blockedProtocols;
|
||||||
|
|
|
@ -39,7 +39,6 @@ JsOptions::JsOptions(QWidget* parent)
|
||||||
ui->jscanHideMenu->setChecked(settings.value("allowJavaScriptHideMenuBar", true).toBool());
|
ui->jscanHideMenu->setChecked(settings.value("allowJavaScriptHideMenuBar", true).toBool());
|
||||||
ui->jscanHideStatus->setChecked(settings.value("allowJavaScriptHideStatusBar", true).toBool());
|
ui->jscanHideStatus->setChecked(settings.value("allowJavaScriptHideStatusBar", true).toBool());
|
||||||
ui->jscanHideTool->setChecked(settings.value("allowJavaScriptHideToolBar", true).toBool());
|
ui->jscanHideTool->setChecked(settings.value("allowJavaScriptHideToolBar", true).toBool());
|
||||||
ui->jscanDisableContextMenu->setChecked(settings.value("allowJavaScriptDisableContextMenu", true).toBool());
|
|
||||||
ui->jscanAccessClipboard->setChecked(settings.value("allowJavaScriptAccessClipboard", false).toBool());
|
ui->jscanAccessClipboard->setChecked(settings.value("allowJavaScriptAccessClipboard", false).toBool());
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
|
@ -60,7 +59,6 @@ void JsOptions::accept()
|
||||||
settings.setValue("allowJavaScriptHideMenuBar", ui->jscanHideMenu->isChecked());
|
settings.setValue("allowJavaScriptHideMenuBar", ui->jscanHideMenu->isChecked());
|
||||||
settings.setValue("allowJavaScriptHideStatusBar", ui->jscanHideStatus->isChecked());
|
settings.setValue("allowJavaScriptHideStatusBar", ui->jscanHideStatus->isChecked());
|
||||||
settings.setValue("allowJavaScriptHideToolBar", ui->jscanHideTool->isChecked());
|
settings.setValue("allowJavaScriptHideToolBar", ui->jscanHideTool->isChecked());
|
||||||
settings.setValue("allowJavaScriptDisableContextMenu", ui->jscanDisableContextMenu->isChecked());
|
|
||||||
settings.setValue("allowJavaScriptAccessClipboard", ui->jscanAccessClipboard->isChecked());
|
settings.setValue("allowJavaScriptAccessClipboard", ui->jscanAccessClipboard->isChecked());
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>240</width>
|
<width>214</width>
|
||||||
<height>286</height>
|
<height>261</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -78,13 +78,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="jscanDisableContextMenu">
|
|
||||||
<property name="text">
|
|
||||||
<string>Disable or change context menu</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="jscanAccessClipboard">
|
<widget class="QCheckBox" name="jscanAccessClipboard">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
|
@ -704,21 +704,6 @@ void WebView::showClickedFrameSource()
|
||||||
showSource(m_clickedFrame);
|
showSource(m_clickedFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WebView::event(QEvent* event)
|
|
||||||
{
|
|
||||||
if (event->type() == QEvent::ContextMenu && !qzSettings->allowJsDisableContextMenu) {
|
|
||||||
QContextMenuEvent* ev = static_cast<QContextMenuEvent*>(event);
|
|
||||||
const QWebHitTestResult &hitTest = page()->mainFrame()->hitTestContent(ev->pos());
|
|
||||||
|
|
||||||
if (!hitTest.isContentEditable()) {
|
|
||||||
contextMenuEvent(ev);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return QWebView::event(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
void WebView::printPage(QWebFrame* frame)
|
void WebView::printPage(QWebFrame* frame)
|
||||||
{
|
{
|
||||||
QPrintPreviewDialog* dialog = new QPrintPreviewDialog(this);
|
QPrintPreviewDialog* dialog = new QPrintPreviewDialog(this);
|
||||||
|
|
|
@ -124,7 +124,6 @@ protected slots:
|
||||||
void showClickedFrameSource();
|
void showClickedFrameSource();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool event(QEvent* event);
|
|
||||||
void wheelEvent(QWheelEvent* event);
|
void wheelEvent(QWheelEvent* event);
|
||||||
void mousePressEvent(QMouseEvent* event);
|
void mousePressEvent(QMouseEvent* event);
|
||||||
void mouseReleaseEvent(QMouseEvent* event);
|
void mouseReleaseEvent(QMouseEvent* event);
|
||||||
|
|
|
@ -1711,10 +1711,6 @@
|
||||||
<source>Access clipboard</source>
|
<source>Access clipboard</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Disable or change context menu</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>LicenseViewer</name>
|
<name>LicenseViewer</name>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user