diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-05-15 13:36:04 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-05-15 21:48:03 +0000 |
commit | a04a894731e6a1bd728484367c597f0bbd437514 (patch) | |
tree | ce860c2ce9c33114ad5298f3371aa4287c1bdfdd /ui/qt/io_graph_dialog.cpp | |
parent | a1eb0aaeb3f8f5448fcd2678a1fc707fc15a1ca6 (diff) |
Qt: Stop tapping when the I/O Graph dialog closes.
Add a setCaptureStopFlag function to ProgressBar. Add a stopTapping
function and setCaptureStopFlag signal to CaptureFile. Use the new
plubming to stop tapping when the IO Graph dialog closes.
Bug: 10116
Change-Id: Ic46814eed18933f511d9d1ff37e2e7918741f353
Reviewed-on: https://code.wireshark.org/review/8480
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/io_graph_dialog.cpp')
-rw-r--r-- | ui/qt/io_graph_dialog.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/qt/io_graph_dialog.cpp b/ui/qt/io_graph_dialog.cpp index 06096ec840..fb7c65a16b 100644 --- a/ui/qt/io_graph_dialog.cpp +++ b/ui/qt/io_graph_dialog.cpp @@ -314,11 +314,13 @@ IOGraphDialog::IOGraphDialog(QWidget &parent, CaptureFile &cf) : IOGraphDialog::~IOGraphDialog() { + cap_file_.stopTapping(); for (int i = 0; i < ui->graphTreeWidget->topLevelItemCount(); i++) { IOGraph *iog = qvariant_cast<IOGraph *>(ui->graphTreeWidget->topLevelItem(i)->data(name_col_, Qt::UserRole)); delete iog; } delete ui; + ui = NULL; } void IOGraphDialog::addGraph(bool checked, QString name, QString dfilter, int color_idx, IOGraph::PlotStyles style, io_graph_item_unit_t value_units, QString yfield, int moving_average) @@ -953,7 +955,8 @@ void IOGraphDialog::updateStatistics() if (need_retap_ && !file_closed_) { need_retap_ = false; cap_file_.retapPackets(); - ui->ioPlot->setFocus(); + // The user might have closed the window while tapping, which means + // we might no longer exist. } else { if (need_recalc_ && !file_closed_) { need_recalc_ = false; |