Commit 6adbe524 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Fix warnings

parent 5d486eca
......@@ -40,7 +40,7 @@ PlasmaCore.IconItem {
colorGroup: PlasmaCore.ColorScope.colorGroup
visible: paSinkModel.preferredSink.muted
visible: paSinkModel.preferredSink && paSinkModel.preferredSink.muted
function iconName(volume, muted, prefix) {
if (!prefix) {
......
......@@ -150,7 +150,7 @@ PlasmaCore.ColorScope {
anchors.left: parent.left
height: parent.height
width: parent.width/3
enabled: taskSwitcher.tasksCount > 0;
enabled: taskSwitcher && taskSwitcher.tasksCount > 0;
iconSource: "box"
onClicked: {
plasmoid.nativeInterface.showDesktop = false;
......@@ -167,7 +167,7 @@ PlasmaCore.ColorScope {
width: parent.width/3
anchors.horizontalCenter: parent.horizontalCenter
iconSource: "start-here-kde"
enabled: taskSwitcher.tasksCount > 0
enabled: taskSwitcher && taskSwitcher.tasksCount > 0
checkable: true
onCheckedChanged: {
taskSwitcher.hide();
......
......@@ -165,7 +165,7 @@ Item {
PlasmaComponents.Label {
id: activityNameLabel
anchors.centerIn: parent
text: activitiesView.nextContainment.activityName
text: activitiesView.nextContainment ? activitiesView.nextContainment.activityName : ""
}
Behavior on opacity {
OpacityAnimator {
......@@ -226,8 +226,8 @@ Item {
id: pinOverlay
anchors {
fill: parent
topMargin: containment.availableScreenRect.y
bottomMargin: parent.height - containment.availableScreenRect.height - containment.availableScreenRect.y
topMargin: containment ? containment.availableScreenRect.y : 0
bottomMargin: parent.height - containment ? (containment.availableScreenRect.height + containment.availableScreenRect.y) : 0
}
z: 222
source: Qt.resolvedUrl("Pin.qml")
......
......@@ -27,7 +27,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
onContainmentChanged: {
containment.parent = root;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment