Valgrind memory bugfixes + auto port extension

This commit is contained in:
Jan Käberich 2020-10-31 23:03:34 +01:00
parent 7f691bd37d
commit a5c9f1e3d3
19 changed files with 183 additions and 45 deletions

View file

@ -59,8 +59,6 @@ AppWindow::AppWindow(QWidget *parent)
device = nullptr;
ui->setupUi(this);
// ui->statusbar->insertPermanentWidget(0, &lDeviceStatus);
// ui->statusbar->insertPermanentWidget(1, new QPushButton("Test"));
ui->statusbar->addWidget(&lConnectionStatus);
auto div1 = new QFrame;
div1->setFrameShape(QFrame::VLine);
@ -91,8 +89,6 @@ AppWindow::AppWindow(QWidget *parent)
auto vna = new VNA(this);
new Generator(this);
new SpectrumAnalyzer(this);
// auto signalGenWidget = new Signalgenerator;
// modeSGen = new GUIMode(this, "Signal Generator", signalGenWidget);
// UI connections
connect(ui->actionUpdate_Device_List, &QAction::triggered, this, &AppWindow::UpdateDeviceList);
@ -112,6 +108,11 @@ AppWindow::AppWindow(QWidget *parent)
// settings might have changed, update necessary stuff
TraceXYPlot::updateGraphColors();
});
connect(ui->actionAbout, &QAction::triggered, [=](){
auto commit = QString(GITHASH);
commit.truncate(7);
QMessageBox::about(this, "About", "More information: github.com/jankae/VNA2\n\nVersion: " + commit);
});
setWindowTitle("VNA");
@ -137,6 +138,11 @@ AppWindow::AppWindow(QWidget *parent)
}
}
AppWindow::~AppWindow()
{
delete ui;
}
void AppWindow::closeEvent(QCloseEvent *event)
{
delete device;