messagingapp/smartmessaging/ringbc/src/ringbc_p.cpp
branchGCC_SURGE
changeset 47 5b14749788d7
parent 27 e4592d119491
parent 43 35b64624a9e7
--- a/messagingapp/smartmessaging/ringbc/src/ringbc_p.cpp	Thu Jun 17 09:57:06 2010 +0100
+++ b/messagingapp/smartmessaging/ringbc/src/ringbc_p.cpp	Thu Jul 22 16:32:06 2010 +0100
@@ -25,7 +25,7 @@
 // USER INCLUDES
 #include "ringbc_p.h"
 #include "ringbctoneconverter.h"
-#include "s60qconversions.h"
+#include <xqconversions.h>
 #include "debugtraces.h"
 
 //CONSTANTS 
@@ -129,7 +129,7 @@
 
     CleanupClosePushL(fsSession);
 
-    HBufC* fileName = S60QConversions::qStringToS60Desc(path);
+    HBufC* fileName = XQConversions::qStringToS60Desc(path);
 
     RFile file;
     User::LeaveIfError(file.Open(fsSession, fileName->Des(),
@@ -142,7 +142,6 @@
     HBufC8* dataBuf = HBufC8::NewLC(size);
     TPtr8 data(dataBuf->Des());
     User::LeaveIfError(file.Read(data, size));
-    CleanupStack::PopAndDestroy(&file);
 
     TBool valid = mConverter->IsRingToneMimeTypeL(data);
 
@@ -152,7 +151,7 @@
         TFileName path = PathInfo::PhoneMemoryRootPath();
         path.Append(PathInfo::SimpleSoundsPath());
         path.Append(*title);
-        HBufC* fileExtension = S60QConversions::qStringToS60Desc(extension);
+        HBufC* fileExtension = XQConversions::qStringToS60Desc(extension);
         path.Append(fileExtension->Des());
 
         CFileMan* fileMan = CFileMan::NewL(fsSession);
@@ -166,9 +165,9 @@
         }
 
     CleanupStack::PopAndDestroy(); // dataBuf
+    CleanupStack::PopAndDestroy(); //file
     CleanupStack::PopAndDestroy(); //fsSession
 
-
     QDEBUG_WRITE("RingBcPrivate::saveToneL : Exit")
     }
 
@@ -184,7 +183,7 @@
     QStringList pathList = path.split(".");
     QString extension = pathList.at(pathList.count() - 1);
 
-    HBufC* fileName = S60QConversions::qStringToS60Desc(path);
+    HBufC* fileName = XQConversions::qStringToS60Desc(path);
     TRAP_IGNORE( title = titleL(*fileName));
     
     title.append(QChar('.'));
@@ -227,7 +226,7 @@
                 if (valid)
                     {
                     HBufC* toneTitle = mConverter->TitleLC(data);
-                    title = S60QConversions::s60DescToQString(*toneTitle);
+                    title = XQConversions::s60DescToQString(*toneTitle);
                     CleanupStack::PopAndDestroy(); //title
                     }
                 CleanupStack::PopAndDestroy(); //dataBuf