summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-03-12 15:41:33 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-03-13 09:46:14 +0000
commitce6d684fe5043e3368bf0a130ff0fab48eccf852 (patch)
tree99a53cce8800bb9f884ed6f61505bd0907823c1a
parent60d8d3dcd2a8337e4038a498f92a97624438b2fb (diff)
Fix settings menu in qtquicktestbrowser
Changing the default settings has no effect. Instead use declare the settings properly declaratively. Change-Id: Ie1f5ca0b91a54df759031487bfc45fd3c362cfb0 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
-rw-r--r--tests/quicktestbrowser/BrowserWindow.qml13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/quicktestbrowser/BrowserWindow.qml b/tests/quicktestbrowser/BrowserWindow.qml
index 9e9f7364..3f7897f0 100644
--- a/tests/quicktestbrowser/BrowserWindow.qml
+++ b/tests/quicktestbrowser/BrowserWindow.qml
@@ -72,6 +72,7 @@ ApplicationWindow {
title: currentWebView && currentWebView.title
Settings {
+ id : appSettings
property alias autoLoadImages: loadImages.checked;
property alias javaScriptEnabled: javaScriptEnabled.checked;
property alias errorPageEnabled: errorPageEnabled.checked;
@@ -244,22 +245,19 @@ ApplicationWindow {
id: loadImages
text: "Autoload images"
checkable: true
- checked: WebEngine.settings.autoLoadImages
- onCheckedChanged: WebEngine.settings.autoLoadImages = checked
+ checked: true
}
MenuItem {
id: javaScriptEnabled
text: "JavaScript On"
checkable: true
- checked: WebEngine.settings.javascriptEnabled
- onCheckedChanged: WebEngine.settings.javascriptEnabled = checked
+ checked: true
}
MenuItem {
id: errorPageEnabled
text: "ErrorPage On"
checkable: true
- checked: WebEngine.settings.errorPageEnabled
- onCheckedChanged: WebEngine.settings.errorPageEnabled = checked
+ checked: true
}
MenuItem {
id: offTheRecordEnabled
@@ -359,6 +357,9 @@ ApplicationWindow {
}
}
]
+ settings.autoLoadImages: appSettings.autoLoadImages
+ settings.javascriptEnabled: appSettings.javaScriptEnabled
+ settings.errorPageEnabled: appSettings.errorPageEnabled
onCertificateError: {
if (!acceptedCertificates.shouldAutoAccept(error)){