Qt: Fix some leaks in RTP Analysis windows

Parent the QActions that are created for Analyze and Play
buttons for each RTP window, so that they are deleted when
the button is deleted.
This commit is contained in:
John Thacker 2023-02-26 07:49:56 -05:00
parent 6f8eef82b4
commit 4fa5e0f3c9
2 changed files with 2 additions and 2 deletions

View File

@ -1142,7 +1142,7 @@ QToolButton *RtpAnalysisDialog::addAnalyzeButton(QDialogButtonBox *button_box, Q
analysis_button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
analysis_button->setPopupMode(QToolButton::MenuButtonPopup);
ca = new QAction(tr("&Analyze"));
ca = new QAction(tr("&Analyze"), analysis_button);
ca->setToolTip(tr("Open the analysis window for the selected stream(s)"));
connect(ca, SIGNAL(triggered()), dialog, SLOT(rtpAnalysisReplace()));
analysis_button->setDefaultAction(ca);

View File

@ -359,7 +359,7 @@ QToolButton *RtpPlayerDialog::addPlayerButton(QDialogButtonBox *button_box, QDia
player_button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
player_button->setPopupMode(QToolButton::MenuButtonPopup);
ca = new QAction(tr("&Play Streams"));
ca = new QAction(tr("&Play Streams"), player_button);
ca->setToolTip(tr("Open RTP player dialog"));
ca->setIcon(StockIcon("media-playback-start"));
connect(ca, SIGNAL(triggered()), dialog, SLOT(rtpPlayerReplace()));