diff options
-rw-r--r-- | ui/qt/rtp_analysis_dialog.cpp | 14 | ||||
-rw-r--r-- | ui/qt/rtp_player_dialog.h | 2 | ||||
-rw-r--r-- | ui/qt/voip_calls_dialog.cpp | 11 |
3 files changed, 16 insertions, 11 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()); } } diff --git a/ui/qt/rtp_player_dialog.h b/ui/qt/rtp_player_dialog.h index 26101068a0..fe8f833231 100644 --- a/ui/qt/rtp_player_dialog.h +++ b/ui/qt/rtp_player_dialog.h @@ -56,7 +56,7 @@ public: void reject(); /** Add an RTP stream to play. - * MUST be called before exec(). + * MUST be called before show(). * Requires src_addr, src_port, dest_addr, dest_port, ssrc, packet_count, * setup_frame_number, and start_rel_time. * diff --git a/ui/qt/voip_calls_dialog.cpp b/ui/qt/voip_calls_dialog.cpp index 71cc128581..6f4a72c8c1 100644 --- a/ui/qt/voip_calls_dialog.cpp +++ b/ui/qt/voip_calls_dialog.cpp @@ -390,13 +390,14 @@ void VoipCallsDialog::showSequence() } SequenceDialog *sequence_dialog = new SequenceDialog(parent_, cap_file_, sequence_info_); + sequence_dialog->setAttribute(Qt::WA_DeleteOnClose); sequence_dialog->show(); } void VoipCallsDialog::showPlayer() { #ifdef QT_MULTIMEDIA_LIB - RtpPlayerDialog rtp_player_dialog(*this, cap_file_); + RtpPlayerDialog *rtp_player_dialog = new RtpPlayerDialog(*this, cap_file_); foreach (QModelIndex index, ui->callTreeView->selectionModel()->selectedIndexes()) { voip_calls_info_t *vci = VoipCallsInfoModel::indexToCallInfo(index); @@ -411,14 +412,16 @@ void VoipCallsDialog::showPlayer() // rsi->call_num, rsi->start_fd->num, rsi->setup_frame_number); if (vci->call_num == static_cast<guint>(rsi->call_num)) { //VOIP_CALLS_DEBUG("adding call number %u", vci->call_num); - rtp_player_dialog.addRtpStream(rsi); + rtp_player_dialog->addRtpStream(rsi); } } } - 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 } |