mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +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();
|
||||
allowJsHideStatusBar = settings.value("allowJavaScriptHideStatusBar", true).toBool();
|
||||
allowJsHideToolBar = settings.value("allowJavaScriptHideToolBar", true).toBool();
|
||||
allowJsDisableContextMenu = settings.value("allowJavaScriptDisableContextMenu", true).toBool();
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup("Browser-Tabs-Settings");
|
||||
|
|
|
@ -51,7 +51,6 @@ public:
|
|||
bool allowJsHideMenuBar;
|
||||
bool allowJsHideStatusBar;
|
||||
bool allowJsHideToolBar;
|
||||
bool allowJsDisableContextMenu;
|
||||
|
||||
QStringList autoOpenProtocols;
|
||||
QStringList blockedProtocols;
|
||||
|
|
|
@ -39,7 +39,6 @@ JsOptions::JsOptions(QWidget* parent)
|
|||
ui->jscanHideMenu->setChecked(settings.value("allowJavaScriptHideMenuBar", true).toBool());
|
||||
ui->jscanHideStatus->setChecked(settings.value("allowJavaScriptHideStatusBar", 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());
|
||||
settings.endGroup();
|
||||
|
||||
|
@ -60,7 +59,6 @@ void JsOptions::accept()
|
|||
settings.setValue("allowJavaScriptHideMenuBar", ui->jscanHideMenu->isChecked());
|
||||
settings.setValue("allowJavaScriptHideStatusBar", ui->jscanHideStatus->isChecked());
|
||||
settings.setValue("allowJavaScriptHideToolBar", ui->jscanHideTool->isChecked());
|
||||
settings.setValue("allowJavaScriptDisableContextMenu", ui->jscanDisableContextMenu->isChecked());
|
||||
settings.setValue("allowJavaScriptAccessClipboard", ui->jscanAccessClipboard->isChecked());
|
||||
settings.endGroup();
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>240</width>
|
||||
<height>286</height>
|
||||
<width>214</width>
|
||||
<height>261</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -78,13 +78,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="jscanDisableContextMenu">
|
||||
<property name="text">
|
||||
<string>Disable or change context menu</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="jscanAccessClipboard">
|
||||
<property name="text">
|
||||
|
|
|
@ -704,21 +704,6 @@ void WebView::showClickedFrameSource()
|
|||
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)
|
||||
{
|
||||
QPrintPreviewDialog* dialog = new QPrintPreviewDialog(this);
|
||||
|
|
|
@ -124,7 +124,6 @@ protected slots:
|
|||
void showClickedFrameSource();
|
||||
|
||||
protected:
|
||||
bool event(QEvent* event);
|
||||
void wheelEvent(QWheelEvent* event);
|
||||
void mousePressEvent(QMouseEvent* event);
|
||||
void mouseReleaseEvent(QMouseEvent* event);
|
||||
|
|
|
@ -1711,10 +1711,6 @@
|
|||
<source>Access clipboard</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Disable or change context menu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LicenseViewer</name>
|
||||
|
|
Loading…
Reference in New Issue
Block a user