diff -r f7ac710697a9 -r 06ff229162e9 src/hbservers/hbthemeserver/hbthemeserver.cpp --- a/src/hbservers/hbthemeserver/hbthemeserver.cpp Mon May 03 12:48:33 2010 +0300 +++ b/src/hbservers/hbthemeserver/hbthemeserver.cpp Fri May 14 16:09:54 2010 +0300 @@ -43,13 +43,15 @@ * Constructor */ +HbThemeServer::HbThemeServer(QWidget *parent) : +#ifndef Q_OS_SYMBIAN + QMainWindow(parent), +#endif + themeServer(0) +{ #ifdef Q_OS_SYMBIAN -HbThemeServer::HbThemeServer(): themeServer(0) + Q_UNUSED(parent); #else -HbThemeServer::HbThemeServer(QWidget *parent): QMainWindow(parent), themeServer(0) -#endif -{ -#ifndef Q_OS_SYMBIAN statusLabel = new QLabel; statusLabel->setText("Theme Server Started"); setCentralWidget(statusLabel); @@ -100,10 +102,18 @@ // Parses the device profiles and device modes and stores in the // shared memory. HbThemeServerUtils::createDeviceProfileDatabase(); + return success; +} - //Creates the secondary Cache. - HbThemeServerUtils::createSharedCache(); - return success; +/** + * stopServer + */ +void HbThemeServer::stopServer() +{ +#ifndef Q_OS_SYMBIAN + delete themeServer; + themeServer = 0; +#endif // Q_OS_SYMBIAN } /** @@ -111,7 +121,7 @@ */ HbThemeServer::~HbThemeServer() { - delete themeServer; + stopServer(); GET_MEMORY_MANAGER(HbMemoryManager::SharedMemory) if (manager) { manager->releaseInstance(HbMemoryManager::SharedMemory);