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>
This commit is contained in:
parent
c18bc1291d
commit
971333665c
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue