src/hbcore/theme/hbtheme.cpp
changeset 7 923ff622b8b9
parent 6 c3690ec91ef8
child 23 e6ad4ef83b23
child 34 ed14f46c0e55
--- a/src/hbcore/theme/hbtheme.cpp	Wed Jun 23 18:33:25 2010 +0300
+++ b/src/hbcore/theme/hbtheme.cpp	Tue Jul 06 14:36:53 2010 +0300
@@ -112,7 +112,6 @@
 HbTheme::HbTheme() : d_ptr(new HbThemePrivate) 
 {
     d_ptr->q_ptr = this;
-    d_ptr->fetchCurrentThemeFromSettings();
     d_ptr->handleThemeChange();
 }
 
@@ -129,12 +128,14 @@
 */
 HbThemePrivate::HbThemePrivate()
 {
+#ifdef Q_OS_SYMBIAN
     // Condition added to check if the client itself is server.
     if(THEME_SERVER_NAME != HbMemoryUtils::getCleanAppName()) {
         if(!HbThemeClient::global()->connectToServer()) {
             qWarning() << "ThemeClient unable to connect to server in HbThemePrivate::HbThemePrivate.";
         }
     }
+#endif
 }
 
 /*!
@@ -142,29 +143,13 @@
 */
 HbThemePrivate::~HbThemePrivate()
 {
+#ifdef Q_OS_SYMBIAN
     HbThemeClient::releaseInstance();
     GET_MEMORY_MANAGER( HbMemoryManager::HeapMemory )
     if (manager) {
         manager->releaseInstance(HbMemoryManager::HeapMemory);
     }
-}
-
-/*!
-    Retrieves the current theme from setting
-*/
-void HbThemePrivate::fetchCurrentThemeFromSettings()
-{
-    HbThemeIndexInfo info = HbThemeUtils::getThemeIndexInfo(ActiveTheme);
-    if (info.address) {
-        currentTheme = info.name;
-        return;
-    }
-    
-    // Fallback to settings
-    currentTheme = HbThemeUtils::getThemeSetting(HbThemeUtils::CurrentThemeSetting);
-    if (currentTheme.trimmed().isEmpty()){
-        currentTheme = HbThemeUtils::defaultTheme().name;
-    }
+#endif
 }
 
 /*!
@@ -190,9 +175,6 @@
     iconTheme.setCurrentTheme(newTheme);
     HbEffectTheme::instance()->setCurrentTheme(newTheme);
     
-    // The server sends the signal only if the theme is changed from the previous theme
-    // Hence here, we need not check whether the theme differs from currentTheme or not.
-    currentTheme = newTheme;
     // This should be used to replace pixmaps from the old theme with the pixmaps from the new theme
     // In application side this is needed only when icon size can be different in different theme.
     iconTheme.emitUpdateIcons();
@@ -203,7 +185,7 @@
 }
 
 /*!
-    Clears the contents to reload new css files
+    Clears the contents to reload new files
 */
 void HbThemePrivate::updateTheme(const QStringList &updatedFiles)
 {