aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/rtp_stream_dialog.cpp
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2023-05-09 20:57:55 -0400
committerJohn Thacker <johnthacker@gmail.com>2023-05-10 11:18:09 +0000
commit37dd1d007bbf1f4adba450c5e20c26f6edb5aa56 (patch)
tree4ba45a20a4c2a47c665e93db26e49926a8e628a5 /ui/qt/rtp_stream_dialog.cpp
parent3d6f4cdb9fd975bff9608daa990f2c75c19271a8 (diff)
Qt: Avoid unnecessary retaps when creating RTP and VOIP dialogs
Similar to 5bc94bc02a9f006a5eec504506a147f48d3101eb. Don't use the automatic connection set up by Qt uic but manually connect the display filter checkbox signal to its slot. This allows us to initialize the checkbox and filter status without calling the slot and retapping the packets in the middle of constructor. There's always an tap triggered at the end of the constructor, so we don't want to do a second one before the dialog appears if the main display filter is set.
Diffstat (limited to 'ui/qt/rtp_stream_dialog.cpp')
-rw-r--r--ui/qt/rtp_stream_dialog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/qt/rtp_stream_dialog.cpp b/ui/qt/rtp_stream_dialog.cpp
index 0a3d0d8cd1..72bfe0b087 100644
--- a/ui/qt/rtp_stream_dialog.cpp
+++ b/ui/qt/rtp_stream_dialog.cpp
@@ -359,6 +359,8 @@ RtpStreamDialog::RtpStreamDialog(QWidget &parent, CaptureFile &cf) :
ui->displayFilterCheckBox->setChecked(true);
}
+ connect(ui->displayFilterCheckBox, &QCheckBox::toggled,
+ this, &RtpStreamDialog::displayFilterCheckBoxToggled);
connect(this, SIGNAL(updateFilter(QString, bool)),
&parent, SLOT(filterPackets(QString, bool)));
connect(&parent, SIGNAL(displayFilterSuccess(bool)),
@@ -904,7 +906,7 @@ void RtpStreamDialog::on_buttonBox_helpRequested()
mainApp->helpTopicAction(HELP_TELEPHONY_RTP_STREAMS_DIALOG);
}
-void RtpStreamDialog::on_displayFilterCheckBox_toggled(bool checked _U_)
+void RtpStreamDialog::displayFilterCheckBoxToggled(bool checked)
{
if (!cap_file_.isValid()) {
return;