summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2017-05-02 16:10:55 +0200
committerKai Koehne <kai.koehne@qt.io>2017-05-02 14:54:27 +0000
commit9265be9445ebd3bcd404dcca9186a1abc5c454cd (patch)
treee99d69a1030d836740dcee081feaba6fc906e09d
parent8fb1dbef9c6606b49371f4c7baa8a21419146990 (diff)
QuickNanoBrowser: Code cleanup
Fixes following warnings: error: Unknown component. (M300) warning: == and != may perform type coercion, use === or !== to avoid it. (M126) error: "autoLoadIconsForPage" is not a member of "WebEngineSettings". (M18) error: "touchIconsEnabled" is not a member of "WebEngineSettings". (M18) warning: "tab" is declared more than once. (M107) Also sort import list. Change-Id: I859ee341a7a84494975aea8ec5fb0d988a90d2b9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--examples/webengine/quicknanobrowser/BrowserWindow.qml15
1 files changed, 8 insertions, 7 deletions
diff --git a/examples/webengine/quicknanobrowser/BrowserWindow.qml b/examples/webengine/quicknanobrowser/BrowserWindow.qml
index c008425d..b53db9bd 100644
--- a/examples/webengine/quicknanobrowser/BrowserWindow.qml
+++ b/examples/webengine/quicknanobrowser/BrowserWindow.qml
@@ -48,15 +48,16 @@
**
****************************************************************************/
+import Qt.labs.settings 1.0
+import QtQml 2.2
import QtQuick 2.2
-import QtWebEngine 1.2
import QtQuick.Controls 1.0
+import QtQuick.Controls.Private 1.0
import QtQuick.Controls.Styles 1.0
+import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.0
import QtQuick.Window 2.1
-import QtQuick.Controls.Private 1.0
-import QtQuick.Dialogs 1.2
-import Qt.labs.settings 1.0
+import QtWebEngine 1.3
ApplicationWindow {
id: browserWindow
@@ -294,7 +295,7 @@ ApplicationWindow {
id: httpDiskCacheEnabled
text: "HTTP Disk Cache"
checkable: !currentWebView.profile.offTheRecord
- checked: (currentWebView.profile.httpCacheType == WebEngineProfile.DiskHttpCache)
+ checked: (currentWebView.profile.httpCacheType === WebEngineProfile.DiskHttpCache)
onToggled: currentWebView.profile.httpCacheType = checked ? WebEngineProfile.DiskHttpCache : WebEngineProfile.MemoryHttpCache
}
MenuItem {
@@ -397,8 +398,8 @@ ApplicationWindow {
tabs.currentIndex = tabs.count - 1
request.openIn(tab.item)
} else if (request.destination == WebEngineView.NewViewInBackgroundTab) {
- var tab = tabs.createEmptyTab(currentWebView.profile)
- request.openIn(tab.item)
+ var backgroundTab = tabs.createEmptyTab(currentWebView.profile)
+ request.openIn(backgroundTab.item)
} else if (request.destination == WebEngineView.NewViewInDialog) {
var dialog = applicationRoot.createDialog(currentWebView.profile)
request.openIn(dialog.currentWebView)