diff mbox series

KernelShark: Add guest's stream ID to the combobox item.

Message ID 20200902161118.46163-1-tz.stoyanov@gmail.com
State New
Headers show
Series KernelShark: Add guest's stream ID to the combobox item. | expand

Commit Message

Tzvetomir Stoyanov Sept. 2, 2020, 4:11 p.m. UTC
From: Tzvetomir (VMware)  Stoyanov <tz.stoyanov@gmail.com>

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 <tz.stoyanov@gmail.com>
---
 src/plugins/KVMCombo.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Yordan Karadzhov (VMware) Sept. 3, 2020, 1:53 p.m. UTC | #1
On 2.09.20 г. 19:11 ч., Tzvetomir Stoyanov (VMware) wrote:
> From: Tzvetomir (VMware)  Stoyanov <tz.stoyanov@gmail.com>
> 
> 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 <tz.stoyanov@gmail.com>
> ---
>   src/plugins/KVMCombo.cpp | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/plugins/KVMCombo.cpp b/src/plugins/KVMCombo.cpp
> index 4ca33d4..bc3c6b0 100644
> --- a/src/plugins/KVMCombo.cpp
> +++ b/src/plugins/KVMCombo.cpp
> @@ -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
diff mbox series

Patch

diff --git a/src/plugins/KVMCombo.cpp b/src/plugins/KVMCombo.cpp
index 4ca33d4..bc3c6b0 100644
--- a/src/plugins/KVMCombo.cpp
+++ b/src/plugins/KVMCombo.cpp
@@ -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);