diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2017-12-24 14:00:37 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-12-26 12:02:58 +0000 |
commit | 971333665c1c74f22c3c6cd211f3edc5c0b28e00 (patch) | |
tree | c652d104ab321b931113c3e67680185adf4343fd /ui/qt/follow_stream_dialog.cpp | |
parent | c18bc1291d42423e907d2ce0b3d4f39ecd59e675 (diff) |
qt: follow stream: use the new CaptureEvent signal
The signals related to capture events were refactored recently. Adjust
the follow stream dialogue to use the new CaptureEvent signal instead of
the now removed signal CaptureFileClosing.
Filter for context==file, event==closing in the signal handler.
Change-Id: I2d75b424fbf0a6734b0290aa205dd3d0c1ce053f
Reviewed-on: https://code.wireshark.org/review/24980
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/follow_stream_dialog.cpp')
-rw-r--r-- | ui/qt/follow_stream_dialog.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ui/qt/follow_stream_dialog.cpp b/ui/qt/follow_stream_dialog.cpp index 9fc5d93421..5ea649b5ac 100644 --- a/ui/qt/follow_stream_dialog.cpp +++ b/ui/qt/follow_stream_dialog.cpp @@ -145,7 +145,8 @@ FollowStreamDialog::FollowStreamDialog(QWidget &parent, CaptureFile &cf, follow_ this, SLOT(fillHintLabel(int))); connect(ui->teStreamContent, SIGNAL(mouseClickedOnTextCursorPosition(int)), this, SLOT(goToPacketForTextPos(int))); - connect(&cap_file_, SIGNAL(captureFileClosing()), this, SLOT(captureFileClosing())); + connect(&cap_file_, SIGNAL(captureEvent(CaptureEvent *)), + this, SLOT(captureEvent(CaptureEvent *))); fillHintLabel(-1); } @@ -970,12 +971,15 @@ bool FollowStreamDialog::follow(QString previous_filter, bool use_stream_index, return true; } -void FollowStreamDialog::captureFileClosing() +void FollowStreamDialog::captureEvent(CaptureEvent *e) { - QString tooltip = tr("File closed."); - ui->streamNumberSpinBox->setToolTip(tooltip); - ui->streamNumberLabel->setToolTip(tooltip); - WiresharkDialog::captureFileClosing(); + if ((e->captureContext() == CaptureEvent::File) && + (e->eventType() == CaptureEvent::Closing)) { + QString tooltip = tr("File closed."); + ui->streamNumberSpinBox->setToolTip(tooltip); + ui->streamNumberLabel->setToolTip(tooltip); + WiresharkDialog::captureFileClosing(); + } } /* |