--warnings

Make sure we don't call null pointers
Do not reference old objects that don't exist anymore
This commit is contained in:
Aleix Pol 2021-02-24 16:04:24 +01:00
parent 9bda1b66ff
commit 59297a25f3

View file

@ -36,7 +36,7 @@ Rectangle {
visible: false //adjust borders is run during setup. We want to avoid painting till completed
property Item containment
color: containment.backgroundHints == PlasmaCore.Types.NoBackground ? "transparent" : theme.textColor
color: (containment && containment.backgroundHints == PlasmaCore.Types.NoBackground) ? "transparent" : theme.textColor
function toggleWidgetExplorer(containment) {
console.log("Widget Explorer toggled");
@ -75,7 +75,7 @@ Rectangle {
anchors {
fill: parent
topMargin: containment ? containment.availableScreenRect.y : 0
bottomMargin: parent.height - containment ? (containment.availableScreenRect.height + containment.availableScreenRect.y) : 0
bottomMargin: parent.height - (containment ? (containment.availableScreenRect.height + containment.availableScreenRect.y) : 0)
}
z: 222
source: Qt.resolvedUrl("Pin.qml")
@ -85,7 +85,6 @@ Rectangle {
containment.parent = root;
containment.visible = true;
containment.anchors.fill = root;
panel.backgroundHints = containment.backgroundHints;
}
Component.onCompleted: {