skullandbones / uTmax

uTmax Linux GUI program for the uTracer3 Thermionic Valve Tester
4 stars 3 forks source link

mainwindow: Move file reading and serial port init to main.cpp #9

Closed skullandbones closed 7 years ago

skullandbones commented 7 years ago

The constructor of mainwindow was reading the data.csv which can fail. Unfortunately, a constructor cannot return an error code and it is unwise to exit the program from within a constructor. Therefore, move the reading of the data.csv file into the main function of main.cpp.

Also reading and writing the calibration file can fail so move that as well.

In addion move the serial port initialisation into main() to make it clearer.

Signed-off-by: Dean Jenkins skullandbones99@gmail.com