aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/rtp_analysis_dialog.cpp
diff options
context:
space:
mode:
authorTomasz Moń <desowin@gmail.com>2019-10-02 16:29:35 +0200
committerAnders Broman <a.broman58@gmail.com>2019-10-02 20:26:43 +0000
commita83ee438462123c097231fcf17d875d1cdb483e8 (patch)
tree763d49a299dffb4f25588dc65bad42eeca665552 /ui/qt/rtp_analysis_dialog.cpp
parent4108b54bc1b5843d952238716626b2694479ccd9 (diff)
Qt: Do not use exec() in RTP dialogs
Favor asynchronous show() as it does not create new event loop. Change-Id: I01982806f87705f04138f15ae8eb084f1d4f9b2c Reviewed-on: https://code.wireshark.org/review/34677 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/rtp_analysis_dialog.cpp')
-rw-r--r--ui/qt/rtp_analysis_dialog.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/ui/qt/rtp_analysis_dialog.cpp b/ui/qt/rtp_analysis_dialog.cpp
index 663e644ab3..f82fbe834a 100644
--- a/ui/qt/rtp_analysis_dialog.cpp
+++ b/ui/qt/rtp_analysis_dialog.cpp
@@ -1004,7 +1004,7 @@ void RtpAnalysisDialog::showPlayer()
#ifdef QT_MULTIMEDIA_LIB
if (num_streams_ < 1) return;
- RtpPlayerDialog rtp_player_dialog(*this, cap_file_);
+ RtpPlayerDialog *rtp_player_dialog = new RtpPlayerDialog(*this, cap_file_);
rtpstream_info_t stream_info;
// XXX We might want to create an "rtp_stream_id_t" struct with only
@@ -1014,7 +1014,7 @@ void RtpAnalysisDialog::showPlayer()
stream_info.packet_count = fwd_statinfo_.packet_count;
stream_info.setup_frame_number = fwd_statinfo_.setup_frame_number;
nstime_copy(&stream_info.start_rel_time, &fwd_statinfo_.start_rel_time);
- rtp_player_dialog.addRtpStream(&stream_info);
+ rtp_player_dialog->addRtpStream(&stream_info);
if (num_streams_ > 1) {
rtpstream_info_init(&stream_info);
@@ -1022,12 +1022,14 @@ void RtpAnalysisDialog::showPlayer()
stream_info.packet_count = rev_statinfo_.packet_count;
stream_info.setup_frame_number = rev_statinfo_.setup_frame_number;
nstime_copy(&stream_info.start_rel_time, &rev_statinfo_.start_rel_time);
- rtp_player_dialog.addRtpStream(&stream_info);
+ rtp_player_dialog->addRtpStream(&stream_info);
}
- connect(&rtp_player_dialog, SIGNAL(goToPacket(int)), this, SIGNAL(goToPacket(int)));
+ connect(rtp_player_dialog, SIGNAL(goToPacket(int)), this, SIGNAL(goToPacket(int)));
- rtp_player_dialog.exec();
+ rtp_player_dialog->setWindowModality(Qt::ApplicationModal);
+ rtp_player_dialog->setAttribute(Qt::WA_DeleteOnClose);
+ rtp_player_dialog->show();
#endif // QT_MULTIMEDIA_LIB
}
@@ -1538,7 +1540,7 @@ void RtpAnalysisDialog::graphClicked(QMouseEvent *event)
{
updateWidgets();
if (event->button() == Qt::RightButton) {
- graph_ctx_menu_.exec(event->globalPos());
+ graph_ctx_menu_.popup(event->globalPos());
}
}