Try to fix format script and fix linting

This commit is contained in:
Joseph Donofry 2021-02-02 11:37:10 -05:00
parent 08dbdac3b7
commit 2bfd44755e
No known key found for this signature in database
GPG key ID: E8A1D78EF044B0CB
3 changed files with 14 additions and 15 deletions

View file

@ -14,13 +14,13 @@ do
clang-format -i "$f"
done;
QMLFORMAT_PATH=$(which qmlformat)
QMLFORMAT_PATH=$(command -v qmlformat)
if [ -n "$QMLFORMAT_PATH" ]; then
QML_FILES=$(find resources -type f -iname "*.qml")
for f in $QML_FILES
do
qmlformat -i "$f"
$QMLFORMAT_PATH -i "$f"
done;
else
echo "qmlformat not found; skipping qml formatting"

View file

@ -18,9 +18,9 @@ Item {
screenSaverTimer.stop();
screenSaver.state = "Invisible";
} else {
if (timelineRoot.visible) {
if (timelineRoot.visible)
screenSaverTimer.start();
}
}
}
}
@ -31,12 +31,12 @@ Item {
interval: screenTimeout * 1000
running: true
onTriggered: {
if (MainWindow.visible) {
if (MainWindow.visible)
timelineRoot.grabToImage(function(result) {
screenSaver.state = "Visible";
imageSource = result.url;
}, Qt.size(width, height));
}
}
}

View file

@ -53,10 +53,9 @@ ApplicationWindow {
font.bold: true
Layout.alignment: Qt.AlignHCenter
selectByMouse: true
onAccepted: {
profile.changeUsername(displayUsername.text)
displayUsername.isUsernameEditingAllowed = false
profile.changeUsername(displayUsername.text);
displayUsername.isUsernameEditingAllowed = false;
}
ImageButton {
@ -65,18 +64,18 @@ ApplicationWindow {
anchors.left: displayUsername.right
anchors.verticalCenter: displayUsername.verticalCenter
image: displayUsername.isUsernameEditingAllowed ? ":/icons/icons/ui/checkmark.png" : ":/icons/icons/ui/edit.png"
onClicked: {
if (displayUsername.isUsernameEditingAllowed) {
profile.changeUsername(displayUsername.text)
displayUsername.isUsernameEditingAllowed = false
profile.changeUsername(displayUsername.text);
displayUsername.isUsernameEditingAllowed = false;
} else {
displayUsername.isUsernameEditingAllowed = true
displayUsername.focus = true
displayUsername.selectAll()
displayUsername.isUsernameEditingAllowed = true;
displayUsername.focus = true;
displayUsername.selectAll();
}
}
}
}
MatrixText {