src/hbservers/hbthemeserver/hbthemeserver.cpp
changeset 21 4633027730f5
parent 2 06ff229162e9
child 28 b7da29130b0e
--- a/src/hbservers/hbthemeserver/hbthemeserver.cpp	Tue Jul 06 14:36:53 2010 +0300
+++ b/src/hbservers/hbthemeserver/hbthemeserver.cpp	Wed Aug 18 10:05:37 2010 +0300
@@ -22,44 +22,23 @@
 ** Nokia at developer.feedback@nokia.com.
 **
 ****************************************************************************/
-#include "hbthemeserver_p.h"
-#include <QLabel>
-#include <QDebug>
+
+#include <hbmemoryutils_p.h>
 
+#include "hbthemeserver_p.h"
 #include "hbthemecommon_p.h"
-#include <hbmemoryutils_p.h>
-#ifdef Q_OS_SYMBIAN
 #include "hbthemeserver_symbian_p_p.h"
 #include "hbthemecommon_symbian_p.h"
-#else
-#include "hbthemeserver_generic_p_p.h"
-#endif
 
-#ifdef THEME_SERVER_TRACES
-QLabel *testLabel = 0;
-#endif
+#include <QDebug>
 
 /**
  * Constructor
  */
 
-HbThemeServer::HbThemeServer(QWidget *parent) :
-#ifndef Q_OS_SYMBIAN
-    QMainWindow(parent),
-#endif
+HbThemeServer::HbThemeServer() :
     themeServer(0)
 {
-#ifdef Q_OS_SYMBIAN
-    Q_UNUSED(parent);
-#else
-    statusLabel = new QLabel;
-    statusLabel->setText("Theme Server Started");
-    setCentralWidget(statusLabel);
-    setWindowTitle("Theme Server");
-#ifdef THEME_SERVER_TRACES
-    testLabel = statusLabel;
-#endif
-#endif
 }
 
 /**
@@ -72,7 +51,7 @@
     if (!manager) {
         return success;
     }
-#ifdef Q_OS_SYMBIAN
+
     TRAPD(err, themeServer =  HbThemeServerPrivate::NewL(CActive::EPriorityStandard));
     if (KErrNone != err) {
         return success;
@@ -85,19 +64,6 @@
         qDebug() << Q_FUNC_INFO << "Error Starting SERVER";
 #endif
     }
-#else
-    QT_TRY {
-        themeServer = new HbThemeServerPrivate();
-    } QT_CATCH(const std::bad_alloc &) {
-        return success;
-    }
-    success = themeServer->start();
-    if (!success) {
-#ifdef THEME_SERVER_TRACES
-        qDebug() << Q_FUNC_INFO << "Error Starting SERVER";
-#endif
-    }
-#endif
 
     // Parses the device profiles and device modes and stores in the
     // shared memory.
@@ -106,22 +72,10 @@
 }
 
 /**
- * stopServer
- */
-void HbThemeServer::stopServer()
-{
-#ifndef Q_OS_SYMBIAN
-    delete themeServer;
-    themeServer = 0;
-#endif // Q_OS_SYMBIAN
-}
-
-/**
  * Destructor
  */
 HbThemeServer::~HbThemeServer()
 {
-    stopServer();
     GET_MEMORY_MANAGER(HbMemoryManager::SharedMemory)
     if (manager) {
         manager->releaseInstance(HbMemoryManager::SharedMemory);