Skip to content

Commit

Permalink
Getting rid of QtCreator and runtime warnings
Browse files Browse the repository at this point in the history
Change-Id: I16e2181e0928eff48802e8d7a3e1371ba9e7ad84
Reviewed-by: Nedim Hadzic <[email protected]>
  • Loading branch information
Robert Griebl committed Apr 13, 2016
1 parent b68f65d commit 284bdb5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 16 deletions.
6 changes: 3 additions & 3 deletions modules/utils/AppUIScreen.qml
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ ApplicationManagerWindow {

ApplicationManagerWindow {
id: cluster
width: parent ? parent.width : Style.cellWidth * 24
height: parent ? parent.height : Style.cellHeight * 24
width: typeof parent !== 'undefined' ? parent.width : Style.cellWidth * 24
height: typeof parent !== 'undefined' ? parent.height : Style.cellHeight * 24
visible: false
Item {
id: clusterContainer
Expand All @@ -151,7 +151,7 @@ ApplicationManagerWindow {
ApplicationManagerWindow {
id: popup
width: 285
height: parent ? parent.height : 0
height: typeof parent !== 'undefined' ? parent.height : 0
visible: false
Item {
id: popupContainer
Expand Down
8 changes: 1 addition & 7 deletions modules/utils/Style.qml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ QtObject {
property int cellWidth: configValue("cellWidth", 53) // 1280/24
property int cellHeight: configValue("cellHeight", 33) // 800/24
property string fontFamily: configValue("fontFamily", true ? 'Source Sans Pro' : fontRegular.name)
// enable next line to test OpenSans font
// property string fontFamily: fontBackup.name
property var fontWeight: configValue("fontWeight", Font.Light)
property real fontWeight: configValue("fontWeight", Font.Light)
property int fontSizeXXS: configValue("fontSizeXXS", 14)
property int fontSizeXS: configValue("fontSizeXS", 16)
property int fontSizeS: configValue("fontSizeS", 18)
Expand Down Expand Up @@ -104,10 +102,6 @@ QtObject {
source: font('SourceSansPro-Light')
}

property FontLoader fontBackup: FontLoader {
source: font('OpenSans-Regular')
}

function configValue(key, defaultValue) {
return (styleLoader.item && styleLoader.item[key] )? styleLoader.item[key]: defaultValue
}
Expand Down
8 changes: 4 additions & 4 deletions sysui/Cloud/Store/AppStore.qml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Item {
signal loginSuccessful()

function goBack() {
if (categoriesPage.state != "")
if (categoriesPage.state !== "")
categoriesPage.goBack()
else
root.close();
Expand All @@ -58,11 +58,11 @@ Item {
})
JSONBackend.serverCall(url, data, function(data) {
if (data !== 0) {
if (data.status == "ok") {
if (data.status === "ok") {
serverOnline = true
login()
//refresh()
} else if (data.status == "maintenance") {
} else if (data.status === "maintenance") {
serverOnline = false
serverReason = "maintenance"
} else {
Expand All @@ -81,7 +81,7 @@ Item {
var data = {"username" : "t", "password" : "t", "imei" : "112163001487801"}
JSONBackend.serverCall(url, data, function(data) {
if (data !== 0) {
if (data.status == "ok") {
if (data.status === "ok") {
print("LOGIN SUCCESSFUL");
loginSuccessful()
} else {
Expand Down
2 changes: 1 addition & 1 deletion sysui/Cluster/Cluster.qml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Item {
focus: Style.debugMode

Keys.onPressed: {
if (event.key == Qt.Key_Space) {
if (event.key === Qt.Key_Space) {
if (overlay.opacity < 0.5) overlay.opacity = 0.5
else overlay.opacity = 0
}
Expand Down
2 changes: 1 addition & 1 deletion sysui/LaunchController.qml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ StackView {
acceptSurface = false;
}

for (var i = 0; i < root.minimizedItems.length; ++i) {
for (i = 0; i < root.minimizedItems.length; ++i) {
if (appID === root.minimizedItems[i]) {
acceptSurface = false;
// For now we assume that only navigation has a widget
Expand Down

0 comments on commit 284bdb5

Please sign in to comment.