Fix Symbian bugs.
[dorian] / main.cpp
index 7de740b..b655866 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -44,22 +44,26 @@ int main(int argc, char *argv[])
     Trace::setFileName(settings->value("tracefilename").toString());
     qInstallMsgHandler(Trace::messageHandler);
 
-#ifdef Q_OS_SYMBIAN
+#if 0 // def Q_OS_SYMBIAN
     // Show splash screen
     Splash *splash = new Splash();
     splash->showFullScreen();
+    // splash->showMaximized();
+    splash->raise();
     a.processEvents();
 #endif
 
-    // Create main window, run event loop
-    {
-        MainWindow w;
-#ifdef Q_OS_SYMBIAN
-        splash->close();
-        splash->deleteLater();
+    // Create and initialize main window, then run event loop
+    MainWindow *mainWindow = new MainWindow();
+    settings->apply();
+    mainWindow->initialize();
+#if 0 // def Q_OS_SYMBIAN
+    splash->close();
+    delete splash;
+    mainWindow->showNormal();
 #endif
-        ret = a.exec();
-    }
+    ret = a.exec();
+    delete mainWindow;
 
     // Re-start application if event loop exit code was 1000
     if (ret == 1000) {