aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2017-12-24 14:00:37 +0100
committerAnders Broman <a.broman58@gmail.com>2017-12-26 12:02:58 +0000
commit971333665c1c74f22c3c6cd211f3edc5c0b28e00 (patch)
treec652d104ab321b931113c3e67680185adf4343fd /ui/qt
parentc18bc1291d42423e907d2ce0b3d4f39ecd59e675 (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')
-rw-r--r--ui/qt/follow_stream_dialog.cpp16
-rw-r--r--ui/qt/follow_stream_dialog.h2
2 files changed, 11 insertions, 7 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();
+ }
}
/*
diff --git a/ui/qt/follow_stream_dialog.h b/ui/qt/follow_stream_dialog.h
index 2c644c7e3a..5e210a0dd6 100644
--- a/ui/qt/follow_stream_dialog.h
+++ b/ui/qt/follow_stream_dialog.h
@@ -57,7 +57,7 @@ public:
bool follow(QString previous_filter = QString(), bool use_stream_index = false, int stream_num = -1);
public slots:
- void captureFileClosing();
+ void captureEvent(CaptureEvent *e);
protected:
bool eventFilter(QObject *obj, QEvent *event);