44 return dir; |
44 return dir; |
45 } |
45 } |
46 |
46 |
47 |
47 |
48 |
48 |
49 bool Bmsapp::initialize() |
49 bool Bmsapp::initialize(bool useDevelop) |
50 { |
50 { |
51 ensureDirectoriesExist(); |
51 ensureDirectoriesExist(); |
52 readsettings(); |
52 readsettings(); |
53 |
53 |
|
54 // QLocale german(QLocale::German,QLocale::Germany); |
|
55 // QLocale::setDefault(german); |
|
56 |
54 qDebug() << "Loading Database..."; |
57 qDebug() << "Loading Database..."; |
55 |
58 |
56 db = new DataBase(); |
59 db = new DataBase(); |
57 db->connectToDataBase(); |
60 return db->openDataBase(useDevelop); |
58 |
|
59 return true; |
|
60 } |
61 } |
61 |
62 |
62 |
63 |
63 |
64 |
64 void Bmsapp::cleanup() |
65 void Bmsapp::cleanup() |
65 { |
66 { |
66 qDebug() << "BMSapp is cleaning up."; |
67 qDebug() << "BMSapp is cleaning up."; |
67 |
68 |
68 writesettings(); |
69 writesettings(); |
|
70 db->closeDataBase(); |
69 } |
71 } |
70 |
72 |
71 |
73 |
72 |
74 |
73 void Bmsapp::readsettings() |
75 void Bmsapp::readsettings() |