appinstaller/AppMngr2/Widget/src/appmngr2widgetappinfo.cpp
branchRCL_3
changeset 19 7ca52d38f8c3
parent 5 3eebb1e54d3a
child 65 7333d7932ef7
--- a/appinstaller/AppMngr2/Widget/src/appmngr2widgetappinfo.cpp	Fri Mar 12 15:43:14 2010 +0200
+++ b/appinstaller/AppMngr2/Widget/src/appmngr2widgetappinfo.cpp	Mon Mar 15 12:41:05 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -49,6 +49,7 @@
     CancelCommand();
     delete iName;
     delete iDetails;
+    delete iMimeType;
     }
 
 // ---------------------------------------------------------------------------
@@ -116,7 +117,7 @@
                 CleanupStack::Pop( swInstLauncher );
                 iSWInstLauncher = swInstLauncher;
                 }
-            iSWInstLauncher->Uninstall( aStatus, iWidgetUid, KDataTypeWidget );
+            iSWInstLauncher->Uninstall( aStatus, iWidgetUid, *iMimeType );
             return;     // async operation started
 
         default:
@@ -177,13 +178,16 @@
 void CAppMngr2WidgetAppInfo::ConstructL( const CWidgetInfo& aWidget )
     {
     CAppMngr2AppInfo::ConstructL();
-    
+
     iWidgetUid = aWidget.iUid;
     iName = aWidget.iBundleName->AllocL();
     iDetails = SizeStringWithUnitsL( aWidget.iFileSize );
 
     iLocationDrive = TDriveUnit( *aWidget.iDriveName );
     iLocation = TAppMngr2DriveUtils::LocationFromDriveL( iLocationDrive, iFs );
+
+    CAppMngr2WidgetRuntime& runtime( static_cast<CAppMngr2WidgetRuntime&>( Runtime() ) );
+    iMimeType = runtime.GetMimeTypeL( iWidgetUid );
     }
 
 // ---------------------------------------------------------------------------