Commit f7516196 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇 Committed by Eike Hein
Browse files

[Task Manager] Fix URL comparison

You cannot compare to `null` but to empty string.
This was done to disable "Pin" when no launcher URL is available but not properly executed in "Start New Instance"

Test Plan:
5.12 branch
* "Launch new instance" is now disabled for e.g. wine notepad where it wouldn't work anyway (second change)
* "Pin" is still properly checked depending on whether the task is pinned or not (first change)

Reviewers: #plasma, hein

Reviewed By: #plasma, hein

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent 476ec86c
......@@ -52,7 +52,7 @@ PlasmaComponents.ContextMenu {
minimumWidth: visualParent.width
onStatusChanged: {
if (visualParent && get(atm.LauncherUrlWithoutIcon) != null && status == PlasmaComponents.DialogStatus.Open) {
if (visualParent && get(atm.LauncherUrlWithoutIcon) != "" && status == PlasmaComponents.DialogStatus.Open) {
launcherToggleAction.checked = (tasksModel.launcherPosition(get(atm.LauncherUrlWithoutIcon)) != -1);
......@@ -434,7 +434,7 @@ PlasmaComponents.ContextMenu {
id: startNewInstanceItem
visible: (visualParent && get(atm.IsLauncher) !== true && get(atm.IsStartup) !== true)
enabled: visualParent && get(atm.LauncherUrlWithoutIcon) != null
enabled: visualParent && get(atm.LauncherUrlWithoutIcon) != ""
text: i18n("Start New Instance")
icon: "system-run"
Supports Markdown
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