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
function resetToggledMode(mode) {
toggled = mode
toggled = mode;
if (toggled) {
state = "mouseDepressed"
state = "mouseDepressed";
} else {
state = ""
state = "";
}
}
@ -26,52 +26,52 @@ Item {
onCanceled: {
if (toggled) {
keyItem.state = "mouseDepressed"
keyItem.state = "mouseDepressed";
} else {
keyItem.state = ""
keyItem.state = "";
}
}
onClicked: {
mouse.accepted = true
webEntity.synthesizeKeyPress(glyph)
mouse.accepted = true;
webEntity.synthesizeKeyPress(glyph);
if (toggle) {
toggled = !toggled
toggled = !toggled;
}
}
onDoubleClicked: {
mouse.accepted = true
mouse.accepted = true;
}
onEntered: {
keyItem.state = "mouseOver"
keyItem.state = "mouseOver";
}
onExited: {
if (toggled) {
keyItem.state = "mouseDepressed"
keyItem.state = "mouseDepressed";
} else {
keyItem.state = ""
keyItem.state = "";
}
}
onPressed: {
keyItem.state = "mouseClicked"
mouse.accepted = true
keyItem.state = "mouseClicked";
mouse.accepted = true;
}
onReleased: {
if (containsMouse) {
keyItem.state = "mouseOver"
keyItem.state = "mouseOver";
} else {
if (toggled) {
keyItem.state = "mouseDepressed"
keyItem.state = "mouseDepressed";
} else {
keyItem.state = ""
keyItem.state = "";
}
}
mouse.accepted = true
mouse.accepted = true;
}
}

View file

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

View file

@ -44,13 +44,13 @@ Item {
webChannel.registeredObjects: [eventBridgeWrapper]
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
root.javaScriptConsoleMessage.connect(function(level, message, lineNumber, sourceID) {
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