webengine/widgetengine/src/Preferences.cpp
changeset 13 10e98eab6f85
parent 0 dd21522fd290
child 27 60c5402cb945
--- a/webengine/widgetengine/src/Preferences.cpp	Fri May 08 08:25:06 2009 +0300
+++ b/webengine/widgetengine/src/Preferences.cpp	Fri Jul 03 15:54:40 2009 +0100
@@ -115,7 +115,7 @@
 //
 //
 // ----------------------------------------------------------------------------
-TInt WidgetPreferences::preferenceL( const TDesC& akey, TPtrC& avalue)
+TInt WidgetPreferences::preferenceL( const TDesC& akey, HBufC*& avalue)
 {
 
     TInt rSuccess = KErrNotFound;
@@ -159,7 +159,7 @@
                         HBufC* v = HBufC::NewLC( len );
                         TPtr ptrvalue = v->Des();
                         readStream.ReadL( ptrvalue, len );    
-                        avalue.Set( *v );
+                        avalue = v; // ownership xfered
                         CleanupStack::Pop( v );
                         rSuccess = KErrNone;
                     }     
@@ -170,7 +170,7 @@
             }
         }        
         else if ( size >= 0 ) {
-            avalue.Set( pref->value() );
+            avalue = pref->value().AllocL();
             rSuccess = KErrNone;
         }