src/hbservers/hbthemeserver/hbthemeserver_symbian.cpp
changeset 6 c3690ec91ef8
parent 5 627c4a0fd0e7
child 7 923ff622b8b9
--- a/src/hbservers/hbthemeserver/hbthemeserver_symbian.cpp	Fri Jun 11 13:58:22 2010 +0300
+++ b/src/hbservers/hbthemeserver/hbthemeserver_symbian.cpp	Wed Jun 23 18:33:25 2010 +0300
@@ -289,32 +289,25 @@
         themeLookupPath.append(themeName);
         QString filename(themeLookupPath);
         filename.append("\\index.theme");
-        QFile file;
 
         filename[0] = 'C';
-        file.setFileName(filename);
-        if (file.open(QIODevice::ReadOnly)) {
+        if (QFile::exists(filename)) {
             themeLookupPath[0] = 'C';
             themePath = themeLookupPath;
-            file.close();
             return true;
         }
 
         filename[0] = 'E';
-        file.setFileName(filename);
-        if (file.open(QIODevice::ReadOnly)) {
+        if (QFile::exists(filename)) {
             themeLookupPath[0] = 'E';
             themePath = themeLookupPath;
-            file.close();
             return true;
         }
 
         filename[0] = 'F';
-        file.setFileName(filename);
-        if (file.open(QIODevice::ReadOnly)) {
+        if (QFile::exists(filename)) {
             themeLookupPath[0] = 'F';
             themePath = themeLookupPath;
-            file.close();
             return true;
         }        
         
@@ -834,10 +827,6 @@
         GetSharedIconInfoL(aMessage);
         break;
 
-    case EThemeSelection:
-        HandleThemeSelectionL(aMessage);
-        break;
-
     case EMultiPieceIcon:
         GetSharedMultiIconInfoL(aMessage);
         break;
@@ -1306,30 +1295,6 @@
 }
 
 /**
- * handleThemeSelectionL
- */
-void HbThemeServerSession::HandleThemeSelectionL(const RMessage2& aMessage)
-{
-    TInt deslen = aMessage.GetDesLength(0);
-    RBuf buffer;
-    buffer.CreateL(deslen);
-    buffer.CleanupClosePushL();
-    aMessage.ReadL(0, buffer, 0);
-    if (buffer.Length() == 0) {
-        User::Leave(ENonNumericString);
-    }
-    QString newTheme((QChar*)buffer.Ptr(), buffer.Length());
-    CleanupStack::PopAndDestroy(); // close the buffer
-
-    QString cleanThemeName = newTheme.trimmed();
-
-    if (cleanThemeName != iServer->iCurrentThemeName) {
-        iServer->HandleThemeSelection(cleanThemeName);
-        sessionData.clear();
-    }
-}
-
-/**
  * Panics the client
  */
 void HbThemeServerSession::PanicClient(const RMessage2& aMessage, TInt aPanic) const