more correct logging, use qt logging for qml as well

This commit is contained in:
arcan1s
2015-08-30 16:24:00 +03:00
parent aacb50c946
commit 4c27382467
42 changed files with 635 additions and 598 deletions

View File

@ -69,6 +69,7 @@ Item {
width: parent.width * 2 / 3
text: plasmoid.configuration.currentFontFamily
onClicked: {
if (debug) console.debug()
fontDialog.setFont()
fontDialog.visible = true
}
@ -133,8 +134,10 @@ Item {
]
onCurrentIndexChanged: cfg_currentFontWeight = model[currentIndex]["name"]
Component.onCompleted: {
if (debug) console.debug()
for (var i = 0; i < model.length; i++) {
if (model[i]["name"] == plasmoid.configuration.currentFontWeight) {
if (debug) console.info("Found", model[i]["name"], "on", i)
fontWeight.currentIndex = i;
}
}
@ -168,8 +171,10 @@ Item {
]
onCurrentIndexChanged: cfg_currentFontStyle = model[currentIndex]["name"]
Component.onCompleted: {
if (debug) console.debug()
for (var i = 0; i < model.length; i++) {
if (model[i]["name"] == plasmoid.configuration.currentFontStyle) {
if (debug) console.info("Found", model[i]["name"], "on", i)
fontStyle.currentIndex = i;
}
}
@ -214,12 +219,14 @@ Item {
signal setFont
onAccepted: {
if (debug) console.debug()
selectFont.text = fontDialog.font.family
fontSize.value = fontDialog.font.pointSize
fontStyle.currentIndex = fontDialog.font.italic ? 1 : 0
fontWeight.currentIndex = weight[fontDialog.font.weight]
}
onSetFont: {
if (debug) console.debug()
fontDialog.font = Qt.font({
family: selectFont.text,
pointSize: fontSize.value > 0 ? fontSize.value : 12,
@ -230,6 +237,6 @@ Item {
}
Component.onCompleted: {
if (debug) console.log("")
if (debug) console.debug()
}
}