mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 20:42:56 +02:00
Merge pull request #10104 from druiz17/tablet-webView3.0
Remove unnecessary prints and code for tabletWebView.qml
This commit is contained in:
commit
cb787c2862
2 changed files with 26 additions and 48 deletions
|
@ -110,7 +110,6 @@ Item {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
// Ensure the JS from the web-engine makes it to our logging
|
// Ensure the JS from the web-engine makes it to our logging
|
||||||
webview.javaScriptConsoleMessage.connect(function(level, message, lineNumber, sourceID) {
|
webview.javaScriptConsoleMessage.connect(function(level, message, lineNumber, sourceID) {
|
||||||
console.log("TabletBrowser");
|
|
||||||
console.log("Web Entity JS message: " + sourceID + " " + lineNumber + " " + message);
|
console.log("Web Entity JS message: " + sourceID + " " + lineNumber + " " + message);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -138,18 +137,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onActiveFocusOnPressChanged: {
|
|
||||||
console.log("on active focus changed");
|
|
||||||
setActiveFocusOnPress(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
onNewViewRequested: {
|
onNewViewRequested: {
|
||||||
// desktop is not defined for web-entities
|
|
||||||
if (stackRoot.isDesktop) {
|
|
||||||
var component = Qt.createComponent("./Browser.qml");
|
|
||||||
var newWindow = component.createObject(desktop);
|
|
||||||
request.openIn(newWindow.webView);
|
|
||||||
} else {
|
|
||||||
var component = Qt.createComponent("./TabletBrowser.qml");
|
var component = Qt.createComponent("./TabletBrowser.qml");
|
||||||
|
|
||||||
if (component.status != Component.Ready) {
|
if (component.status != Component.Ready) {
|
||||||
|
@ -164,7 +152,7 @@ Item {
|
||||||
newWindow.eventBridge = web.eventBridge;
|
newWindow.eventBridge = web.eventBridge;
|
||||||
stackRoot.push(newWindow);
|
stackRoot.push(newWindow);
|
||||||
newWindow.webView.forceActiveFocus();
|
newWindow.webView.forceActiveFocus();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,6 +112,7 @@ Item {
|
||||||
currentItem.goBack();
|
currentItem.goBack();
|
||||||
} else {
|
} else {
|
||||||
stackRoot.pop();
|
stackRoot.pop();
|
||||||
|
currentItem.webView.focus = true;
|
||||||
currentItem.webView.forceActiveFocus();
|
currentItem.webView.forceActiveFocus();
|
||||||
web.address = currentItem.webView.url;
|
web.address = currentItem.webView.url;
|
||||||
}
|
}
|
||||||
|
@ -186,7 +187,6 @@ Item {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
// Ensure the JS from the web-engine makes it to our logging
|
// Ensure the JS from the web-engine makes it to our logging
|
||||||
root.javaScriptConsoleMessage.connect(function(level, message, lineNumber, sourceID) {
|
root.javaScriptConsoleMessage.connect(function(level, message, lineNumber, sourceID) {
|
||||||
console.log("WebView.qml");
|
|
||||||
console.log("Web Entity JS message: " + sourceID + " " + lineNumber + " " + message);
|
console.log("Web Entity JS message: " + sourceID + " " + lineNumber + " " + message);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -202,7 +202,6 @@ Item {
|
||||||
keyboardRaised = false;
|
keyboardRaised = false;
|
||||||
punctuationMode = false;
|
punctuationMode = false;
|
||||||
keyboard.resetShiftMode(false);
|
keyboard.resetShiftMode(false);
|
||||||
console.log("[DR] -> printing user string " + root.profile.httpUserAgent);
|
|
||||||
// Required to support clicking on "hifi://" links
|
// Required to support clicking on "hifi://" links
|
||||||
if (WebEngineView.LoadStartedStatus == loadRequest.status) {
|
if (WebEngineView.LoadStartedStatus == loadRequest.status) {
|
||||||
var url = loadRequest.url.toString();
|
var url = loadRequest.url.toString();
|
||||||
|
@ -215,15 +214,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
onNewViewRequested:{
|
onNewViewRequested:{
|
||||||
// desktop is not defined for web-entities
|
|
||||||
if (web.isDesktop) {
|
|
||||||
var component = Qt.createComponent("../Browser.qml");
|
|
||||||
var newWindow = component.createObject(desktop);
|
|
||||||
newWindow.setProfile(root.profile);
|
|
||||||
request.openIn(newWindow.webView);
|
|
||||||
} else {
|
|
||||||
var component = Qt.createComponent("../TabletBrowser.qml");
|
var component = Qt.createComponent("../TabletBrowser.qml");
|
||||||
|
|
||||||
if (component.status != Component.Ready) {
|
if (component.status != Component.Ready) {
|
||||||
if (component.status == Component.Error) {
|
if (component.status == Component.Error) {
|
||||||
console.log("Error: " + component.errorString());
|
console.log("Error: " + component.errorString());
|
||||||
|
@ -237,7 +228,6 @@ Item {
|
||||||
stackRoot.push(newWindow);
|
stackRoot.push(newWindow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
HiFiControls.Keyboard {
|
HiFiControls.Keyboard {
|
||||||
id: keyboard
|
id: keyboard
|
||||||
|
|
Loading…
Reference in a new issue