Coding standard fix for JS portions of QML.

Semicolons at end of line.
This commit is contained in:
Anthony J. Thibault 2016-09-08 18:16:32 -07:00
parent 3574267382
commit d38625ce2a
3 changed files with 24 additions and 24 deletions

View file

@ -10,11 +10,11 @@ Item {
property alias mouseArea: mouseArea1 property alias mouseArea: mouseArea1
function resetToggledMode(mode) { function resetToggledMode(mode) {
toggled = mode toggled = mode;
if (toggled) { if (toggled) {
state = "mouseDepressed" state = "mouseDepressed";
} else { } else {
state = "" state = "";
} }
} }
@ -26,52 +26,52 @@ Item {
onCanceled: { onCanceled: {
if (toggled) { if (toggled) {
keyItem.state = "mouseDepressed" keyItem.state = "mouseDepressed";
} else { } else {
keyItem.state = "" keyItem.state = "";
} }
} }
onClicked: { onClicked: {
mouse.accepted = true mouse.accepted = true;
webEntity.synthesizeKeyPress(glyph) webEntity.synthesizeKeyPress(glyph);
if (toggle) { if (toggle) {
toggled = !toggled toggled = !toggled;
} }
} }
onDoubleClicked: { onDoubleClicked: {
mouse.accepted = true mouse.accepted = true;
} }
onEntered: { onEntered: {
keyItem.state = "mouseOver" keyItem.state = "mouseOver";
} }
onExited: { onExited: {
if (toggled) { if (toggled) {
keyItem.state = "mouseDepressed" keyItem.state = "mouseDepressed";
} else { } else {
keyItem.state = "" keyItem.state = "";
} }
} }
onPressed: { onPressed: {
keyItem.state = "mouseClicked" keyItem.state = "mouseClicked";
mouse.accepted = true mouse.accepted = true;
} }
onReleased: { onReleased: {
if (containsMouse) { if (containsMouse) {
keyItem.state = "mouseOver" keyItem.state = "mouseOver";
} else { } else {
if (toggled) { if (toggled) {
keyItem.state = "mouseDepressed" keyItem.state = "mouseDepressed";
} else { } else {
keyItem.state = "" keyItem.state = "";
} }
} }
mouse.accepted = true mouse.accepted = true;
} }
} }

View file

@ -7,8 +7,8 @@ Item {
property bool shiftMode: false property bool shiftMode: false
function resetShiftMode(mode) { function resetShiftMode(mode) {
shiftMode = mode shiftMode = mode;
shiftKey.resetToggledMode(mode) shiftKey.resetToggledMode(mode);
} }
function toUpper(str) { function toUpper(str) {
@ -59,7 +59,7 @@ Item {
function alphaKeyClickedHandler(mouseArea) { function alphaKeyClickedHandler(mouseArea) {
// reset shift mode to false after first keypress // reset shift mode to false after first keypress
if (shiftMode) { if (shiftMode) {
resetShiftMode(false) resetShiftMode(false);
} }
} }
@ -333,7 +333,7 @@ Item {
width: 89 width: 89
glyph: "&123" glyph: "&123"
mouseArea.onClicked: { mouseArea.onClicked: {
keyboardBase.parent.punctuationMode = true keyboardBase.parent.punctuationMode = true;
} }
} }

View file

@ -44,13 +44,13 @@ Item {
webChannel.registeredObjects: [eventBridgeWrapper] webChannel.registeredObjects: [eventBridgeWrapper]
Component.onCompleted: { Component.onCompleted: {
console.log("Connecting JS messaging to Hifi Logging") console.log("Connecting JS messaging to Hifi Logging");
// 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("Web Entity JS message: " + sourceID + " " + lineNumber + " " + message); console.log("Web Entity JS message: " + sourceID + " " + lineNumber + " " + message);
}); });
root.profile.httpUserAgent = "Mozilla/5.0 Chrome (HighFidelityInterface)" root.profile.httpUserAgent = "Mozilla/5.0 Chrome (HighFidelityInterface)";
} }
// FIXME hack to get the URL with the auth token included. Remove when we move to Qt 5.6 // FIXME hack to get the URL with the auth token included. Remove when we move to Qt 5.6