Qt: show more infos about why interfaces are not loaded.
Change-Id: Ie5a28587f711282fd5d83b5513b42594c73ca514 Reviewed-on: https://code.wireshark.org/review/29996 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
c36f11ba55
commit
c21ecc1308
|
@ -249,8 +249,9 @@ void InterfaceFrame::resetInterfaceTreeDisplay()
|
||||||
{
|
{
|
||||||
ui->interfaceTree->setHidden(true);
|
ui->interfaceTree->setHidden(true);
|
||||||
ui->lblNoInterfaces->setHidden(false);
|
ui->lblNoInterfaces->setHidden(false);
|
||||||
|
|
||||||
ui->lblNoInterfaces->setText( proxyModel.interfaceError() );
|
ui->lblNoInterfaces->setText( proxyModel.interfaceError() );
|
||||||
|
if ( prefs.capture_no_interface_load )
|
||||||
|
ui->lblNoInterfaces->setText( "Interfaces not loaded (due to preference)" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -372,6 +373,11 @@ void InterfaceFrame::getPoints(int idx, PointList * pts)
|
||||||
sourceModel.getPoints(idx, pts);
|
sourceModel.getPoints(idx, pts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InterfaceFrame::showRunOnFile(void)
|
||||||
|
{
|
||||||
|
ui->lblNoInterfaces->setText("Interfaces not loaded on startup (run on capture file)");
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Editor modelines
|
* Editor modelines
|
||||||
*
|
*
|
||||||
|
|
|
@ -58,6 +58,7 @@ public slots:
|
||||||
void toggleRemoteInterfaces();
|
void toggleRemoteInterfaces();
|
||||||
#endif
|
#endif
|
||||||
void getPoints(int idx, PointList *pts);
|
void getPoints(int idx, PointList *pts);
|
||||||
|
void showRunOnFile();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void hideEvent(QHideEvent *evt);
|
void hideEvent(QHideEvent *evt);
|
||||||
|
|
|
@ -198,6 +198,8 @@ bool MainWindow::openCaptureFile(QString cf_path, QString read_filter, unsigned
|
||||||
ret = false;
|
ret = false;
|
||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this->welcome_page_->getInterfaceFrame()->showRunOnFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO detect call from "cf_read" -> "update_progress_dlg"
|
// TODO detect call from "cf_read" -> "update_progress_dlg"
|
||||||
|
@ -248,7 +250,6 @@ bool MainWindow::openCaptureFile(QString cf_path, QString read_filter, unsigned
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (cf_read(CaptureFile::globalCapFile(), FALSE)) {
|
switch (cf_read(CaptureFile::globalCapFile(), FALSE)) {
|
||||||
|
|
||||||
case CF_READ_OK:
|
case CF_READ_OK:
|
||||||
case CF_READ_ERROR:
|
case CF_READ_ERROR:
|
||||||
/* Just because we got an error, that doesn't mean we were unable
|
/* Just because we got an error, that doesn't mean we were unable
|
||||||
|
@ -267,6 +268,7 @@ bool MainWindow::openCaptureFile(QString cf_path, QString read_filter, unsigned
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get_dirname overwrites its path.
|
// get_dirname overwrites its path.
|
||||||
wsApp->setLastOpenDir(get_dirname(cf_path.toUtf8().data()));
|
wsApp->setLastOpenDir(get_dirname(cf_path.toUtf8().data()));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue