summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--smglobals.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/smglobals.cpp b/smglobals.cpp
index 58ecf84..b73c89b 100644
--- a/smglobals.cpp
+++ b/smglobals.cpp
@@ -28,6 +28,7 @@
#include "seriesmetadatamodel.h"
#include "mappingtreemodel.h"
#include "pictureviewer2.h"
+#include "configurationdialog.h"
SmGlobals *SmGlobals::mInstance = 0;
@@ -49,7 +50,11 @@ SmGlobals *SmGlobals::instance(){
db.setPassword(s.value("database/dbpass").toString());
db.setDatabaseName(s.value("database/dbname").toString());
if(!db.open()){
- QMessageBox::critical(0, tr("Error"), tr("Could not open database. Please configure it and restart program."));
+ QMessageBox::critical(0, tr("Error"), tr("Could not open database."));
+ ConfigurationDialog configDlg;
+ configDlg.exec();
+ QMessageBox::information(0, tr("Notice"), tr("I will exit now. Start me again!"));
+ exit(EXIT_SUCCESS);
}
}
}