KernelShark: Add guest's stream ID to the combobox item.
PATCH 1/1 KernelShark: Add guest's stream ID to the combobox item.
From: Tzvetomir (VMware) Stoyanov <[email protected]>
When a new stream is added to the list of guest streams in the ComboBox plugin, attach the stream ID to the entry as well. Later, when the stream is selected from the list, this ID is used to get information of the stream.
Signed-off-by Tzvetomir (VMware) Stoyanov <[email protected]>
--- src/plugins/KVMCombo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/plugins/KVMCombo.cpp +1 -1
@@ -269,7 +269,7 @@ void KsComboPlotDialog::update() continue; streamName = KsUtils::streamDescription(kshark_ctx->stream[sd]); - _guestStreamComboBox.addItem(streamName); + _guestStreamComboBox.addItem(streamName, sd); color << colTable[sd]; _guestStreamComboBox.setItemData(i, QBrush(color), Qt::BackgroundRole);
Signature · 1 line
2.26.2
Quoted 18 lines · Tzvetomir Stoyanov (VMware)
From: Tzvetomir (VMware) Stoyanov <[email protected]>
When a new stream is added to the list of guest streams in the ComboBox plugin, attach the stream ID to the entry as well. Later, when the stream is selected from the list, this ID is used to get information of the stream.
Signed-off-by Tzvetomir (VMware) Stoyanov <[email protected]>--- src/plugins/KVMCombo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/plugins/KVMCombo.cpp +0
-0
src/plugins/KVMCombo.cpp void KsComboPlotDialog::update() · line 275
Quoted 8 lines
src/plugins/KVMCombo.cpp +1
-1@@ -269,7 +269,7 @@ void KsComboPlotDialog::update() continue; streamName = KsUtils::streamDescription(kshark_ctx->stream[sd]); - _guestStreamComboBox.addItem(streamName); + _guestStreamComboBox.addItem(streamName, sd); color << colTable[sd]; _guestStreamComboBox.setItemData(i, QBrush(color), Qt::BackgroundRole);
Thanks Ceco!
The patch is applied.
Yordan