browserui/browser/BrowserAppSrc/BrowserContentView.cpp
branchRCL_3
changeset 36 c9249d037530
parent 34 5dedbccec665
child 39 08ffbd51e3fd
--- a/browserui/browser/BrowserAppSrc/BrowserContentView.cpp	Wed Mar 31 21:35:49 2010 +0300
+++ b/browserui/browser/BrowserAppSrc/BrowserContentView.cpp	Wed Apr 14 16:00:33 2010 +0300
@@ -161,7 +161,6 @@
     delete iNaviDecorator;
     delete iBookmarksModel;
     delete iContainer;
-    delete iEnteredURL;
     delete iEnteredKeyword;
     delete iTextZoomLevelArray;
     delete iFontSizeArray;
@@ -197,7 +196,6 @@
     iContainer->FindKeywordPane()->SetGPObserver(this);
     iEnteredKeyword = NULL;
 
-    iEnteredURL = NULL;
     // get the StatusPane pointer
     if ( !iNaviPane )
         {
@@ -1683,10 +1681,8 @@
     {
     if ( iContainer->GotoPane() )
         {
-        delete iEnteredURL;
-        iEnteredURL = NULL;
-        iEnteredURL = iContainer->GotoPane()->GetTextL(); // the url
-        if( iEnteredURL )
+        HBufC* url  = iContainer->GotoPane()->GetTextL(); // the url
+        if( url )
             {
             iContainer->ShutDownGotoURLEditorL();
 
@@ -1706,7 +1702,7 @@
             UpdateCbaL();
             UpdateFullScreenL();
 
-            ApiProvider().FetchL(   iEnteredURL->Des(),
+            ApiProvider().FetchL(   url->Des(),
                                     KNullDesC,
                                     KNullDesC,
                                     accessPoint,
@@ -1762,14 +1758,17 @@
     CCoeEnv::Static()->AppUi()->RemoveFromStack( iContainer->GotoPane() );
     CCoeEnv::Static()->AppUi()->AddToStackL( iContainer->GotoPane(), ECoeStackPriorityMenu );
     iContainer->GotoPane()->MakeVisible( ETrue );
-    if ( iEnteredURL && iEnteredURL->Length() )
+    HBufC* url = ApiProvider().BrCtlInterface().PageInfoLC(
+            TBrCtlDefs::EPageInfoUrl );
+    if ( url && url->Length() )
        {
-            iContainer->GotoPane()->SetTextL(*iEnteredURL);
+            iContainer->GotoPane()->SetTextL(*url);
             iContainer->GotoPane()->SelectAllL();
+            CleanupStack::PopAndDestroy(); // url
        }
     else
         {
-            // nor iEnteredURL; use default name.
+            // nor url; use default name.
             // set "http://www." per Browser UI spec
             iContainer->GotoPane()->SetTextL(KWWWString  );
         }