2357 { |
2357 { |
2358 // Get version |
2358 // Get version |
2359 CWidgetPropertyValue* version = |
2359 CWidgetPropertyValue* version = |
2360 iWidgetRegistry.GetWidgetPropertyValueL(aUid, EBundleVersion ); |
2360 iWidgetRegistry.GetWidgetPropertyValueL(aUid, EBundleVersion ); |
2361 CleanupStack::PushL( version ); |
2361 CleanupStack::PushL( version ); |
2362 TCatalogsVersion::ConvertL( aVersion, *(version->iValue.s) ); |
2362 |
|
2363 // Convert version |
|
2364 if (version->iValue.s) |
|
2365 { |
|
2366 TCatalogsVersion::ConvertL( aVersion, *(version->iValue.s) ); |
|
2367 } |
|
2368 else |
|
2369 { |
|
2370 // version does not exist, set default (0.0.1) |
|
2371 aVersion.iMajor = 0; |
|
2372 aVersion.iMinor = 0; |
|
2373 aVersion.iBuild = 1; |
|
2374 } |
|
2375 |
2363 CleanupStack::PopAndDestroy( version ); |
2376 CleanupStack::PopAndDestroy( version ); |
2364 return (ETrue); |
2377 return (ETrue); |
2365 } |
2378 } |
2366 else |
2379 else |
2367 { |
2380 { |
2401 (widgetInfo->iUid, EBundleIdentifier ); |
2414 (widgetInfo->iUid, EBundleIdentifier ); |
2402 CleanupStack::PushL( bundleId ); |
2415 CleanupStack::PushL( bundleId ); |
2403 |
2416 |
2404 if( aIdentifier.Compare( *(bundleId->iValue.s) )== 0 ) |
2417 if( aIdentifier.Compare( *(bundleId->iValue.s) )== 0 ) |
2405 { |
2418 { |
|
2419 // Get version |
2406 CWidgetPropertyValue* version = |
2420 CWidgetPropertyValue* version = |
2407 iWidgetRegistry.GetWidgetPropertyValueL |
2421 iWidgetRegistry.GetWidgetPropertyValueL |
2408 (widgetInfo->iUid, EBundleVersion ); |
2422 (widgetInfo->iUid, EBundleVersion ); |
2409 CleanupStack::PushL( version ); |
2423 CleanupStack::PushL( version ); |
2410 TCatalogsVersion::ConvertL( aVersion, *(version->iValue.s) ); |
2424 |
|
2425 // Convert version |
|
2426 if (version->iValue.s) |
|
2427 { |
|
2428 TCatalogsVersion::ConvertL( aVersion, *(version->iValue.s) ); |
|
2429 } |
|
2430 else |
|
2431 { |
|
2432 // version does not exist, set default (0.0.1) |
|
2433 aVersion.iMajor = 0; |
|
2434 aVersion.iMinor = 0; |
|
2435 aVersion.iBuild = 1; |
|
2436 } |
2411 |
2437 |
2412 CleanupStack::PopAndDestroy( version ); |
2438 CleanupStack::PopAndDestroy( version ); |
2413 CleanupStack::PopAndDestroy( bundleId ); |
2439 CleanupStack::PopAndDestroy( bundleId ); |
2414 CleanupStack::PopAndDestroy( &widgetInfoArr ); |
2440 CleanupStack::PopAndDestroy( &widgetInfoArr ); |
2415 |
2441 |