aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2023-02-04 22:09:22 -0500
committerJohn Thacker <johnthacker@gmail.com>2023-02-04 22:15:25 -0500
commit4bb43d59869906d8c613e983bc3022d027ed1eb1 (patch)
tree87c9112a78c675c17b6214972b33d892a58fad55 /ui
parent8cddc32d35e36d9962495c3d4358842ea88aac41 (diff)
RTP Stream Dialog: Actually sort on packet loss
The packet loss column has been sorting on a private variable that is never set(?!) and also is unsigned whereas the actual lost number is signed. Get the calculated packet loss number and sort by that. (Should this be sorting by the total number or the percentage, since the column displays both? Total number is first so let's use that.) This should probably be some kind of Model/View instead. Fix #16785.
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/rtp_stream_dialog.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/qt/rtp_stream_dialog.cpp b/ui/qt/rtp_stream_dialog.cpp
index 9148e1ac30..effde6f07c 100644
--- a/ui/qt/rtp_stream_dialog.cpp
+++ b/ui/qt/rtp_stream_dialog.cpp
@@ -229,7 +229,13 @@ public:
case packets_col_:
return stream_info_->packet_count < other_rstwi.stream_info_->packet_count;
case lost_col_:
- return lost_ < other_rstwi.lost_;
+ rtpstream_info_calculate(stream_info_, &calc1);
+ rtpstream_info_calculate(other_rstwi.stream_info_, &calc2);
+ /* XXX: Should this sort on the total number or the percentage?
+ * lost_num is displayed first and lost_perc in parenthesis,
+ * so let's use the total number.
+ */
+ return calc1.lost_num < calc2.lost_num;
case min_delta_col_:
return stream_info_->rtp_stats.min_delta < other_rstwi.stream_info_->rtp_stats.min_delta;
case mean_delta_col_:
@@ -257,7 +263,6 @@ public:
private:
rtpstream_info_t *stream_info_;
- guint32 lost_;
gboolean tod_;
};