From 55a7afdedc7cee2df9012f600dd51aff92ad1af3 Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 5 Apr 2005 11:22:05 +0000 Subject: Added validity checking on the conf parser. Added error object to conf parser. Cleaned up the configure.in script --- src/mainwindow.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/mainwindow.cc') diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 5da340b..8bfc53e 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -50,9 +50,15 @@ MainWindow::MainWindow( QWidget* parent, const char* name ) : QWidget( parent, name, WStyle_Customize | WStyle_NoBorder ) { - MiavConfig cfg("miav.conf"); + error = new Error(); + MiavConfig cfg("miav.conf", error); int resolution_w = cfg.readInt("pixel_width"); int resolution_h = cfg.readInt("pixel_height"); + while(error->hasError()) { + show(); + MessageBox(this, TXT_ERROR_TITLE, error->popErrorString().c_str(), + TYPE_OK, ICON_ERROR).exec(); + } unit = ((float)resolution_w / (float)(cfg.readFloat("screensize") * 3.1f)); move(0,0); -- cgit v1.2.3