mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
Implement QtWE ScreenCaptureEnabled option
BUG: 431004 Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
parent
fb03989114
commit
f7b372098e
|
@ -976,6 +976,7 @@ void MainApplication::loadSettings()
|
|||
|
||||
#if QTWEBENGINEWIDGETS_VERSION >= QT_VERSION_CHECK(5, 13, 0)
|
||||
webSettings->setAttribute(QWebEngineSettings::PdfViewerEnabled, settings.value(QSL("intPDFViewer"), false).toBool());
|
||||
webSettings->setAttribute(QWebEngineSettings::ScreenCaptureEnabled, settings.value(QSL("screenCaptureEnabled"), false).toBool());
|
||||
#endif
|
||||
|
||||
webSettings->setDefaultTextEncoding(settings.value(QSL("DefaultEncoding"), webSettings->defaultTextEncoding()).toString());
|
||||
|
|
|
@ -123,8 +123,10 @@ Preferences::Preferences(BrowserWindow* window)
|
|||
|
||||
#if QTWEBENGINEWIDGETS_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||
ui->intPDFViewer->setVisible(false);
|
||||
ui->screenCaptureEnabled->setVisible(false);
|
||||
#endif
|
||||
|
||||
|
||||
auto setCategoryIcon = [this](int index, const QIcon &icon) {
|
||||
ui->listWidget->item(index)->setIcon(QIcon(icon.pixmap(32)));
|
||||
};
|
||||
|
@ -302,6 +304,7 @@ Preferences::Preferences(BrowserWindow* window)
|
|||
ui->dnsPrefetch->setChecked(settings.value("DNSPrefetch", true).toBool());
|
||||
ui->intPDFViewer->setChecked(settings.value("intPDFViewer", false).toBool());
|
||||
ui->intPDFViewer->setEnabled(ui->allowPlugins->isChecked());
|
||||
ui->screenCaptureEnabled->setChecked(settings.value("screenCaptureEnabled", false).toBool());
|
||||
|
||||
const auto levels = WebView::zoomLevels();
|
||||
for (int level : levels) {
|
||||
|
@ -972,6 +975,7 @@ void Preferences::saveSettings()
|
|||
settings.setValue("WebRTCPublicIpOnly", ui->webRTCPublicIpOnly->isChecked());
|
||||
settings.setValue("DNSPrefetch", ui->dnsPrefetch->isChecked());
|
||||
settings.setValue("intPDFViewer", ui->intPDFViewer->isChecked());
|
||||
settings.setValue("screenCaptureEnabled", ui->screenCaptureEnabled->isChecked());
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
settings.setValue("CheckDefaultBrowser", ui->checkDefaultBrowser->isChecked());
|
||||
|
|
|
@ -1089,6 +1089,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="screenCaptureEnabled">
|
||||
<property name="text">
|
||||
<string>Enable screen capture</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
|
|
Loading…
Reference in New Issue
Block a user