diff options
author | Peter Wu <peter@lekensteyn.nl> | 2016-11-23 16:28:34 +0100 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2016-11-29 20:57:01 +0000 |
commit | 7fe45cc0ec4e8bc1c3d5cd27c98feb8ecbb2b1b4 (patch) | |
tree | 20063f16d6c60234457f4a710bf471e4869b9b66 /ui/qt | |
parent | f96ef34b19dd074fd013b06667e6c368fa31150c (diff) |
Qt: fix GoToPacket when Voip Calls dialog is closed
After opening the Call Flows dialog from the Voip Calls dialog, followed
by closing the Voip Calls dialog, the Go To Packet functionality in the
Call Flows dialog is broken. That happens because the signal is not
proxied anymore.
Just remove all these indirections via signals and directly update the
selected packet.
Change-Id: I9c6d519dbe800e4dfdf0407d832f17819b344e46
Reviewed-on: https://code.wireshark.org/review/18933
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt')
-rw-r--r-- | ui/qt/sequence_dialog.cpp | 8 | ||||
-rw-r--r-- | ui/qt/sequence_dialog.h | 3 | ||||
-rw-r--r-- | ui/qt/voip_calls_dialog.cpp | 3 |
3 files changed, 5 insertions, 9 deletions
diff --git a/ui/qt/sequence_dialog.cpp b/ui/qt/sequence_dialog.cpp index 8dcbb2ac8f..268125889e 100644 --- a/ui/qt/sequence_dialog.cpp +++ b/ui/qt/sequence_dialog.cpp @@ -24,6 +24,7 @@ #include "epan/addr_resolv.h" +#include "file.h" #include "wsutil/nstime.h" #include "wsutil/utf8_entities.h" @@ -180,7 +181,6 @@ SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *i connect(sp, SIGNAL(mousePress(QMouseEvent*)), this, SLOT(diagramClicked(QMouseEvent*))); connect(sp, SIGNAL(mouseMove(QMouseEvent*)), this, SLOT(mouseMoved(QMouseEvent*))); connect(sp, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(mouseWheeled(QWheelEvent*))); - connect(this, SIGNAL(goToPacket(int)), seq_diagram_, SLOT(setSelectedPacket(int))); disconnect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept())); } @@ -515,7 +515,8 @@ void SequenceDialog::on_resetButton_clicked() void SequenceDialog::on_actionGoToPacket_triggered() { if (!file_closed_ && packet_num_ > 0) { - emit goToPacket(packet_num_); + cf_goto_frame(cap_file_.capFile(), packet_num_); + seq_diagram_->setSelectedPacket(packet_num_); } } @@ -565,7 +566,8 @@ void SequenceDialog::goToAdjacentPacket(bool next) } sp->yAxis->moveRange(range_offset); } - emit goToPacket(adjacent_packet); + cf_goto_frame(cap_file_.capFile(), adjacent_packet); + seq_diagram_->setSelectedPacket(adjacent_packet); } } diff --git a/ui/qt/sequence_dialog.h b/ui/qt/sequence_dialog.h index 52ce6e6e88..91abf40ff7 100644 --- a/ui/qt/sequence_dialog.h +++ b/ui/qt/sequence_dialog.h @@ -64,9 +64,6 @@ public: explicit SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *info = NULL); ~SequenceDialog(); -signals: - void goToPacket(int packet_num); - protected: void showEvent(QShowEvent *event); void resizeEvent(QResizeEvent *event); diff --git a/ui/qt/voip_calls_dialog.cpp b/ui/qt/voip_calls_dialog.cpp index 73282a02f4..e41014ec7f 100644 --- a/ui/qt/voip_calls_dialog.cpp +++ b/ui/qt/voip_calls_dialog.cpp @@ -556,9 +556,6 @@ void VoipCallsDialog::showSequence() } SequenceDialog *sequence_dialog = new SequenceDialog(parent_, cap_file_, sequence_info_); - // XXX This goes away when we close the VoIP Calls dialog. - connect(sequence_dialog, SIGNAL(goToPacket(int)), - this, SIGNAL(goToPacket(int))); sequence_dialog->show(); } |