Disable streamNumberSpinBox while reloading capture

When changing stream in TCPStreamDialog it should not be possible
to change stream again until the capture has reloaded, because
this will give a crash when doing graph_segment_list_free() or
graph_segment_list_get() while already doing this.

Also disable mouseMove event (showing packet details) while reloading,
as this also will give a crash.

We should consider also having a reload progress bar in the
TCPStreamDialog to indicate that this is happening when having
large capture files, as the main window may not be visible.

Change-Id: I622f9e0de8205bc1fd18101dc03100079d7a2d06
Reviewed-on: https://code.wireshark.org/review/10159
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
Stig Bjørlykke 2015-08-20 21:39:12 +02:00
parent 47c9aa4673
commit 25ec198dd4
1 changed files with 6 additions and 0 deletions

View File

@ -325,8 +325,14 @@ void TCPStreamDialog::mouseReleaseEvent(QMouseEvent *event)
void TCPStreamDialog::findStream()
{
QCustomPlot *sp = ui->streamPlot;
disconnect(sp, SIGNAL(mouseMove(QMouseEvent*)), this, SLOT(mouseMoved(QMouseEvent*)));
ui->streamNumberSpinBox->setEnabled(false);
graph_segment_list_free(&graph_);
graph_segment_list_get(cap_file_, &graph_, TRUE);
ui->streamNumberSpinBox->setEnabled(true);
connect(sp, SIGNAL(mouseMove(QMouseEvent*)), this, SLOT(mouseMoved(QMouseEvent*)));
}
void TCPStreamDialog::fillGraph()