diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-11-16 17:13:23 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-11-17 17:45:56 +0000 |
commit | 689334876ec12d5a037e5bb1fad3e0d023890049 (patch) | |
tree | f5e27bf5d30477d22812206c6705c13fbfc3d2fc /ui/qt/sequence_dialog.cpp | |
parent | 44ca31d7a575f54f25439b5d5a76080a1faa2f31 (diff) |
Qt: Fix some flow graph issues.
Make fillDiagram() a slot and call it after the dialog is visible.
Use the activated() signals instead of currentIndexChanged() for our
comboboxes. The former is only emitted as a result of user interaction
and the latter is always emitted when the value changed. This was a
problem for flowComboBox since initializing its value resulted an extra
call to fillDiagram().
Add a progress frame.
Change-Id: I17bcf5c990363ee758be9e3a0604dde34fc34f2d
Ping-Bug: 11710
Reviewed-on: https://code.wireshark.org/review/11897
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/sequence_dialog.cpp')
-rw-r--r-- | ui/qt/sequence_dialog.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/ui/qt/sequence_dialog.cpp b/ui/qt/sequence_dialog.cpp index 37fb64fdb4..50f7e6ec9a 100644 --- a/ui/qt/sequence_dialog.cpp +++ b/ui/qt/sequence_dialog.cpp @@ -24,10 +24,10 @@ #include "epan/addr_resolv.h" -#include <wsutil/utf8_entities.h> - #include "wsutil/nstime.h" +#include "wsutil/utf8_entities.h" +#include "progress_frame.h" #include "sequence_diagram.h" #include "wireshark_application.h" @@ -101,24 +101,18 @@ SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *i ctx_menu_.addSeparator(); ctx_menu_.addAction(ui->actionGoToPacket); - ui->showComboBox->blockSignals(true); ui->showComboBox->setCurrentIndex(0); - ui->showComboBox->blockSignals(false); - ui->addressComboBox->blockSignals(true); ui->addressComboBox->setCurrentIndex(0); - ui->addressComboBox->blockSignals(false); QComboBox *fcb = ui->flowComboBox; fcb->addItem(ui->actionFlowAny->text(), SEQ_ANALYSIS_ANY); fcb->addItem(ui->actionFlowTcp->text(), SEQ_ANALYSIS_TCP); - ui->flowComboBox->blockSignals(true); ui->flowComboBox->setCurrentIndex(info_->sainfo()->type); if (info_->sainfo()->type == SEQ_ANALYSIS_VOIP) { + ui->flowComboBox->blockSignals(true); ui->controlFrame->hide(); - } else { - ui->flowComboBox->blockSignals(false); } QPushButton *save_bt = ui->buttonBox->button(QDialogButtonBox::Save); @@ -127,6 +121,8 @@ SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *i // XXX Use recent settings instead resize(parent.width(), parent.height() * 4 / 5); + ProgressFrame::addToButtonBox(ui->buttonBox, &parent); + connect(ui->horizontalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(hScrollBarChanged(int))); connect(ui->verticalScrollBar, SIGNAL(valueChanged(int)), this, SLOT(vScrollBarChanged(int))); connect(sp->xAxis2, SIGNAL(rangeChanged(QCPRange)), this, SLOT(xAxisChanged(QCPRange))); @@ -138,7 +134,7 @@ SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *i disconnect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept())); - fillDiagram(); + QTimer::singleShot(0, this, SLOT(fillDiagram())); } SequenceDialog::~SequenceDialog() @@ -433,7 +429,7 @@ void SequenceDialog::on_actionGoToPacket_triggered() } } -void SequenceDialog::on_showComboBox_currentIndexChanged(int index) +void SequenceDialog::on_showComboBox_activated(int index) { if (!info_->sainfo()) return; @@ -445,7 +441,7 @@ void SequenceDialog::on_showComboBox_currentIndexChanged(int index) fillDiagram(); } -void SequenceDialog::on_flowComboBox_currentIndexChanged(int index) +void SequenceDialog::on_flowComboBox_activated(int index) { if (!info_->sainfo() || info_->sainfo()->type == SEQ_ANALYSIS_VOIP || index < 0) return; @@ -453,7 +449,7 @@ void SequenceDialog::on_flowComboBox_currentIndexChanged(int index) fillDiagram(); } -void SequenceDialog::on_addressComboBox_currentIndexChanged(int index) +void SequenceDialog::on_addressComboBox_activated(int index) { if (!info_->sainfo()) return; |