diff --git a/qml/DisplaySettings.qml b/qml/DisplaySettings.qml index 5f2088c6a..9ff44251c 100644 --- a/qml/DisplaySettings.qml +++ b/qml/DisplaySettings.qml @@ -11,7 +11,7 @@ Item { height: settingsLayout.height width: settingsLayout.width property var waterfallItem - property var replayItem: replayChB.checked + property bool replayItem: replayChB.checked ColumnLayout { id: settingsLayout diff --git a/qml/FirmwareUpdate.qml b/qml/FirmwareUpdate.qml index 844a582b3..85a354b06 100644 --- a/qml/FirmwareUpdate.qml +++ b/qml/FirmwareUpdate.qml @@ -114,7 +114,7 @@ Item { title: "Please choose a file" folder: shortcuts.home visible: false - property var fileName: "" + property string fileName: "" nameFilters: ["Hex Files (*.hex)"] onAccepted: { console.log("You chose: " + fileDialog.fileUrls) diff --git a/qml/InfoPage.qml b/qml/InfoPage.qml index d6c2f56e1..6f72b7b77 100644 --- a/qml/InfoPage.qml +++ b/qml/InfoPage.qml @@ -9,10 +9,10 @@ Item { id: root height: mainLayout.height width: mainLayout.width - property var deviceType: 'No device' - property var deviceModel: 'No device' - property var deviceFirmware: 'No device' - property var deviceID: 'No device' + property string deviceType: 'No device' + property string deviceModel: 'No device' + property string deviceFirmware: 'No device' + property string deviceID: 'No device' ColumnLayout { id: mainLayout @@ -60,7 +60,7 @@ Item { ColumnLayout { Text { z: 1 - text: 'Version: ' + (GitTag == "" ? "No tags!" : GitTag) + text: 'Version: ' + (GitTag === "" ? "No tags!" : GitTag) color: Style.textColor textFormat: Text.RichText } diff --git a/qml/MainMenu.qml b/qml/MainMenu.qml index 6fc592428..0379bc5c2 100644 --- a/qml/MainMenu.qml +++ b/qml/MainMenu.qml @@ -32,7 +32,7 @@ Item { } // Do not connect if no valid type or input - if(conntype.currentIndex < 0 && first != "" && second != "") { + if(conntype.currentIndex < 0 && first !== "" && second !== "") { return; } @@ -75,7 +75,7 @@ Item { Layout.columnSpan: 3 value: ping.pollFrequency; onValueChanged: { - if (ping.pollFrequency != value) { + if (ping.pollFrequency !== value) { ping.pollFrequency = value } } diff --git a/qml/MainPage.qml b/qml/MainPage.qml index 60411777c..0e6421d31 100644 --- a/qml/MainPage.qml +++ b/qml/MainPage.qml @@ -133,7 +133,7 @@ Item { stepSize: 1 to: ping.link.packageSize onValueChanged: { - if(ping.link.packageIndex != value) { + if(ping.link.packageIndex !== value) { ping.link.packageIndex = value ping.link.start() } diff --git a/qml/Ping1DVisualizer.qml b/qml/Ping1DVisualizer.qml index 3626d0120..daf654d4a 100644 --- a/qml/Ping1DVisualizer.qml +++ b/qml/Ping1DVisualizer.qml @@ -12,7 +12,7 @@ Item { property var protocol onWidthChanged: { - if(chart.Layout.minimumWidth == chart.width) { + if(chart.Layout.minimumWidth === chart.width) { waterfall.width = width - chart.width } } diff --git a/qml/PingImage.qml b/qml/PingImage.qml index 93cf289a5..735d18867 100644 --- a/qml/PingImage.qml +++ b/qml/PingImage.qml @@ -5,7 +5,7 @@ Item { id: root property var source: undefined - property var selected: false + property bool selected: false Image { id: image diff --git a/qml/PingItem.qml b/qml/PingItem.qml index 5c29c39db..189136d7e 100644 --- a/qml/PingItem.qml +++ b/qml/PingItem.qml @@ -19,18 +19,18 @@ Item { property bool pingpong: false property bool smartVisibility: false property bool spin: false - property var animationType: Easing.Linear - property var clicked: false + property int animationType: Easing.Linear + property bool clicked: false property var color: hideItem ? colorUnselected : colorSelected property var colorSelected: Style.isDark ? Qt.rgba(0,0,0,0.75) : Qt.rgba(1,1,1,0.75) property var colorUnselected: Style.isDark ? Qt.rgba(0,0,0,0.5) : Qt.rgba(1,1,1,0.5) - property var finalAngle: 180 + property real finalAngle: 180 property var finalAngleValue: spin && !pingpong ? 360 : finalAngle property var hoverParent: undefined property var icon: undefined property var item: null - property var marginMult: 1.05 - property var startAngle: 0 + property real marginMult: 1.05 + property real startAngle: 0 onItemChanged: { if(item == null) { @@ -150,7 +150,7 @@ Item { height: item != null ? item.height*marginMult : 0 width: item != null ? item.width*marginMult : 0 color: pingItem.color - property var hide: true + property bool hide: true onOpacityChanged: { item.opacity = itemRect.opacity diff --git a/qml/PingLogger.qml b/qml/PingLogger.qml index d3612c82c..e7363d2e6 100644 --- a/qml/PingLogger.qml +++ b/qml/PingLogger.qml @@ -6,7 +6,7 @@ import Logger 1.0 Item { id: root - property var scrollLockEnabled: true + property bool scrollLockEnabled: true ListView { property bool loadComplete: false diff --git a/qml/PingRelease.qml b/qml/PingRelease.qml index d86ad2986..56ef8a9b0 100644 --- a/qml/PingRelease.qml +++ b/qml/PingRelease.qml @@ -12,7 +12,7 @@ Item { xmlhttp.onreadystatechange=function() { //code for debug //print(xmlhttp.status, xmlhttp.readyState) - if (xmlhttp.readyState == XMLHttpRequest.DONE && xmlhttp.status == 200) { + if (xmlhttp.readyState === XMLHttpRequest.DONE && xmlhttp.status == 200) { handleJson(xmlhttp.responseText); } } @@ -28,7 +28,7 @@ Item { // Check for release tag v0.0 // Test release is t0.0 var releaseTagRx - if(GitTag[0] == 't') { + if(GitTag[0] === 't') { releaseTagRx = /(t)\d+\.\d+/ print('Running test version:') } else { diff --git a/qml/Style.qml b/qml/Style.qml index 598021aac..2f72f1377 100644 --- a/qml/Style.qml +++ b/qml/Style.qml @@ -9,7 +9,7 @@ QtObject { property string dark: "dark" property string light: "light" property bool isDark: true - property var theme: Material.Dark + property int theme: Material.Dark function useLightStyle() { theme = Material.Light diff --git a/qml/ValueReadout.qml b/qml/ValueReadout.qml index d86c7d06a..c92e5c6ab 100644 --- a/qml/ValueReadout.qml +++ b/qml/ValueReadout.qml @@ -4,15 +4,15 @@ import QtQuick.Layouts 1.3 Item { id: root - property var value: 0 - property var units: "m" - property var precision: 2 - property var margin: 10 - property var depth: -1 - property var strength: -1 - property var confidence: 0 - property var parentWidth: 0 - property var parentHeight: 0 + property int value: 0 + property string units: "m" + property int precision: 2 + property int margin: 10 + property int depth: -1 + property int strength: -1 + property int confidence: 0 + property int parentWidth: 0 + property int parentHeight: 0 x: margin width: mainLayout.width