Verified Commit bba91154 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

Clean up QML code a bit

parent 93221d0e
......@@ -179,8 +179,7 @@ WebEngineView {
Component.onCompleted: {
print("WebView completed.");
var settings = webEngineView.settings;
print("Settings: " + settings);
print("Settings: " + webEngineView.settings);
}
onIconChanged: {
......
......@@ -30,11 +30,6 @@ import org.kde.mobile.angelfish 1.0
Item {
id: navigation
anchors {
bottom: parent.bottom
left: parent.left
right: parent.right
}
height: expandedHeight
property bool navigationShown: true
......
......@@ -156,8 +156,7 @@ Kirigami.ScrollablePage {
}
onBaseUrlChanged: {
var t = UrlUtils.urlFromUserInput(baseUrl);
Settings.searchBaseUrl = t;
Settings.searchBaseUrl = UrlUtils.urlFromUserInput(baseUrl);
}
Component.onCompleted: {
......
......@@ -173,10 +173,12 @@ WebEngineView {
}
if (loadRequest.status === WebEngineView.LoadSucceededStatus) {
if (!privateMode) {
var request = new Object;// FIXME
request.url = currentWebView.url;
request.title = currentWebView.title;
request.icon = currentWebView.icon;
var request = {
url: currentWebView.url,
title: currentWebView.title,
icon: currentWebView.icon
}
BrowserManager.addToHistory(request);
BrowserManager.updateLastVisited(currentWebView.url);
}
......@@ -200,13 +202,12 @@ WebEngineView {
Component.onCompleted: {
print("WebView completed.");
var settings = webEngineView.settings;
print("Settings: " + settings);
print("Settings: " + webEngineView.settings);
}
onIconChanged: {
if (icon && !privateMode)
BrowserManager.updateIcon(url, icon)
if (icon && !privateMode)
BrowserManager.updateIcon(url, icon)
}
onNewViewRequested: {
......
......@@ -286,10 +286,11 @@ Kirigami.ApplicationWindow {
text: checked ? i18n("Bookmarked") : i18n("Bookmark")
onTriggered: {
if (checked) {
var request = new Object;// FIXME
request.url = currentWebView.url;
request.title = currentWebView.title;
request.icon = currentWebView.icon;
var request = {
url: currentWebView.url,
title: currentWebView.title,
icon: currentWebView.icon
}
BrowserManager.addBookmark(request);
} else {
BrowserManager.removeBookmark(currentWebView.url);
......@@ -335,6 +336,13 @@ Kirigami.ApplicationWindow {
// Bottom navigation bar
Navigation {
id: navigation
anchors {
bottom: parent.bottom
left: parent.left
right: parent.right
}
navigationShown: visible && rootPage.navigationAutoShow
visible: webBrowser.visibility !== Window.FullScreen && !findInPage.active
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment