Skip to contentSkip to conversation

kernel-shark: Always show the true PID of the entry in the Context menu

PATCH New Yordan Karadzhov (VMware) 1 participant 1 message Sep 19, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-shark: Always show the true PID of the entry in the Context menu

All data fields of the kshark_entry object can be modified by plugins (including the Process Id). This is usually done in order to modify the way some events are visualized. However, the Context menu should always show the true (unmodified) value of the PID.

Fixing: 4828dc763 (kernel-shark-qt: Add centralized context menu for View and Graph widgets)

---
 kernel-shark/src/KsQuickContextMenu.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel-shark/src/KsQuickContextMenu.cpp +2 -2
index 728ecbd..a84444e 100644
@@ -142,7 +142,7 @@ KsQuickContextMenu::KsQuickContextMenu(KsDataStore *data, size_t row,
 			descr = "Remove [";
 			descr += taskName;
 			descr += "-";
-			descr += QString("%1").arg(_data->rows()[_row]->pid);
+			descr += QString("%1").arg(pid);
 			descr += "] plot";
 			lamAddAction(&_removeTaskPlotAction,
 				     &KsQuickContextMenu::_removeTaskPlot);
@@ -150,7 +150,7 @@ KsQuickContextMenu::KsQuickContextMenu(KsDataStore *data, size_t row,
 			descr = "Add [";
 			descr += taskName;
 			descr += "-";
-			descr += QString("%1").arg(_data->rows()[_row]->pid);
+			descr += QString("%1").arg(pid);
 			descr += "] plot";
 			lamAddAction(&_addTaskPlotAction,
 				     &KsQuickContextMenu::_addTaskPlot);
Signature · 1 line
2.20.1