Restructured the SqlEngine. Not yet finished (see "TODO" in the code).
[toast/confclerk.git] / src / app / main.cpp
index 1dc940a796a53409031ef7338ca4f5e434baa4bb..29f36fbec9f3badf2f178a05050ad27de6fa2f55 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
  * You should have received a copy of the GNU General Public License along with
  * ConfClerk.  If not, see <http://www.gnu.org/licenses/>.
  */
-#include <mainwindow.h>
+#include "mainwindow.h"
 
-#include <sqlengine.h>
+#include "sqlengine.h"
 
 #include "eventdialog.h"
 #include "application.h"
 
 #ifdef MAEMO
-//#include <alarmdialog.h>
-#include <alarmdbus.h>
-#include <alarmdbusadaptorp.h>
+//#include "alarmdialog.h"
+#include "alarmdbus.h"
+#include "alarmdbusadaptorp.h"
 #endif /* MAEMO */
 
 
 int main(int argc, char *argv[])
 {
     Q_INIT_RESOURCE(icons);
-    Q_INIT_RESOURCE(maps);
     Q_INIT_RESOURCE(db);
+    Q_INIT_RESOURCE(data);
 
     Application a(argc, argv);
-    Application::setWindowIcon(QIcon(":/icons/fosdem.png"));
-
-    SqlEngine::initialize(); // creates "SQLITE" DB connection
+    Application::setWindowIcon(QIcon(":/confclerk.svg"));
 
+    // needed by QDesktopServices
+    QCoreApplication::setOrganizationName("Toastfreeware");
+    QCoreApplication::setApplicationName("ConfClerk");
+    QCoreApplication::setApplicationVersion(VERSION);
     QWidget *window;
-
     window = new MainWindow;
 
 
@@ -71,7 +73,7 @@ int main(int argc, char *argv[])
 
     if(argc > 1)
     {
-        EventDialog dialog(atoi(argv[1]),window);
+        EventDialog dialog(atoi(argv[1]), window);
         dialog.exec();
     }
 #endif