When we close a main window, delete the welcome screen, which in turn

deletes the interface list, which in turn kills off the dumpcap process
it may be running. This should hopefully keep us from leaving dumpcap
processes running in the background on Windows. (Am I the only one
running QtShark on that platform?)

svn path=/trunk/; revision=51485
This commit is contained in:
Gerald Combs 2013-08-23 02:34:51 +00:00
parent 4daaf4fb57
commit 186babc6ba
2 changed files with 5 additions and 3 deletions

View File

@ -73,11 +73,10 @@ InterfaceTree::~InterfaceTree() {
while (*iter) {
QList<int> *points;
QVariant v;
v = (*iter)->data(1, Qt::UserRole);
points = v.value<QList<int> *>();
points = (*iter)->data(1, Qt::UserRole).value<QList<int> *>();
delete(points);
++iter;
}
}

View File

@ -386,6 +386,9 @@ void MainWindow::closeEvent(QCloseEvent *event) {
return;
}
// Make sure we kill any open dumpcap processes.
delete main_welcome_;
if(testCaptureFileClose(true)) {
/* QCoreApplication::quit() won't exit properly
* because when during initialization phase we are not in the event loop */