Commit 19144ab0 authored by Laurent Montel's avatar Laurent Montel 😁

Fix warning == vs ===

parent aca7fd38
......@@ -66,7 +66,7 @@ Item {
//console.log("Date/time changed!");
var currentTZOffset = dataSource.data["Local"]["Offset"] / 60;
if (currentTZOffset != tzOffset) {
if (currentTZOffset !== tzOffset) {
tzOffset = currentTZOffset;
//console.log("TZ offset changed: " + tzOffset);
Date.timeZoneUpdated(); // inform the QML JS engine about TZ change
......@@ -81,8 +81,8 @@ Item {
Plasmoid.compactRepresentation: Item {
id: representation
Layout.minimumWidth: plasmoid.formFactor != PlasmaCore.Types.Vertical ? representation.height : units.gridUnit
Layout.minimumHeight: plasmoid.formFactor == PlasmaCore.Types.Vertical ? representation.width : units.gridUnit
Layout.minimumWidth: plasmoid.formFactor !== PlasmaCore.Types.Vertical ? representation.height : units.gridUnit
Layout.minimumHeight: plasmoid.formFactor === PlasmaCore.Types.Vertical ? representation.width : units.gridUnit
MouseArea {
anchors.fill: parent
......
......@@ -33,7 +33,7 @@ MouseArea {
onClicked: plasmoid.expanded = !plasmoid.expanded
readonly property bool isConstrained: plasmoid.formFactor == PlasmaCore.Types.Vertical || plasmoid.formFactor == PlasmaCore.Types.Horizontal
readonly property bool isConstrained: plasmoid.formFactor === PlasmaCore.Types.Vertical || plasmoid.formFactor === PlasmaCore.Types.Horizontal
//Should we consider turning this into a Flow item?
Row {
......
......@@ -200,7 +200,7 @@ Item {
isBrightnessAvailable: pmSource.data["PowerDevil"] && pmSource.data["PowerDevil"]["Screen Brightness Available"] ? true : false
isKeyboardBrightnessAvailable: pmSource.data["PowerDevil"] && pmSource.data["PowerDevil"]["Keyboard Brightness Available"] ? true : false
pluggedIn: pmSource.data["AC Adapter"] != undefined && pmSource.data["AC Adapter"]["Plugged in"]
pluggedIn: pmSource.data["AC Adapter"] !== undefined && pmSource.data["AC Adapter"]["Plugged in"]
property int cookie1: -1
property int cookie2: -1
......
......@@ -58,10 +58,10 @@ ColumnLayout {
}
default: { // forward key to filter
// filter.text += event.text wil break if the key is backspace
if (event.key == Qt.Key_Backspace && filter.text == "") {
if (event.key === Qt.Key_Backspace && filter.text == "") {
return;
}
if (event.text != "" && !filter.activeFocus) {
if (event.text !== "" && !filter.activeFocus) {
clipboardMenu.view.currentIndex = -1
if (event.matches(StandardKey.Paste)) {
filter.paste();
......
......@@ -185,7 +185,7 @@ MouseArea {
id: iconToolTip
anchors.fill: parent
subText: {
if ((mounted || deviceItem.state != 0) && model["Available Content"] != "Audio") {
if ((mounted || deviceItem.state != 0) && model["Available Content"] !== "Audio") {
if (model["Removable"]) {
return i18n("It is currently <b>not safe</b> to remove this device: applications may be accessing it. Click the eject button to safely remove this device.")
} else {
......
......@@ -178,7 +178,7 @@ MouseArea {
}
emblemIcon: Emblems && Emblems[0] ? Emblems[0] : ""
state: sdSource.data[udi] ? sdSource.data[udi].State : 0
isRoot: sdSource.data[udi]["File Path"] == "/"
isRoot: sdSource.data[udi]["File Path"] === "/"
percentUsage: {
if (!sdSource.data[udi]) {
......@@ -192,12 +192,12 @@ MouseArea {
freeSpaceText: sdSource.data[udi] && sdSource.data[udi]["Free Space Text"] ? sdSource.data[udi]["Free Space Text"] : ""
actionIcon: mounted ? "media-eject" : "media-mount"
actionVisible: model["Device Types"].indexOf("Portable Media Player") == -1
actionVisible: model["Device Types"].indexOf("Portable Media Player") === -1
actionToolTip: {
var types = model["Device Types"];
if (!mounted) {
return i18n("Click to access this device from other applications.")
} else if (types && types.indexOf("OpticalDisc") != -1) {
} else if (types && types.indexOf("OpticalDisc") !== -1) {
return i18n("Click to eject this disc.")
} else {
return i18n("Click to safely remove this device.")
......
......@@ -144,7 +144,7 @@ Item {
counter++;
}
}
if (counter != devicenotifier.mountedRemovables) {
if (counter !== devicenotifier.mountedRemovables) {
devicenotifier.mountedRemovables = counter;
}
}
......@@ -228,7 +228,7 @@ Item {
}
Component.onCompleted: {
if (sdSource.connectedSources.count == 0) {
if (sdSource.connectedSources.count === 0) {
Plasmoid.status = PlasmaCore.Types.PassiveStatus;
}
......
......@@ -201,14 +201,14 @@ Item {
}
// Non-explicit all-day event
var startIsMidnight = modelData.startDateTime.getHours() == 0
&& modelData.startDateTime.getMinutes() == 0;
var startIsMidnight = modelData.startDateTime.getHours() === 0
&& modelData.startDateTime.getMinutes() === 0;
var endIsMidnight = modelData.endDateTime.getHours() == 0
&& modelData.endDateTime.getMinutes() == 0;
var endIsMidnight = modelData.endDateTime.getHours() === 0
&& modelData.endDateTime.getMinutes() === 0;
var sameDay = modelData.startDateTime.getDate() == modelData.endDateTime.getDate()
&& modelData.startDateTime.getDay() == modelData.endDateTime.getDay()
var sameDay = modelData.startDateTime.getDate() === modelData.endDateTime.getDate()
&& modelData.startDateTime.getDay() === modelData.endDateTime.getDay()
if (startIsMidnight && endIsMidnight && sameDay) {
return false
......
......@@ -56,7 +56,7 @@ Item {
property int tzIndex: 0
// if the date/timezone cannot be fit with the smallest font to its designated space
readonly property bool oneLineMode: plasmoid.formFactor == PlasmaCore.Types.Horizontal &&
readonly property bool oneLineMode: plasmoid.formFactor === PlasmaCore.Types.Horizontal &&
main.height <= 2 * theme.smallestFont.pixelSize &&
(main.showDate || timezoneLabel.visible)
......@@ -87,7 +87,7 @@ Item {
// If the currently selected timezone was removed,
// default to the first one in the list
var lastSelectedTimezone = plasmoid.configuration.lastSelectedTimezone;
if (plasmoid.configuration.selectedTimeZones.indexOf(lastSelectedTimezone) == -1) {
if (plasmoid.configuration.selectedTimeZones.indexOf(lastSelectedTimezone) === -1) {
plasmoid.configuration.lastSelectedTimezone = plasmoid.configuration.selectedTimeZones[0];
}
......@@ -99,7 +99,7 @@ Item {
states: [
State {
name: "horizontalPanel"
when: plasmoid.formFactor == PlasmaCore.Types.Horizontal && !main.oneLineMode
when: plasmoid.formFactor === PlasmaCore.Types.Horizontal && !main.oneLineMode
PropertyChanges {
target: main
......@@ -181,7 +181,7 @@ Item {
State {
name: "horizontalPanelSmall"
when: plasmoid.formFactor == PlasmaCore.Types.Horizontal && main.oneLineMode
when: plasmoid.formFactor === PlasmaCore.Types.Horizontal && main.oneLineMode
PropertyChanges {
target: main
......@@ -254,7 +254,7 @@ Item {
State {
name: "verticalPanel"
when: plasmoid.formFactor == PlasmaCore.Types.Vertical
when: plasmoid.formFactor === PlasmaCore.Types.Vertical
PropertyChanges {
target: main
......@@ -329,7 +329,7 @@ Item {
State {
name: "other"
when: plasmoid.formFactor != PlasmaCore.Types.Vertical && plasmoid.formFactor != PlasmaCore.Types.Horizontal
when: plasmoid.formFactor !== PlasmaCore.Types.Vertical && plasmoid.formFactor !== PlasmaCore.Types.Horizontal
PropertyChanges {
target: main
......@@ -443,7 +443,7 @@ Item {
newIndex = plasmoid.configuration.selectedTimeZones.length - 1;
}
if (newIndex != main.tzIndex) {
if (newIndex !== main.tzIndex) {
plasmoid.configuration.lastSelectedTimezone = plasmoid.configuration.selectedTimeZones[newIndex];
main.tzIndex = newIndex;
......@@ -576,7 +576,7 @@ Item {
var minutes = match[3]
var seconds = "ss";
var amPm = "AP";
var uses24hFormatByDefault = timeFormatString.toLowerCase().indexOf("ap") == -1;
var uses24hFormatByDefault = timeFormatString.toLowerCase().indexOf("ap") === -1;
// because QLocale is incredibly stupid and does not convert 12h/24h clock format
// when uppercase H is used for hours, needs to be h or hh, so toLowerCase()
......@@ -596,15 +596,15 @@ Item {
}
function setupLabels() {
var showTimezone = main.showLocalTimezone || (plasmoid.configuration.lastSelectedTimezone != "Local"
&& dataSource.data["Local"]["Timezone City"] != dataSource.data[plasmoid.configuration.lastSelectedTimezone]["Timezone City"]);
var showTimezone = main.showLocalTimezone || (plasmoid.configuration.lastSelectedTimezone !== "Local"
&& dataSource.data["Local"]["Timezone City"] !== dataSource.data[plasmoid.configuration.lastSelectedTimezone]["Timezone City"]);
var timezoneString = "";
if (showTimezone) {
timezoneString = plasmoid.configuration.displayTimezoneAsCode ? dataSource.data[plasmoid.configuration.lastSelectedTimezone]["Timezone Abbreviation"]
: TimezonesI18n.i18nCity(dataSource.data[plasmoid.configuration.lastSelectedTimezone]["Timezone City"]);
timezoneLabel.text = (main.showDate || main.oneLineMode) && plasmoid.formFactor == PlasmaCore.Types.Horizontal ? "(" + timezoneString + ")" : timezoneString;
timezoneLabel.text = (main.showDate || main.oneLineMode) && plasmoid.formFactor === PlasmaCore.Types.Horizontal ? "(" + timezoneString + ")" : timezoneString;
} else {
// this clears the label and that makes it hidden
timezoneLabel.text = timezoneString;
......@@ -653,14 +653,14 @@ Item {
// If the date has changed, force size recalculation, because the day name
// or the month name can now be longer/shorter, so we need to adjust applet size
var currentDate = Qt.formatDateTime(dataSource.data["Local"]["DateTime"], "yyyy-mm-dd");
if (main.lastDate != currentDate) {
if (main.lastDate !== currentDate) {
doCorrections = true;
main.lastDate = currentDate
}
}
var currentTZOffset = dataSource.data["Local"]["Offset"] / 60;
if (currentTZOffset != tzOffset) {
if (currentTZOffset !== tzOffset) {
doCorrections = true;
tzOffset = currentTZOffset;
Date.timeZoneUpdated(); // inform the QML JS engine about TZ change
......@@ -673,7 +673,7 @@ Item {
function setTimezoneIndex() {
for (var i = 0; i < plasmoid.configuration.selectedTimeZones.length; i++) {
if (plasmoid.configuration.selectedTimeZones[i] == plasmoid.configuration.lastSelectedTimezone) {
if (plasmoid.configuration.selectedTimeZones[i] === plasmoid.configuration.lastSelectedTimezone) {
main.tzIndex = i;
break;
}
......
......@@ -50,7 +50,7 @@ Item {
var formattedTime = Qt.formatTime(dateTime, compactRepresentationItem.timeFormat);
if (dateTime.getDay() != dataSource.data["Local"]["DateTime"].getDay()) {
if (dateTime.getDay() !== dataSource.data["Local"]["DateTime"].getDay()) {
formattedTime += " (" + Qt.formatDate(dateTime, compactRepresentationItem.dateFormat) + ")";
}
......
......@@ -52,7 +52,7 @@ QtLayouts.ColumnLayout {
// HACK by the time we populate our model and/or the ComboBox is finished the value is still undefined
if (cfg_fontFamily) {
for (var i = 0, j = fontsModel.count; i < j; ++i) {
if (fontsModel.get(i).value == cfg_fontFamily) {
if (fontsModel.get(i).value === cfg_fontFamily) {
fontFamilyComboBox.currentIndex = i
break
}
......@@ -170,7 +170,7 @@ QtLayouts.ColumnLayout {
Component.onCompleted: {
for (var i = 0; i < model.length; i++) {
if (model[i]["name"] == plasmoid.configuration.dateFormat) {
if (model[i]["name"] === plasmoid.configuration.dateFormat) {
dateFormat.currentIndex = i;
}
}
......
......@@ -39,7 +39,7 @@ Item {
id: timeZones
onSelectedTimeZonesChanged: {
if (selectedTimeZones.length == 0) {
if (selectedTimeZones.length === 0) {
messageWidget.visible = true;
timeZones.selectLocalTimeZone();
......
......@@ -32,10 +32,10 @@ import org.kde.draganddrop 2.0 as DragDrop
MouseArea {
id: root
readonly property bool inPanel: (plasmoid.location == PlasmaCore.Types.TopEdge
|| plasmoid.location == PlasmaCore.Types.RightEdge
|| plasmoid.location == PlasmaCore.Types.BottomEdge
|| plasmoid.location == PlasmaCore.Types.LeftEdge)
readonly property bool inPanel: (plasmoid.location === PlasmaCore.Types.TopEdge
|| plasmoid.location === PlasmaCore.Types.RightEdge
|| plasmoid.location === PlasmaCore.Types.BottomEdge
|| plasmoid.location === PlasmaCore.Types.LeftEdge)
readonly property bool constrained: plasmoid.formFactor === PlasmaCore.Types.Vertical || plasmoid.formFactor === PlasmaCore.Types.Horizontal
property bool containsAcceptableDrag: false
......
......@@ -151,14 +151,14 @@ Flow {
property QueryDialog sleepDialog
function clickHandler(what, button) {
if (what == "suspendToDisk") {
if (what === "suspendToDisk") {
if (!hibernateDialog) {
hibernateDialog = hibernateDialogComponent.createObject(lockout);
}
hibernateDialog.visualParent = button
hibernateDialog.open();
} else if (what == "suspendToRam") {
} else if (what === "suspendToRam") {
if (!sleepDialog) {
sleepDialog = sleepDialogComponent.createObject(lockout);
}
......
......@@ -267,7 +267,7 @@ Item {
id: seekTimer
interval: 1000 / expandedRepresentation.rate
repeat: true
running: root.state == "playing" && plasmoid.expanded && !keyPressed && interval > 0 && seekSlider.to >= 1000000
running: root.state === "playing" && plasmoid.expanded && !keyPressed && interval > 0 && seekSlider.to >= 1000000
onTriggered: {
// some players don't continuously update the seek slider position via mpris
// add one second; value in microseconds
......
......@@ -65,7 +65,7 @@ Column {
var errorText = runningJobs[source]["errorText"]
// 1 = ERR_USER_CANCELED - don't show any notification at all
if (error == 1) {
if (error === 1) {
delete runningJobs[source]
return
}
......
......@@ -155,7 +155,7 @@ MouseArea {
topMargin: units.smallSpacing
}
visible: imageItem.nativeWidth == 0 && valid
visible: imageItem.nativeWidth === 0 && valid
animated: false
}
......
......@@ -56,19 +56,19 @@ Column {
function addNotification(notification) {
// Do not show duplicated notifications
for (var i = 0; i < notificationsModel.count; ++i) {
if (notificationsModel.get(i).source == notification.source &&
notificationsModel.get(i).appName == notification.appName &&
notificationsModel.get(i).summary == notification.summary &&
notificationsModel.get(i).body == notification.body) {
if (notificationsModel.get(i).source === notification.source &&
notificationsModel.get(i).appName === notification.appName &&
notificationsModel.get(i).summary === notification.summary &&
notificationsModel.get(i).body === notification.body) {
return
}
}
for (var i = 0; i < notificationsModel.count; ++i) {
if (notificationsModel.get(i).source == notification.source ||
(notificationsModel.get(i).appName == notification.appName &&
notificationsModel.get(i).summary == notification.summary &&
notificationsModel.get(i).body == notification.body)) {
if (notificationsModel.get(i).source === notification.source ||
(notificationsModel.get(i).appName === notification.appName &&
notificationsModel.get(i).summary === notification.summary &&
notificationsModel.get(i).body === notification.body)) {
notificationsModel.remove(i)
break
......@@ -215,7 +215,7 @@ Column {
notificationPositioner.closePopup(source);
for (var i = 0; i < notificationsModel.count; ++i) {
if (notificationsModel.get(i).source == source) {
if (notificationsModel.get(i).source === source) {
notificationsModel.remove(i)
break
}
......@@ -230,9 +230,9 @@ Column {
if (data["actions"] && data["actions"].length % 2 == 0) {
for (var i = 0; i < data["actions"].length; i += 2) {
var action = data["actions"][i]
if (action == "default") { // The default action is not shown, but we want to know it's there
if (action === "default") { // The default action is not shown, but we want to know it's there
_data["hasDefaultAction"] = true
} else if (action == "settings") { // configure icon in the notification for custom notification settings
} else if (action === "settings") { // configure icon in the notification for custom notification settings
_data["hasConfigureAction"] = true;
_data["configurable"] = true;
} else {
......
......@@ -58,7 +58,7 @@ Item {
QtControls.CheckBox {
id: useCustomPopupPositionCheckBox
text: i18n("Use custom position for the notification popup")
checked: plasmoid.nativeInterface.configScreenPosition() != NotificationsHelper.Default
checked: plasmoid.nativeInterface.configScreenPosition() !== NotificationsHelper.Default
}
ScreenPositionSelector {
......
......@@ -28,7 +28,7 @@ Item {
id: root
z: 9999
property bool horizontal: plasmoid.formFactor != PlasmaCore.Types.Vertical
property bool horizontal: plasmoid.formFactor !== PlasmaCore.Types.Vertical
Layout.fillWidth: plasmoid.configuration.expanding
Layout.fillHeight: plasmoid.configuration.expanding
......
......@@ -34,8 +34,8 @@ Item {
width: units.gridUnit * 10
height: units.gridUnit * 10
Plasmoid.preferredRepresentation: plasmoid.fullRepresentation
Layout.minimumWidth: units.gridUnit * 12 * (plasmoid.formFactor == PlasmaCore.Types.Horizontal ? sourcesModel.count : 1)
Layout.minimumHeight: units.gridUnit * 4 * (plasmoid.formFactor == PlasmaCore.Types.Vertical ? sourcesModel.count : 1)
Layout.minimumWidth: units.gridUnit * 12 * (plasmoid.formFactor === PlasmaCore.Types.Horizontal ? sourcesModel.count : 1)
Layout.minimumHeight: units.gridUnit * 4 * (plasmoid.formFactor === PlasmaCore.Types.Vertical ? sourcesModel.count : 1)
Layout.preferredHeight: Layout.minimumHeight
......@@ -43,8 +43,8 @@ Item {
var found = false;
for (var i = 0; i < sourcesModel.count; ++i) {
var obj = sourcesModel.get(i);
if (obj.source1 == encodeURIComponent(source1) &&
obj.source2 == encodeURIComponent(source2)) {
if (obj.source1 === encodeURIComponent(source1) &&
obj.source2 === encodeURIComponent(source2)) {
found = true;
break;
}
......@@ -91,7 +91,7 @@ Item {
onSourceRemoved: {
for (var i = sourcesModel.count - 1; i >= 0; --i) {
var obj = sourcesModel.get(i);
if (obj.source1 == source || obj.source2 == source) {
if (obj.source1 === source || obj.source2 === source) {
sourcesModel.remove(i);
}
}
......@@ -101,7 +101,7 @@ Item {
Connections {
target: plasmoid.configuration
onSourcesChanged: {
if (plasmoid.configuration.sources.length == 0) {
if (plasmoid.configuration.sources.length === 0) {
for (var i in smSource.sources) {
var source = smSource.sources[i];
smSource.sourceAdded(source);
......@@ -136,13 +136,13 @@ Item {
width: parent.width
level: 2
text: plasmoid.title
visible: plasmoid.formFactor != PlasmaCore.Types.Horizontal && plasmoid.formFactor != PlasmaCore.Types.Vertical
visible: plasmoid.formFactor !== PlasmaCore.Types.Horizontal && plasmoid.formFactor !== PlasmaCore.Types.Vertical
}
GridLayout {
rows: 1
columns: 1
flow: plasmoid.formFactor != PlasmaCore.Types.Horizontal ? GridLayout.LeftToRight : GridLayout.TopToBottom
flow: plasmoid.formFactor !== PlasmaCore.Types.Horizontal ? GridLayout.LeftToRight : GridLayout.TopToBottom
anchors {
top: heading.visible ? heading.bottom : parent.top
bottom: parent.bottom
......
......@@ -57,7 +57,7 @@ Item {
var found = false;
for (var i = 0; i < sourcesModel.count; ++i) {
var obj = sourcesModel.get(i);
if (obj.source == source) {
if (obj.source === source) {
found = true;
break;
}
......@@ -82,7 +82,7 @@ Item {
onSourceRemoved: {
for (var i = sourcesModel.count - 1; i >= 0; --i) {
var obj = sourcesModel.get(i);
if (obj.source == source) {
if (obj.source === source) {
sourcesModel.remove(i);
}
}
......
......@@ -38,13 +38,13 @@ KQuickAddons.Plotter {
var c = max - min;
var h;
if (c == 0) {
if (c === 0) {
h = 0
} else if (max == color.r) {
} else if (max === color.r) {
h = ((color.g - color.b) / c) % 6;
} else if (max == color.g) {
} else if (max === color.g) {
h = ((color.b - color.r) / c) + 2;
} else if (max == color.b) {
} else if (max === color.b) {
h = ((color.r - color.g) / c) + 4;
}
var hue = (1/6) * h + (degrees/360);
......@@ -77,7 +77,7 @@ KQuickAddons.Plotter {
PlasmaComponents.Label {
id: speedLabel
wrapMode: Text.WordWrap
visible: plasmoid.formFactor != PlasmaCore.Types.Vertical
visible: plasmoid.formFactor !== PlasmaCore.Types.Vertical
anchors {
right: parent.right
}
......@@ -86,7 +86,7 @@ KQuickAddons.Plotter {
Connections {
target: model.dataSource
onNewData: {
if (sourceName.indexOf(decodeURIComponent(model.source1)) != 0 && sourceName.indexOf(decodeURIComponent(model.source2)) != 0) {
if (sourceName.indexOf(decodeURIComponent(model.source1)) !== 0 && sourceName.indexOf(decodeURIComponent(model.source2)) !== 0) {
return;
}
......@@ -100,7 +100,7 @@ KQuickAddons.Plotter {
plotter.addSample([data1.value, data2.value]);
if (plasmoid.formFactor != PlasmaCore.Types.Vertical) {
if (plasmoid.formFactor !== PlasmaCore.Types.Vertical) {
nameLabel.text = plotter.sensorName
speedLabel.text = i18n("<font color='%1'>⬇</font> %2 | <font color='%3'>⬆</font> %4",
downloadColor,
......
......@@ -52,7 +52,7 @@ KQuickAddons.Plotter {
PlasmaComponents.Label {
id: speedLabel
wrapMode: Text.WordWrap
visible: plasmoid.formFactor != PlasmaCore.Types.Vertical
visible: plasmoid.formFactor !== PlasmaCore.Types.Vertical
anchors {
right: parent.right
}
......@@ -61,7 +61,7 @@ KQuickAddons.Plotter {
Connections {
target: model.dataSource
onNewData: {
if (sourceName.indexOf(decodeURIComponent(model.source1)) != 0) {
if (sourceName.indexOf(decodeURIComponent(model.source1)) !== 0) {
return;
}
......@@ -73,7 +73,7 @@ KQuickAddons.Plotter {
plotter.addSample([data1.value]);
if (plasmoid.formFactor != PlasmaCore.Types.Vertical) {
if (plasmoid.formFactor !== PlasmaCore.Types.Vertical) {
nameLabel.text = plotter.sensorName
speedLabel.text = formatData(data1)
} else {
......
......@@ -68,7 +68,7 @@ Applet {
Connections {
target: model.dataSource
onNewData: {
if (sourceName.indexOf(decodeURIComponent(model.source1)) != 0) {
if (sourceName.indexOf(decodeURIComponent(model.source1)) !== 0) {
return;
}
......
......@@ -31,7 +31,7 @@ PlasmaCore.ToolTipArea {
icon: plasmoid.icon
mainText: plasmoid.toolTipMainText
subText: plasmoid.toolTipSubText
location: if (plasmoid.parent && plasmoid.parent.parent.objectName == "hiddenTasksColumn" && plasmoid.location != PlasmaCore.Types.LeftEdge) {
location: if (plasmoid.parent && plasmoid.parent.parent.objectName === "hiddenTasksColumn" && plasmoid.location !== PlasmaCore.Types.LeftEdge) {
return PlasmaCore.Types.RightEdge;
} else {
return plasmoid.location;
......
......@@ -203,7 +203,7 @@ QtLayouts.GridLayout {
break;
}
case 1: {
if (shownIndex == -1) {
if (shownIndex === -1) {
cfg_shownIt