reduce warnings

pull/1/head
Michail Vourlakos 8 years ago
parent 7232480b79
commit 84e390c312

@ -51,7 +51,7 @@ Window{
} }
Text{ Text{
text: dock.currentScreen text: dock && dock.currentScreen ? dock.currentScreen : "___"
} }
Text{ Text{
@ -59,7 +59,13 @@ Window{
} }
Text{ Text{
text: dock.screenGeometry.x+","+dock.screenGeometry.y+ " "+dock.screenGeometry.width+"x"+dock.screenGeometry.height text: {
if (dock && dock.screenGeometry){
return dock.screenGeometry.x+","+dock.screenGeometry.y+ " "+dock.screenGeometry.width+"x"+dock.screenGeometry.height;
} else {
return "_,_ _x_";
}
}
} }
Text{ Text{
@ -67,7 +73,13 @@ Window{
} }
Text{ Text{
text: dock.x + "," + dock.y + " "+dock.width+ "x"+dock.height text: {
if (dock) {
return dock.x + "," + dock.y + " "+dock.width+ "x"+dock.height;
} else {
return "_,_ _x_";
}
}
} }
Text{ Text{
@ -76,7 +88,7 @@ Window{
Text{ Text{
text: { text: {
if (dock.onPrimary) if (dock && dock.onPrimary)
return "Yes"; return "Yes";
else else
return "No"; return "No";
@ -136,7 +148,13 @@ Window{
} }
Text{ Text{
text: dock.maskArea.x +", "+ dock.maskArea.y+" "+dock.maskArea.width+"x"+dock.maskArea.height text: {
if (dock && dock.maskArea) {
return dock.maskArea.x +", "+ dock.maskArea.y+" "+dock.maskArea.width+"x"+dock.maskArea.height;
} else {
return "_,_ _x_";
}
}
} }
Text{ Text{
@ -144,8 +162,13 @@ Window{
} }
Text{ Text{
text: dock.localGeometry.x + ", " + dock.localGeometry.y + " " + text: {
dock.localGeometry.width + "x" + dock.localGeometry.height if (dock && dock.localGeometry) {
return dock.localGeometry.x + ", " + dock.localGeometry.y + " " + dock.localGeometry.width + "x" + dock.localGeometry.height;
} else {
return "_,_ _x_";
}
}
} }
Text{ Text{
@ -154,7 +177,7 @@ Window{
Text{ Text{
text: { text: {
if (dock.drawEffects) if (dock && dock.drawEffects)
return "Yes"; return "Yes";
else else
return "No"; return "No";
@ -166,8 +189,13 @@ Window{
} }
Text{ Text{
text: dock.effectsArea.x + ", " + dock.effectsArea.y + " " + text: {
dock.effectsArea.width + "x" + dock.effectsArea.height if (dock && dock.effectsArea) {
return dock.effectsArea.x + ", " + dock.effectsArea.y + " " +dock.effectsArea.width + "x" + dock.effectsArea.height;
} else {
return "_,_ _x_";
}
}
} }
Text{ Text{
@ -184,7 +212,7 @@ Window{
Text{ Text{
text: { text: {
if (dock.visibility.isHidden) if (dock && dock.visibility && dock.visibility.isHidden)
return "Yes"; return "Yes";
else else
return "No"; return "No";
@ -205,7 +233,7 @@ Window{
Text{ Text{
text: { text: {
if (dock.visibility.containsMouse) if (dock && dock.visibility && dock.visibility.containsMouse)
return "Yes"; return "Yes";
else else
return "No"; return "No";
@ -295,6 +323,9 @@ Window{
Text{ Text{
text: { text: {
if (!dock || !dock.visibility)
return "";
switch(dock.visibility.mode){ switch(dock.visibility.mode){
case Latte.Dock.AlwaysVisible: case Latte.Dock.AlwaysVisible:
return "Always Visible"; return "Always Visible";

@ -48,7 +48,7 @@ Item{
return; return;
} }
if (dock.visibility.isHidden && root.isVertical) { if (dock && dock.visibility && dock.visibility.isHidden && root.isVertical) {
if (Latte.WindowSystem.compositingActive) { if (Latte.WindowSystem.compositingActive) {
return visibilityManager.slidingOutToPos; return visibilityManager.slidingOutToPos;
} else { } else {
@ -73,7 +73,7 @@ Item{
return; return;
} }
if (dock.visibility.isHidden && root.isHorizontal) { if (dock && dock.visibility && dock.visibility.isHidden && root.isHorizontal) {
if (Latte.WindowSystem.compositingActive) { if (Latte.WindowSystem.compositingActive) {
return visibilityManager.slidingOutToPos; return visibilityManager.slidingOutToPos;
} else { } else {
@ -169,6 +169,28 @@ Item{
property int beginIndex: 0 property int beginIndex: 0
property int count: children.length property int count: children.length
//it is used in calculations for fillWidth,fillHeight applets
property int sizeWithNoFillApplets: 0
Binding{
target: _startLayout
property:"sizeWithNoFillApplets"
when: _startLayout
value: {
if (!visibilityManager || !visibilityManager.normalState)
return;
var space = 0;
for (var i=0; i<_startLayout.children.length; ++i){
if (_startLayout.children[i] && !_startLayout.children[i].needsFillSpace) {
space = root.isHorizontal ? space + _startLayout.children[i].width : space + _startLayout.children[i].height;
}
}
return space;
}
}
property int shownApplets: { property int shownApplets: {
var res = 0; var res = 0;
@ -184,21 +206,6 @@ Item{
return res; return res;
} }
//it is used in calculations for fillWidth,fillHeight applets
property int sizeWithNoFillApplets: {
if (!visibilityManager || !visibilityManager.normalState)
return;
var space = 0;
for (var i=0; i<children.length; ++i){
if (children[i] && !children[i].needsFillSpace) {
space = root.isHorizontal ? space + children[i].width : space + children[i].height;
}
}
return space;
}
//it is used in calculations for fillWidth,fillHeight applets //it is used in calculations for fillWidth,fillHeight applets
property int fillApplets:{ property int fillApplets:{
var no = 0; var no = 0;
@ -287,6 +294,27 @@ Item{
property int beginIndex: 100 property int beginIndex: 100
property int count: children.length property int count: children.length
//it is used in calculations for fillWidth,fillHeight applets
property int sizeWithNoFillApplets: 0
Binding{
target: _mainLayout
property:"sizeWithNoFillApplets"
when: _mainLayout
value: {
if (!visibilityManager || !visibilityManager.normalState)
return;
var space = 0;
for (var i=0; i<_mainLayout.children.length; ++i){
if (_mainLayout.children[i] && !_mainLayout.children[i].needsFillSpace) {
space = root.isHorizontal ? space + _mainLayout.children[i].width : space + _mainLayout.children[i].height;
}
}
return space;
}
}
property int shownApplets: { property int shownApplets: {
var res = 0; var res = 0;
@ -303,21 +331,6 @@ Item{
return res; return res;
} }
//it is used in calculations for fillWidth,fillHeight applets
property int sizeWithNoFillApplets: {
if (!visibilityManager || !visibilityManager.normalState)
return;
var space = 0;
for (var i=0; i<children.length; ++i){
if (children[i] && !children[i].needsFillSpace) {
space = root.isHorizontal ? space + children[i].width : space + children[i].height;
}
}
return space;
}
//it is used in calculations for fillWidth,fillHeight applets //it is used in calculations for fillWidth,fillHeight applets
property int fillApplets:{ property int fillApplets:{
var no = 0; var no = 0;
@ -532,6 +545,28 @@ Item{
property int beginIndex: 200 property int beginIndex: 200
property int count: children.length property int count: children.length
//it is used in calculations for fillWidth,fillHeight applets
property int sizeWithNoFillApplets: 0
Binding{
target: _endLayout
property:"sizeWithNoFillApplets"
when: _endLayout
value: {
if (!visibilityManager || !visibilityManager.normalState)
return;
var space = 0;
for (var i=0; i<_endLayout.children.length; ++i){
if (_endLayout.children[i] && !_endLayout.children[i].needsFillSpace) {
space = root.isHorizontal ? space + _endLayout.children[i].width : space + _endLayout.children[i].height;
}
}
return space;
}
}
property int shownApplets: { property int shownApplets: {
var res = 0; var res = 0;
@ -547,21 +582,6 @@ Item{
return res; return res;
} }
//it is used in calculations for fillWidth,fillHeight applets
property int sizeWithNoFillApplets: {
if (!visibilityManager || !visibilityManager.normalState)
return;
var space = 0;
for (var i=0; i<children.length; ++i){
if (children[i] && !children[i].needsFillSpace) {
space = root.isHorizontal ? space + children[i].width : space + children[i].height;
}
}
return space;
}
//it is used in calculations for fillWidth,fillHeight applets //it is used in calculations for fillWidth,fillHeight applets
property int fillApplets:{ property int fillApplets:{
var no = 0; var no = 0;

@ -55,9 +55,14 @@ DragDrop.DropArea {
property bool addLaunchersInTaskManager: plasmoid.configuration.addLaunchersInTaskManager property bool addLaunchersInTaskManager: plasmoid.configuration.addLaunchersInTaskManager
property bool autoDecreaseIconSize: plasmoid.configuration.autoDecreaseIconSize property bool autoDecreaseIconSize: plasmoid.configuration.autoDecreaseIconSize
property bool backgroundOnlyOnMaximized: plasmoid.configuration.backgroundOnlyOnMaximized property bool backgroundOnlyOnMaximized: plasmoid.configuration.backgroundOnlyOnMaximized
property bool behaveAsPlasmaPanel: visibilityManager.panelIsBiggerFromIconSize && (zoomFactor === 1.0) property bool behaveAsPlasmaPanel: {
&& (dock.visibility.mode === Latte.Dock.AlwaysVisible || dock.visibility.mode === Latte.Dock.WindowsGoBelow) if (!dock || dock.visibility)
&& (plasmoid.configuration.panelPosition === Latte.Dock.Justify) && !root.solidPanel return false;
return (visibilityManager.panelIsBiggerFromIconSize && (zoomFactor === 1.0)
&& (dock.visibility.mode === Latte.Dock.AlwaysVisible || dock.visibility.mode === Latte.Dock.WindowsGoBelow)
&& (plasmoid.configuration.panelPosition === Latte.Dock.Justify) && !root.solidPanel);
}
property bool blurEnabled: plasmoid.configuration.blurEnabled && !root.forceTransparentPanel property bool blurEnabled: plasmoid.configuration.blurEnabled && !root.forceTransparentPanel
property bool confirmedDragEntered: false property bool confirmedDragEntered: false
@ -1088,7 +1093,7 @@ DragDrop.DropArea {
} }
Connections{ Connections{
target: dock.visibility target: dock && dock.visibility ? dock.visibility : root
ignoreUnknownSignals : true ignoreUnknownSignals : true

@ -398,7 +398,7 @@ Column {
height: 2 height: 2
color: theme.buttonFocusColor color: theme.buttonFocusColor
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
visible: isGroup ? IsActive === true : parentTask.isActive visible: isGroup ? IsActive === true : (parentTask ? parentTask.isActive : false)
} }
} }

@ -181,7 +181,7 @@ Item {
property alias tasksCount: tasksModel.count property alias tasksCount: tasksModel.count
property alias hoveredIndex: icList.hoveredIndex property alias hoveredIndex: icList.hoveredIndex
property QtObject altSessionAction : latteDock ? latteDock.altSessionAction : 0 property QtObject altSessionAction : latteDock ? latteDock.altSessionAction : null
property Item latteDock: null property Item latteDock: null
//END Now Dock Panel properties //END Now Dock Panel properties

Loading…
Cancel
Save