1 #include <QApplication>
4 #include "mainwindow.h"
5 #include "db/databasemanager.h"
6 //#include "dialogs/platformnamedialog.h"
8 int main(int argc, char *argv[])
10 QApplication app(argc, argv);
11 QTextStream cout(stdout, QIODevice::WriteOnly);
13 if (DatabaseManager::openDB())
14 cout << " Database opened succesflly!" << endl;
15 else cout << " Database connection failed!" << endl;
17 if (DatabaseManager::dbExists())
18 cout << " Database exists!" << endl;
21 cout << " Database is missing!" << endl;
22 if (DatabaseManager::createDB())
23 cout << " Database created succesfully!" << endl;
25 cout << "Failed creating database!" << endl;
31 if (dbm.insertPerson("Testi","Tapaus",1) > 0)
32 cout << "Database insert successfull!" << endl;
33 else cout << "Database insert failed!" << endl;
36 cout << "Trying to select from database: " << dbm.getName(1) << endl;
39 /*PlatformNameDialog *nameDialog = new PlatformNameDialog;
41 MainWindow *mw = new MainWindow;