Fix QT UI bugs in RTP dialogs

- RTP analysis and player dialogs are modal whereas they were not modal in GTK
UI
Only fixed calling up the RTP analysis window being modal when called from the
RTP streams dialog as it is modeless when called from the menu in the main
window with a stream packet selected.

- Action 'Next problem packet' triggers an infinite loop when there are no
'problem packets' and first packet is selected when calling the action.

- Crosshairs not implemented in RTP player/crosshairs context menu item not
working.
Context menu item commented out.

bug: 13500
Change-Id: I0ba954f895b85605462c316e4426280ec4d437b2
Reviewed-on: https://code.wireshark.org/review/20660
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Erik de Jong 2017-03-20 19:11:46 +01:00 committed by Anders Broman
parent 50a30c194f
commit 9e35c0bc8b
3 changed files with 6 additions and 5 deletions

View File

@ -513,8 +513,8 @@ void RtpAnalysisDialog::on_actionNextProblem_triggered()
QTreeWidgetItem *sel_ti = cur_tree->selectedItems()[0];
if (sel_ti->type() != rtp_analysis_type_) return;
QTreeWidgetItem *test_ti = cur_tree->itemBelow(sel_ti);
if (!test_ti) test_ti = cur_tree->topLevelItem(0);
while (test_ti != sel_ti) {
if (!test_ti) test_ti = cur_tree->topLevelItem(0);
RtpAnalysisTreeWidgetItem *ra_ti = dynamic_cast<RtpAnalysisTreeWidgetItem *>((RtpAnalysisTreeWidgetItem *)test_ti);
if (!ra_ti->frameStatus()) {
cur_tree->setCurrentItem(ra_ti);
@ -522,6 +522,7 @@ void RtpAnalysisDialog::on_actionNextProblem_triggered()
}
test_ti = cur_tree->itemBelow(test_ti);
if (!test_ti) test_ti = cur_tree->topLevelItem(0);
}
}

View File

@ -129,7 +129,7 @@ RtpPlayerDialog::RtpPlayerDialog(QWidget &parent, CaptureFile &cf) :
ctx_menu_->addSeparator();
ctx_menu_->addAction(ui->actionDragZoom);
ctx_menu_->addAction(ui->actionToggleTimeOrigin);
ctx_menu_->addAction(ui->actionCrosshairs);
// ctx_menu_->addAction(ui->actionCrosshairs);
connect(ui->audioPlot, SIGNAL(mouseMove(QMouseEvent*)),
this, SLOT(updateHintLabel()));

View File

@ -468,9 +468,9 @@ void RtpStreamDialog::on_actionAnalyze_triggered()
if (stream_a == NULL && stream_b == NULL) return;
RtpAnalysisDialog rtp_analysis_dialog(*this, cap_file_, stream_a, stream_b);
connect(&rtp_analysis_dialog, SIGNAL(goToPacket(int)), this, SIGNAL(goToPacket(int)));
rtp_analysis_dialog.exec();
RtpAnalysisDialog *rtp_analysis_dialog = new RtpAnalysisDialog(*this, cap_file_, stream_a, stream_b);
connect(rtp_analysis_dialog, SIGNAL(goToPacket(int)), this, SIGNAL(goToPacket(int)));
rtp_analysis_dialog->show();
}
void RtpStreamDialog::on_actionCopyAsCsv_triggered()