# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1282113798 -10800 # Node ID 59575560d1e63898c953e62d48af8b9550a40492 # Parent 8db05346071be65ade0fad000b716c2998ac7814 Revision: 201031 Kit: 201033 diff -r 8db05346071b -r 59575560d1e6 location_plat/location_data_harvester_api/inc/locationdatalookupdb.h --- a/location_plat/location_data_harvester_api/inc/locationdatalookupdb.h Tue Jul 06 14:10:28 2010 +0300 +++ b/location_plat/location_data_harvester_api/inc/locationdatalookupdb.h Wed Aug 18 09:43:18 2010 +0300 @@ -217,10 +217,18 @@ */ QString getAddressDetails( quint32 mId , quint32 mSourceType ); + /** + * Gets single line address + * @param id , id of the entry + * @param sourceType , type of entry + * @param name , name of entry + */ + void updateEntryNameByIdAndType(quint32 id, quint32 sourceType , QString name); + private: // fills the lookup entry - void fillLookupEntry( QSqlQuery &aRecord, QLookupItem &aLookupItem ); + void fillLookupEntry( QSqlQuery &aRecord, QLookupItem &aLookupItem ); // Handle to the items database QSqlDatabase *mDb; diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/bwins/locationdatalookupdbu.def --- a/locationdataharvester/bwins/locationdatalookupdbu.def Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/bwins/locationdatalookupdbu.def Wed Aug 18 09:43:18 2010 +0300 @@ -16,4 +16,5 @@ ?fillLookupEntry@LocationDataLookupDb@@AAEXAAVQSqlQuery@@AAVQLookupItem@@@Z @ 15 NONAME ; void LocationDataLookupDb::fillLookupEntry(class QSqlQuery &, class QLookupItem &) ?open@LocationDataLookupDb@@QAE_NXZ @ 16 NONAME ; bool LocationDataLookupDb::open(void) ??_ELocationDataLookupDb@@UAE@I@Z @ 17 NONAME ; LocationDataLookupDb::~LocationDataLookupDb(unsigned int) + ?updateEntryNameByIdAndType@LocationDataLookupDb@@QAEXIIVQString@@@Z @ 18 NONAME ; void LocationDataLookupDb::updateEntryNameByIdAndType(unsigned int, unsigned int, class QString) diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/bwins/mylocationsdatabasemanageru.def --- a/locationdataharvester/bwins/mylocationsdatabasemanageru.def Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/bwins/mylocationsdatabasemanageru.def Wed Aug 18 09:43:18 2010 +0300 @@ -1,9 +1,10 @@ EXPORTS ?UpdateMapTilePath@CMyLocationsDatabaseManager@@QAEXKKAAV?$TBuf@$0BAA@@@@Z @ 1 NONAME ; void CMyLocationsDatabaseManager::UpdateMapTilePath(unsigned long, unsigned long, class TBuf<256> &) - ?GetLandmarkFullAddress@CMyLocationsDatabaseManager@@QAEXAAV?$TBuf@$0PP@@@PBVCPosLandmark@@@Z @ 2 NONAME ; void CMyLocationsDatabaseManager::GetLandmarkFullAddress(class TBuf<255> &, class CPosLandmark const *) - ?ConstructL@CMyLocationsDatabaseManager@@QAEXXZ @ 3 NONAME ; void CMyLocationsDatabaseManager::ConstructL(void) - ?CheckIfAddressChanged@CMyLocationsDatabaseManager@@QAEHABVTDesC16@@KW4TUidSourceType@@@Z @ 4 NONAME ; int CMyLocationsDatabaseManager::CheckIfAddressChanged(class TDesC16 const &, unsigned long, enum TUidSourceType) - ?UpdateDatabaseL@CMyLocationsDatabaseManager@@QAEXPAVCPosLandmark@@KKK@Z @ 5 NONAME ; void CMyLocationsDatabaseManager::UpdateDatabaseL(class CPosLandmark *, unsigned long, unsigned long, unsigned long) - ??0CMyLocationsDatabaseManager@@QAE@XZ @ 6 NONAME ; CMyLocationsDatabaseManager::CMyLocationsDatabaseManager(void) - ?CheckIfAddressChanged@CMyLocationsDatabaseManager@@QAEHABVCPosLandmark@@KW4TUidSourceType@@@Z @ 7 NONAME ; int CMyLocationsDatabaseManager::CheckIfAddressChanged(class CPosLandmark const &, unsigned long, enum TUidSourceType) + ?UpdateEntryName@CMyLocationsDatabaseManager@@QAEXKW4TUidSourceType@@ABVTDesC16@@@Z @ 2 NONAME ; void CMyLocationsDatabaseManager::UpdateEntryName(unsigned long, enum TUidSourceType, class TDesC16 const &) + ?GetLandmarkFullAddress@CMyLocationsDatabaseManager@@QAEXAAV?$TBuf@$0PP@@@PBVCPosLandmark@@@Z @ 3 NONAME ; void CMyLocationsDatabaseManager::GetLandmarkFullAddress(class TBuf<255> &, class CPosLandmark const *) + ?ConstructL@CMyLocationsDatabaseManager@@QAEXXZ @ 4 NONAME ; void CMyLocationsDatabaseManager::ConstructL(void) + ?CheckIfAddressChanged@CMyLocationsDatabaseManager@@QAEHABVTDesC16@@KW4TUidSourceType@@@Z @ 5 NONAME ; int CMyLocationsDatabaseManager::CheckIfAddressChanged(class TDesC16 const &, unsigned long, enum TUidSourceType) + ?UpdateDatabaseL@CMyLocationsDatabaseManager@@QAEXPAVCPosLandmark@@KKK@Z @ 6 NONAME ; void CMyLocationsDatabaseManager::UpdateDatabaseL(class CPosLandmark *, unsigned long, unsigned long, unsigned long) + ??0CMyLocationsDatabaseManager@@QAE@XZ @ 7 NONAME ; CMyLocationsDatabaseManager::CMyLocationsDatabaseManager(void) + ?CheckIfAddressChanged@CMyLocationsDatabaseManager@@QAEHABVCPosLandmark@@KW4TUidSourceType@@@Z @ 8 NONAME ; int CMyLocationsDatabaseManager::CheckIfAddressChanged(class CPosLandmark const &, unsigned long, enum TUidSourceType) diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/eabi/locationdatalookupdbu.def --- a/locationdataharvester/eabi/locationdatalookupdbu.def Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/eabi/locationdatalookupdbu.def Wed Aug 18 09:43:18 2010 +0300 @@ -20,4 +20,5 @@ _ZN20LocationDataLookupDbD2Ev @ 19 NONAME _ZTI20LocationDataLookupDb @ 20 NONAME _ZTV20LocationDataLookupDb @ 21 NONAME + _ZN20LocationDataLookupDb26updateEntryNameByIdAndTypeEjj7QString @ 22 NONAME diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/eabi/mylocationsdatabasemanageru.def --- a/locationdataharvester/eabi/mylocationsdatabasemanageru.def Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/eabi/mylocationsdatabasemanageru.def Wed Aug 18 09:43:18 2010 +0300 @@ -1,10 +1,11 @@ EXPORTS _ZN27CMyLocationsDatabaseManager10ConstructLEv @ 1 NONAME _ZN27CMyLocationsDatabaseManager15UpdateDatabaseLEP12CPosLandmarkmmm @ 2 NONAME - _ZN27CMyLocationsDatabaseManager17UpdateMapTilePathEmmR4TBufILi256EE @ 3 NONAME - _ZN27CMyLocationsDatabaseManager21CheckIfAddressChangedERK12CPosLandmarkm14TUidSourceType @ 4 NONAME - _ZN27CMyLocationsDatabaseManager21CheckIfAddressChangedERK7TDesC16m14TUidSourceType @ 5 NONAME - _ZN27CMyLocationsDatabaseManager22GetLandmarkFullAddressER4TBufILi255EEPK12CPosLandmark @ 6 NONAME - _ZN27CMyLocationsDatabaseManagerC1Ev @ 7 NONAME - _ZN27CMyLocationsDatabaseManagerC2Ev @ 8 NONAME + _ZN27CMyLocationsDatabaseManager15UpdateEntryNameEm14TUidSourceTypeRK7TDesC16 @ 3 NONAME + _ZN27CMyLocationsDatabaseManager17UpdateMapTilePathEmmR4TBufILi256EE @ 4 NONAME + _ZN27CMyLocationsDatabaseManager21CheckIfAddressChangedERK12CPosLandmarkm14TUidSourceType @ 5 NONAME + _ZN27CMyLocationsDatabaseManager21CheckIfAddressChangedERK7TDesC16m14TUidSourceType @ 6 NONAME + _ZN27CMyLocationsDatabaseManager22GetLandmarkFullAddressER4TBufILi255EEPK12CPosLandmark @ 7 NONAME + _ZN27CMyLocationsDatabaseManagerC1Ev @ 8 NONAME + _ZN27CMyLocationsDatabaseManagerC2Ev @ 9 NONAME diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/geocodeupdate/src/geocodeupdate.cpp --- a/locationdataharvester/geocodeupdate/src/geocodeupdate.cpp Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/geocodeupdate/src/geocodeupdate.cpp Wed Aug 18 09:43:18 2010 +0300 @@ -127,8 +127,11 @@ AgendaGeoValue geoValue; geoValue.setLatLong(latitude, longitude); MYLOCLOGSTRING("latitude and longitude set to AgendaGeoValue object."); - agendaEntry.setGeoValue(geoValue); - ret = mAgendaUtil->updateEntry(agendaEntry); + if( !agendaEntry.isNull() ) + { + agendaEntry.setGeoValue(geoValue); + ret = mAgendaUtil->store(agendaEntry); + } } return ret; } diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/inc/mylocationsdefines.h --- a/locationdataharvester/inc/mylocationsdefines.h Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/inc/mylocationsdefines.h Wed Aug 18 09:43:18 2010 +0300 @@ -126,7 +126,7 @@ const int MapTileHeight = 250; const int MaptilePortraitWidth = 334; const int MaptilePortraitHeight = 250; -const int MaptileContactLandscapeWidth = 382; +const int MaptileContactLandscapeWidth = 409; const int MaptileContactLandscapeHeight = 128; const int MaptileCalendarLandscapeWidth = 614; const int MaptileCalendarLandscapeHeight = 202; diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/locationdatalookupdb/locationdatalookupdb.cpp --- a/locationdataharvester/locationdatalookupdb/locationdatalookupdb.cpp Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/locationdatalookupdb/locationdatalookupdb.cpp Wed Aug 18 09:43:18 2010 +0300 @@ -339,6 +339,28 @@ } } + +// --------------------------------------------------------- +// LocationDataLookupDb::updateEntryNameById() +// --------------------------------------------------------- +void LocationDataLookupDb::updateEntryNameByIdAndType(quint32 aSourceId, quint32 aSourceType , QString aName) +{ + if( mDbOpen ) + { + QSqlQuery query(*mDb); + query.prepare("UPDATE lplookup SET " + "name = ? " + "WHERE sourceid = ? AND sourcetype = ?"); + + query.addBindValue( aName ); + + query.addBindValue( aSourceId ); + query.addBindValue( aSourceType ); + + query.exec(); + } +} + // --------------------------------------------------------- // LocationDataLookupDb::deleteEntryBySourceIdAndType() // --------------------------------------------------------- @@ -518,19 +540,19 @@ // --------------------------------------------------------- // LocationDataLookupDb::getAddressDetails() // --------------------------------------------------------- -QString LocationDataLookupDb::getAddressDetails( quint32 mId , quint32 mSourceType ) +QString LocationDataLookupDb::getAddressDetails( quint32 aId , quint32 aSourceType ) { QString addressDetails; if (mDbOpen) { QSqlQuery query(*mDb); - if (mSourceType == ESourceContactsPref || mSourceType - == ESourceContactsWork || mSourceType == ESourceContactsHome) + if ( aSourceType == ESourceContactsPref || aSourceType + == ESourceContactsWork || aSourceType == ESourceContactsHome) { query.prepare("SELECT * FROM lplookup " "WHERE sourceid = ? AND sourcetype = ?"); - query.addBindValue(mId); - query.addBindValue(mSourceType); + query.addBindValue( aId ); + query.addBindValue( aSourceType ); query.exec(); if (query.first()) { QSqlRecord rec = query.record(); @@ -579,11 +601,11 @@ } } - else if (mSourceType == ESourceCalendar) + else if (aSourceType == ESourceCalendar) { query.prepare("SELECT * FROM lplookupaddress " "WHERE sourceid = ? "); - query.addBindValue(mId); + query.addBindValue( aId ); query.exec(); if ( query.first() ) { @@ -626,8 +648,9 @@ { QSqlQuery query(*mDb); query.prepare( "SELECT * FROM lplookup " - "WHERE sourcetype = ?" ); + "WHERE sourcetype = ? AND duplicate = ?" ); query.addBindValue( ESourceCalendar ); + query.addBindValue( 0 ); query.exec(); qDebug("size %d",query.size()); @@ -656,7 +679,9 @@ // else // all contents { QSqlQuery query(*mDb); - query.prepare( "SELECT * FROM lplookup" ); + query.prepare( "SELECT * FROM lplookup" + "WHERE duplicate = ?" ); + query.addBindValue( 0 ); query.exec(); int count=0; while( query.next() ) count++; diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/maptileservice/conf/maptilecontactpublisher.qcrml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationdataharvester/maptileservice/conf/maptilecontactpublisher.qcrml Wed Aug 18 09:43:18 2010 +0300 @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/maptileservice/conf/maptilepublisher.qcrml --- a/locationdataharvester/maptileservice/conf/maptilepublisher.qcrml Tue Jul 06 14:10:28 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/maptileservice/maptileservice.pro --- a/locationdataharvester/maptileservice/maptileservice.pro Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/maptileservice/maptileservice.pro Wed Aug 18 09:43:18 2010 +0300 @@ -66,7 +66,7 @@ -lflogger \ -lefsrv - myCrml.sources = ./conf/maptilepublisher.qcrml + myCrml.sources = ./conf/maptilecontactpublisher.qcrml myCrml.path = c:/resource/qt/crml DEPLOYMENT += myCrml diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/maptileservice/src/maptileservice.cpp --- a/locationdataharvester/maptileservice/src/maptileservice.cpp Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/maptileservice/src/maptileservice.cpp Wed Aug 18 09:43:18 2010 +0300 @@ -35,7 +35,7 @@ const TInt KEnableLocationFeature = 0x1; const char *MAPTILE_STATUS_RECEIVER = "/maptilestatuspublisher/name"; -const char *MAPTILE_STATUS_PUBLISHER = "/maptilepublisher"; +const char *MAPTILE_STATUS_PUBLISHER = "/maptilecontactpublisher"; const char *MAPTILE_STATUS_CALENDAR_PUBLISHER = "/maptilecalpublisher"; @@ -86,7 +86,7 @@ bool MapTileService::isLocationFeatureEnabled(AppType appType) { //Create the centrep with uid 0x2002C3A8 - bool iLocationFeatureEnabled = false; + bool enableLocationFeature = false; CRepository* centralRepository = NULL; @@ -108,13 +108,13 @@ if ( ret == KErrNone && repValue == 1 ) { - iLocationFeatureEnabled = true; + enableLocationFeature = true; } delete centralRepository; } - return iLocationFeatureEnabled; + return enableLocationFeature; } diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/mylocationlogger/inc/mylocloggingconfiguration.h --- a/locationdataharvester/mylocationlogger/inc/mylocloggingconfiguration.h Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/mylocationlogger/inc/mylocloggingconfiguration.h Wed Aug 18 09:43:18 2010 +0300 @@ -25,7 +25,7 @@ * Have this line active if you want to have logging for this component. * Comment this line out if you don't want any logging for this component. */ -#define _MYLOCLOGGING +//#define _MYLOCLOGGING /** * Have this line active if you want to have logging to file. diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/mylocationsdatabasemanager/inc/mylocationsdatabasemanager.h --- a/locationdataharvester/mylocationsdatabasemanager/inc/mylocationsdatabasemanager.h Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/mylocationsdatabasemanager/inc/mylocationsdatabasemanager.h Wed Aug 18 09:43:18 2010 +0300 @@ -90,7 +90,17 @@ */ IMPORT_C void UpdateMapTilePath( TUint32 aSourceId, TUint32 aSourceType, TFileName& aFilePath ); - + + /** Update the maptile path to mylocation lookup table + * + * @param[in] aSourceId Uid of the changed source entry. + * @param[in] aSourceType Source type of the aSourceId. + * @param[in] aName entry name. + */ + + IMPORT_C void UpdateEntryName( TUint32 aSourceId, TUidSourceType aSourceType, + const TDesC& aName ); + /** Compare the address details to lplookupaddres table * * @param aLandmarks , address formed as landmark object @@ -202,11 +212,12 @@ /** * UnsetDuplicateNextCalEntry. - * Finds a calendar lookup entry whose detination id is aLandmarkId + * Finds next calendar lookup entry whose detination id is aLandmarkId * and unsets it duplcate flag. + * @param[in] aCurrentCalUid current calendar entry id. * @param[in] aLandmarkId a landmark id. */ - void UnsetDuplicateNextCalEntry( quint32 aLandmarkId ); + void UnsetDuplicateNextCalEntry( quint32 aCurrentCalUid, quint32 aLandmarkId ); /** * IsDuplicateCalEntry. diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/mylocationsdatabasemanager/src/mylocationsdatabasemanager.cpp --- a/locationdataharvester/mylocationsdatabasemanager/src/mylocationsdatabasemanager.cpp Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/mylocationsdatabasemanager/src/mylocationsdatabasemanager.cpp Wed Aug 18 09:43:18 2010 +0300 @@ -480,7 +480,7 @@ // if current lookup item duplicate property is 0, then remove next corresponding // calendar lookup entry duplicate property. // this is required because the current entry will be pointing to a new landmark. - UnsetDuplicateNextCalEntry( existingLandmark->LandmarkId() ); + UnsetDuplicateNextCalEntry( aUid, existingLandmark->LandmarkId() ); } // set duplicate only if there are calendar entries already pointing to this landmark. @@ -507,7 +507,7 @@ // if current lookup item duplicate property is 0, then remove next corresponding // calendar lookup entry duplicate property. // this is required because the current entry will be pointing to a new landmark. - UnsetDuplicateNextCalEntry( existingLandmark->LandmarkId() ); + UnsetDuplicateNextCalEntry( aUid, existingLandmark->LandmarkId() ); } } @@ -859,6 +859,7 @@ TPtrC tempStr; TInt retStatus; TBool addressEmtpy = ETrue; + aLandmarkAddress.Copy( KNullDesC ); retStatus = aLandmark->GetPositionField(EPositionFieldStreet, tempStr); if (retStatus == KErrNone && tempStr.Length()) { @@ -1003,7 +1004,7 @@ // CMyLocationsDatabaseManager::UnsetDuplicateNextCalEntry() // ----------------------------------------------------------------------------- // -void CMyLocationsDatabaseManager::UnsetDuplicateNextCalEntry( quint32 aLandmarkId ) +void CMyLocationsDatabaseManager::UnsetDuplicateNextCalEntry( quint32 aUid, quint32 aLandmarkId ) { __TRACE_CALLSTACK; // get next duplicate item @@ -1011,7 +1012,7 @@ iLocationAppLookupDb->findEntriesByLandmarkId( aLandmarkId, itemArray ); for ( int i = 0; i < itemArray.count(); i++) { - if( itemArray[i].mSourceType == ESourceCalendar ) + if( itemArray[i].mSourceType == ESourceCalendar && itemArray[i].mSourceUid != aUid ) { itemArray[i].mIsDuplicate = 0; iLocationAppLookupDb->updateEntryById( itemArray[i] ); @@ -1097,6 +1098,20 @@ } // ----------------------------------------------------------------------------- +// CMyLocationsDatabaseManager::UpdateEntryName() +// ----------------------------------------------------------------------------- +// +EXPORT_C void CMyLocationsDatabaseManager::UpdateEntryName( TUint32 aSourceId, TUidSourceType aSourceType, + const TDesC& aName ) +{ + __TRACE_CALLSTACK; + QString name = QString( (QChar*)aName.Ptr(), aName.Length() ); + iLocationAppLookupDb->updateEntryNameByIdAndType( aSourceId, aSourceType, name ); + +} + + +// ----------------------------------------------------------------------------- // CMyLocationsDatabaseManager::CheckIfAddressChanged() // ----------------------------------------------------------------------------- // diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/mylocationsengine/inc/lookupmaptiledb.h --- a/locationdataharvester/mylocationsengine/inc/lookupmaptiledb.h Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/mylocationsengine/inc/lookupmaptiledb.h Wed Aug 18 09:43:18 2010 +0300 @@ -106,6 +106,12 @@ RArray& aLookupItemArray); /** + * Gets the list of calendar ids. + * @param[out] aIdArray Calendar id list + */ + void GetAllCalendarIdsL( RArray& aIdArray ); + + /** * ReSet the entry in the lookup table , with null value * @param aLookupItem The lookup item entry to be reseted in the database, * get the used maptile path as part of lookupItem filepath , to free the resource diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/mylocationsengine/inc/mylocationsengine.h --- a/locationdataharvester/mylocationsengine/inc/mylocationsengine.h Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/mylocationsengine/inc/mylocationsengine.h Wed Aug 18 09:43:18 2010 +0300 @@ -251,6 +251,18 @@ * Sets the maptile storing path. */ void SetFolderPathL(); + + /** + * Refreshes calendar entries in mylocation databases. This is typically called when there is an undefined + * change in calendar db. + */ + void RefreshCalendarEntryListL(); + + /** + * Returns True if a calendar entry is available for a given id. + */ + TBool IsCalendarEntryValidL( TUint32 aId ); + /** * Calender entry added. */ @@ -291,6 +303,10 @@ */ void CropAndSaveImage( QString filePath, int width, int height, QString appType, QString orientationType ); + + /**Get the contact name for this perticular id. + */ + void GetContactName( TInt32 iUId , TDes& aName ); public: //From MMapTileObserver diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/mylocationsengine/src/lookupmaptiledb.cpp --- a/locationdataharvester/mylocationsengine/src/lookupmaptiledb.cpp Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/mylocationsengine/src/lookupmaptiledb.cpp Wed Aug 18 09:43:18 2010 +0300 @@ -18,11 +18,13 @@ #include #include +#include #include "mylocationlogger.h" #include "lookupmaptiledb.h" _LIT( KSelectAllFrom, "SELECT * FROM " ); _LIT(KQueryToDB,"SELECT * FROM cntmaptilelookuptable WHERE cntuid = %d AND source = %d"); +_LIT(KQueryGetCalendaIds,"SELECT cntuid FROM cntmaptilelookuptable WHERE source = %d"); _LIT( KSelectfilepathFrom, "SELECT filepath FROM " ); _LIT(KQueryMaptile, "SELECT filepath FROM cntmaptilelookuptable WHERE filepath = '%S'"); // string 'where' @@ -456,6 +458,47 @@ } // ----------------------------------------------------------------------------- +// CLookupMapTileDatabase::GetAllCalendarIdsL() +// Gets the list of calendar ids . +// ----------------------------------------------------------------------------- +// +void CLookupMapTileDatabase::GetAllCalendarIdsL( RArray& aIdArray ) +{ + __TRACE_CALLSTACK;// Create a query to find the item. + TFileName queryBuffer; + queryBuffer.Format( KQueryGetCalendaIds, ESourceCalendar ); + + TInt ret = Open(); + if (ret != KErrNone) + { + Close(); + ret= Open(); + + } + iItemsDatabase.Begin(); + + + // Create a view of the table with the above query. + RDbView myView; + myView.Prepare( iItemsDatabase, TDbQuery( queryBuffer ) ); + CleanupClosePushL( myView ); + myView.EvaluateAll(); + myView.FirstL(); + + while( myView.AtRow() ) + { + // Item found. get the details. + myView.GetL(); + TUint32 id; + id = myView.ColUint( KColumnUid ); + aIdArray.Append( id ); + myView.NextL(); + } + + CleanupStack::PopAndDestroy( &myView ); // myView +} + +// ----------------------------------------------------------------------------- // CLookupMapTileDatabase::FindEntryL() // Finds an entry in the lookup table. // ----------------------------------------------------------------------------- diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/mylocationsengine/src/maptileinterface.cpp --- a/locationdataharvester/mylocationsengine/src/maptileinterface.cpp Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/mylocationsengine/src/maptileinterface.cpp Wed Aug 18 09:43:18 2010 +0300 @@ -196,8 +196,8 @@ int convertedy = (1 - convertedtemp / pi) * totalMapHeight / 2.0; //Get the image row,col - TInt iMapTileImageRow = convertedy / 256.0; - TInt iMapTileImageCol = convertedx / 256.0; + TInt iMapTileImageRow = ( convertedy / 256.0 ) * 1000; + TInt iMapTileImageCol = ( convertedx / 256.0 ) * 1000; TBuf mImagePath; @@ -205,8 +205,11 @@ mImagePath.AppendNum(iMapTileImageCol); mImagePath.Append(KFileExtn); - iFilePath = iFilePath->ReAllocL(iFilePath->Length() + mImagePath.Length() ); - iFilePath->Des().Append(mImagePath); + if( iFilePath ) + { + iFilePath = iFilePath->ReAllocL(iFilePath->Length() + mImagePath.Length() ); + iFilePath->Des().Append(mImagePath); + } } // ----------------------------------------------------------------------------- diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/mylocationsengine/src/mylocationsengine.cpp --- a/locationdataharvester/mylocationsengine/src/mylocationsengine.cpp Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/mylocationsengine/src/mylocationsengine.cpp Wed Aug 18 09:43:18 2010 +0300 @@ -47,6 +47,8 @@ _LIT8( KMaptileStatusFormat, "%d-%d-%d" ); const TInt KProtocolBufferSize = 16; +const QString KSpace(" "); + // ============================ MEMBER FUNCTIONS =============================== CMyLocationsEngine* CMyLocationsEngine::NewL() @@ -332,6 +334,16 @@ iLastContactId = aId; + //If the requested id is already in queue, just return + for( TInt index = 0 ; index < iMapTileRequestQueue.Count(); index++ ) + { + if( iLastContactId == iMapTileRequestQueue[index]->iUId ) + { + MYLOCLOGSTRING("contact id is in queue"); + return; + } + } + TAppAddressInfo* addressInfo = new (ELeave) TAppAddressInfo; addressInfo->iUid = aId; addressInfo->iAddressType = addressType; @@ -343,16 +355,8 @@ //Get all 3 adress if( addressCount > 1 && iAddressInfo.Count() < addressCount ) - return; - - //If the requested id is already in queue, just return - for( TInt index = 0 ; index < iMapTileRequestQueue.Count(); index++ ) - { - if( iLastContactId == iMapTileRequestQueue[index]->iUId ) - { - return; - } - } + return; + for( TInt index = 0; index < iAddressInfo.Count(); index++ ) { @@ -402,8 +406,11 @@ iMaptileDatabase->UpdateEntryL( lookupItem ); //Request for maptile fetching - RequestMapTileImageL( *contactAddressLm, type, + if( contactAddressLm ) + { + RequestMapTileImageL( *contactAddressLm, type, iAddressInfo[index]->iUid, EContactDbObserverEventContactChanged ); + } CleanupStack::PopAndDestroy( itemCount ); } @@ -541,6 +548,13 @@ for (int i = 0; i < aChangeItems.Count(); i++) { + // Check if this is some undefined change in calendar db. + if( aChangeItems[0].iChangeType == EChangeUndefined && aChangeItems[0].iEntryType == EChangeEntryAll ) + { + // Refresh the calendar related entries in the location and maptiledb. + RefreshCalendarEntryListL(); + break; + } TCalChangeEntry calChangeEntry = aChangeItems[i]; iEventType = calChangeEntry.iChangeType; switch (calChangeEntry.iChangeType) @@ -580,6 +594,39 @@ } // ----------------------------------------------------------------------------- +// CMyLocationsEngine::RefreshCalendarEntryListL() +// ----------------------------------------------------------------------------- +// +void CMyLocationsEngine::RefreshCalendarEntryListL() +{ + //Get all the calendar ids and check its validity. + //Delete if they are no more valid. + RArray ids; + iMaptileDatabase->GetAllCalendarIdsL( ids ); + for( TInt i = 0; i < ids.Count(); i++ ) + { + if( !IsCalendarEntryValidL( ids[i] ) ) + { + TLookupItem lookupItem; + lookupItem.iSource = ESourceCalendar; + lookupItem.iUid = ids[i]; + TRAP_IGNORE( ManipulateMapTileDataBaseL( lookupItem ) ); + TRAP_IGNORE( UpdateDatabaseL( NULL, + ids[i], ESourceCalendar, EEntryDeleted ) ); + + } + } +} + +// ----------------------------------------------------------------------------- +// CMyLocationsEngine::IsCalendarEntryValidL() +// ----------------------------------------------------------------------------- +// +TBool CMyLocationsEngine::IsCalendarEntryValidL( TUint32 aId ) +{ + return ( ( iCalView->FetchL( aId ) == NULL ) ? EFalse:ETrue ); +} +// ----------------------------------------------------------------------------- // CMyLocationsEngine::CalenderEntryAddedL() // ----------------------------------------------------------------------------- // @@ -677,7 +724,7 @@ TLookupItem lookupItem; lookupItem.iUid = aEvent.iContactId; // If contact is deleted delete from mylocations db - if (aEvent.iType == EContactDbObserverEventContactDeleted) + if ( aEvent.iType == EContactDbObserverEventContactDeleted || aEvent.iType == EContactDbObserverEventOwnCardDeleted ) { //Delete the entries from maptile database lookupItem.iSource = ESourceContactsPref; @@ -705,19 +752,7 @@ //Get the contact item iEventType = aEvent.iType; - QContact contactInfo = iContactManager->contact( aEvent.iContactId ); - - //Get the contact name details - QContactName name = contactInfo.detail( QContactName::DefinitionName ); - QString firstName = name.firstName(); - QString lastName = name.lastName(); - TPtrC16 tempPtr1(reinterpret_cast(firstName.utf16())); - TPtrC16 tempPtr2( reinterpret_cast (lastName.utf16())); - - TBuf landmarkName; - landmarkName.Append( tempPtr1 ); - landmarkName.Append( tempPtr2 ); - + QContact contactInfo = iContactManager->contact( aEvent.iContactId ); CPosLandmark *preferedAddressLm = NULL; CPosLandmark *workAddressLm = NULL; CPosLandmark *homeAddressLm = NULL; @@ -747,6 +782,7 @@ switch (aEvent.iType) { case EContactDbObserverEventContactChanged: + case EContactDbObserverEventOwnCardChanged: { MYLOCLOGSTRING("EContactDbObserverEventContactChanged" ); MYLOCLOGSTRING1("iMapTileRequestQueue.Count()-%d",iMapTileRequestQueue.Count() ); @@ -760,12 +796,16 @@ return; } } - + + TBuf landmarkName; + GetContactName(aEvent.iContactId,landmarkName); + // if default address available, update Mylocations. lookupItem.iSource = ESourceContactsPref; if (preferedAddressLm) { - preferedAddressLm->SetLandmarkNameL( landmarkName ); + iMyLocationsDatabaseManager->UpdateEntryName( aEvent.iContactId, ESourceContactsPref, + landmarkName ); MYLOCLOGSTRING("preferedAddressLm address changed" ); if ( iMyLocationsDatabaseManager->CheckIfAddressChanged(*preferedAddressLm, @@ -783,12 +823,13 @@ { iMaptileDatabase->DeleteMapTileL(lookupItem); } - //remove entry from database - //TRAP_IGNORE( ManipulateMapTileDataBaseL(lookupItem)); + } } else { + TRAP_IGNORE( UpdateDatabaseL( NULL, aEvent.iContactId, + ESourceContactsPref, EEntryDeleted )); TRAP_IGNORE( ManipulateMapTileDataBaseL(lookupItem)); } @@ -797,7 +838,8 @@ lookupItem.iSource = ESourceContactsHome; if (homeAddressLm) { - homeAddressLm->SetLandmarkNameL( landmarkName ); + iMyLocationsDatabaseManager->UpdateEntryName( aEvent.iContactId, ESourceContactsHome, + landmarkName ); MYLOCLOGSTRING("homeAddressLm address changed" ); if ( iMyLocationsDatabaseManager->CheckIfAddressChanged(*homeAddressLm, aEvent.iContactId, ESourceContactsHome) ) @@ -806,7 +848,6 @@ lookupItem.iFetchingStatus = EMapTileFetchingInProgress; TRAP_IGNORE( iMaptileDatabase->ReSetEntryL(lookupItem) ) //remove entry from databse - //TRAP_IGNORE( ManipulateMapTileDataBaseL(lookupItem)); RequestMapTileImageL(*homeAddressLm, ESourceContactsHome, aEvent.iContactId, iEventType); if (lookupItem.iFilePath.Length() > 0) @@ -817,6 +858,8 @@ } else { + TRAP_IGNORE( UpdateDatabaseL( NULL, aEvent.iContactId, + ESourceContactsHome, EEntryDeleted )); TRAP_IGNORE( ManipulateMapTileDataBaseL(lookupItem)); } @@ -826,7 +869,9 @@ lookupItem.iSource = ESourceContactsWork; if (workAddressLm) { - workAddressLm->SetLandmarkNameL( landmarkName ); + iMyLocationsDatabaseManager->UpdateEntryName( aEvent.iContactId, ESourceContactsWork, + landmarkName ); + MYLOCLOGSTRING("workAddressLm address changed" ); if ( iMyLocationsDatabaseManager->CheckIfAddressChanged(*workAddressLm, aEvent.iContactId, ESourceContactsWork) ) @@ -835,19 +880,18 @@ lookupItem.iFetchingStatus = EMapTileFetchingInProgress; TRAP_IGNORE( iMaptileDatabase->ReSetEntryL(lookupItem) ) - //remove entry from databse - //TRAP_IGNORE( ManipulateMapTileDataBaseL(lookupItem)); RequestMapTileImageL(*workAddressLm, ESourceContactsWork, aEvent.iContactId, iEventType); if (lookupItem.iFilePath.Length() > 0) { iMaptileDatabase->DeleteMapTileL(lookupItem); } - } - + } } else { + TRAP_IGNORE( UpdateDatabaseL( NULL, aEvent.iContactId, + ESourceContactsWork, EEntryDeleted )); TRAP_IGNORE( ManipulateMapTileDataBaseL(lookupItem)); } @@ -863,7 +907,6 @@ MYLOCLOGSTRING("EContactDbObserverEventContactAdded" ); if (preferedAddressLm) { - preferedAddressLm->SetLandmarkNameL( landmarkName ); //create entry in the data base and maintain a fetching state. lookupItem.iSource = ESourceContactsPref; iMaptileDatabase->CreateEntryL(lookupItem); @@ -872,7 +915,6 @@ } if (homeAddressLm) { - homeAddressLm->SetLandmarkNameL( landmarkName ); lookupItem.iSource = ESourceContactsHome; iMaptileDatabase->CreateEntryL(lookupItem); RequestMapTileImageL(*homeAddressLm, ESourceContactsHome, @@ -880,7 +922,6 @@ } if (workAddressLm) { - workAddressLm->SetLandmarkNameL( landmarkName ); lookupItem.iSource = ESourceContactsWork; iMaptileDatabase->CreateEntryL(lookupItem); RequestMapTileImageL(*workAddressLm, ESourceContactsWork, @@ -1027,7 +1068,7 @@ } // ----------------------------------------------------------------------------- -// CMyLocationsEngine::GetLocationDetailsLC() +// CMyLocationsEngine::GetContactAddressDetailsLC() // get locatin details // ----------------------------------------------------------------------------- // @@ -1374,17 +1415,6 @@ { QContact contactInfo = iContactManager->contact( iItem.iUid ); - //Get the contact name details - QContactName name = contactInfo.detail( QContactName::DefinitionName ); - QString firstName = name.firstName(); - QString lastName = name.lastName(); - TPtrC16 tempPtr1(reinterpret_cast(firstName.utf16())); - TPtrC16 tempPtr2( reinterpret_cast (lastName.utf16())); - - TBuf landmarkName; - landmarkName.Append( tempPtr1 ); - landmarkName.Append( tempPtr2 ); - CPosLandmark *addressLm = NULL; foreach ( QContactAddress address, contactInfo.details() ) @@ -1400,7 +1430,6 @@ addressLm = GetContactAddressDetailsLC( address ); if( addressLm ) { - addressLm->SetLandmarkNameL( landmarkName ); RequestMapTileImageL( *addressLm, ( TUidSourceType )iItem.iSource, iItem.iUid, EContactDbObserverEventContactChanged ); CleanupStack::PopAndDestroy( addressLm ); @@ -1479,7 +1508,25 @@ lookupItem.iFetchingStatus = EMapTileFetchingUnknownError; } - TRAP_IGNORE( UpdateMaptileDatabaseL(iMapTileRequestQueue[0]->iEventType,lookupItem ) ); + TRAP_IGNORE( UpdateMaptileDatabaseL( iMapTileRequestQueue[0]->iEventType,lookupItem ) ); + + // if the source type is contacts, update the contact name into the locationdatalookupdb. + // This has to be done, because there is a possibility that the user might change the + // contact name between geocodefetchingcomplete and maptilefetchingcomplete. + if( iMapTileRequestQueue[0]->iAddressType == ESourceContactsPref || + iMapTileRequestQueue[0]->iAddressType == ESourceContactsHome || + iMapTileRequestQueue[0]->iAddressType == ESourceContactsWork ) + { + TBuf landmarkName; + GetContactName( iMapTileRequestQueue[0]->iUId, landmarkName ); + + iMyLocationsDatabaseManager->UpdateEntryName( + iMapTileRequestQueue[0]->iUId, ESourceContactsPref, landmarkName ); + iMyLocationsDatabaseManager->UpdateEntryName( + iMapTileRequestQueue[0]->iUId, ESourceContactsHome, landmarkName ); + iMyLocationsDatabaseManager->UpdateEntryName( + iMapTileRequestQueue[0]->iUId, ESourceContactsWork, landmarkName ); + } //Publish the maptile status , if it was from contact if( iLastContactId == iMapTileRequestQueue[0]->iUId ) @@ -1626,7 +1673,10 @@ iMapTileRequestQueue[0]->iUId, iMapTileRequestQueue[0]->iAddressType, aLatitude, aLongitude); + TBuf landmarkName; + GetContactName(iMapTileRequestQueue[0]->iUId,landmarkName); //Update mylocation database + iMapTileRequestQueue[0]->iLandmarkInfo->SetLandmarkNameL( landmarkName ); TRAP_IGNORE( UpdateDatabaseL( iMapTileRequestQueue[0]->iLandmarkInfo, iMapTileRequestQueue[0]->iUId, @@ -1643,6 +1693,35 @@ } + +// ----------------------------------------------------------------------------- +// CMyLocationsEngine::GetContactName() +// ----------------------------------------------------------------------------- +// +void CMyLocationsEngine::GetContactName( TInt32 aUId,TDes& aName) +{ + QContact contactInfo = iContactManager->contact( aUId ); + QContactName name = contactInfo.detail( QContactName::DefinitionName ); + QString firstName = name.firstName(); + QString lastName = name.lastName(); + QString fullName(""); + + if( lastName.isEmpty() ) + { + fullName = firstName; + } + else + { + if( !firstName.isEmpty() ) + { + fullName = firstName + KSpace; + } + fullName = fullName + lastName; + } + + aName.Copy( reinterpret_cast(fullName.utf16()) ); +} + // ----------------------------------------------------------------------------- // CMyLocationsEngine::UpdateDatabaseL() // ----------------------------------------------------------------------------- @@ -1651,7 +1730,10 @@ const TUint32 aSourceType, const TEntryChangeType aChangeType ) { __TRACE_CALLSTACK; - Cancel(); + if(IsActive()) + { + Cancel(); + } iMyLocationsDatabaseManager->UpdateDatabaseL( aLandmark, aUid, aSourceType, aChangeType ); if( aSourceType != ESourceLandmarks ) diff -r 8db05346071b -r 59575560d1e6 locationdataharvester/rom/mylocations.iby --- a/locationdataharvester/rom/mylocations.iby Tue Jul 06 14:10:28 2010 +0300 +++ b/locationdataharvester/rom/mylocations.iby Wed Aug 18 09:43:18 2010 +0300 @@ -30,6 +30,6 @@ data=DATAZ_\APP_RESOURCE_DIR\mylocationsengine.rsc APP_RESOURCE_DIR\mylocationsengine.rsc data=\epoc32\data\z\resource\qt\crml\maptilestatuspublisher.qcrml resource\qt\crml\maptilestatuspublisher.qcrml -data=\epoc32\data\z\resource\qt\crml\maptilepublisher.qcrml resource\qt\crml\maptilepublisher.qcrml +data=\epoc32\data\z\resource\qt\crml\maptilecontactpublisher.qcrml resource\qt\crml\maptilecontactpublisher.qcrml data=\epoc32\data\z\resource\qt\crml\maptilecalpublisher.qcrml resource\qt\crml\maptilecalpublisher.qcrml #endif diff -r 8db05346071b -r 59575560d1e6 locationpickerservice/inc/locationpickertypes.h --- a/locationpickerservice/inc/locationpickertypes.h Tue Jul 06 14:10:28 2010 +0300 +++ b/locationpickerservice/inc/locationpickertypes.h Wed Aug 18 09:43:18 2010 +0300 @@ -29,11 +29,15 @@ //Icon Paths -// dummy image for a location +// dummy image for a LandMarks const QString KDummyImage("qtg_large_maps"); +//Image for calendar entries +const QString KCalendarImage("qtg_large_calendar"); +//Image for contacts entries +const QString KContactsImage("qtg_large_phonebook"); //Contacts collection icon -const QString KCollectionsContacts("qtg_small_contacts"); +const QString KCollectionsContacts("qtg_small_phonebook"); //Calendar collection icon const QString KCollectionsCalendar("qtg_small_calendar"); diff -r 8db05346071b -r 59575560d1e6 locationpickerservice/resources/locationpickerview.docml --- a/locationpickerservice/resources/locationpickerview.docml Tue Jul 06 14:10:28 2010 +0300 +++ b/locationpickerservice/resources/locationpickerview.docml Wed Aug 18 09:43:18 2010 +0300 @@ -15,10 +15,10 @@ - + - + @@ -33,7 +33,7 @@ - + diff -r 8db05346071b -r 59575560d1e6 locationpickerservice/resources/popupdialog.docml --- a/locationpickerservice/resources/popupdialog.docml Tue Jul 06 14:10:28 2010 +0300 +++ b/locationpickerservice/resources/popupdialog.docml Wed Aug 18 09:43:18 2010 +0300 @@ -25,14 +25,14 @@ - + + - - + diff -r 8db05346071b -r 59575560d1e6 locationpickerservice/src/hgwidgetdatamodel.cpp --- a/locationpickerservice/src/hgwidgetdatamodel.cpp Tue Jul 06 14:10:28 2010 +0300 +++ b/locationpickerservice/src/hgwidgetdatamodel.cpp Wed Aug 18 09:43:18 2010 +0300 @@ -102,7 +102,15 @@ { QStringList displayText; QStringList adressDetail = mProxyModel->data(proxyModelIndex,Qt::DisplayRole).toStringList(); - QString displayString = adressDetail[0]+KSeparator+KSpace+adressDetail[1]; + QString displayString; + if(!adressDetail[0].isEmpty()) + { + displayString = adressDetail[0]+KSeparator+KSpace+adressDetail[1]; + } + else + { + displayString = adressDetail[1]; + } QString text(""); displayText <setTimeout(HbMenu::NoTimeout); - mSelectAction = mLongPressMenu->addAction(hbTrId("Select")); + mSelectAction = mLongPressMenu->addAction(hbTrId("txt_lint_list_select")); mIndex = aItem->modelIndex(); connect(mSelectAction, SIGNAL(triggered()),this, SLOT(handleLongPress())); mLongPressMenu->setPreferredPos(aPoint); diff -r 8db05346071b -r 59575560d1e6 locationpickerservice/src/locationpickerview.cpp --- a/locationpickerservice/src/locationpickerview.cpp Tue Jul 06 14:10:28 2010 +0300 +++ b/locationpickerservice/src/locationpickerview.cpp Wed Aug 18 09:43:18 2010 +0300 @@ -121,8 +121,14 @@ //if current model is collection content, go back to collectionlist content if(mViewType == ELocationPickerCollectionContent) { - removeDetailsLabel(); - colectionTabTriggered(); + mListItem->setGraphicsSize(HbListViewItem::MediumIcon); + removeDetailsLabel(); + mAscendingAction->setDisabled(true); + mDescendingAction->setDisabled(true); + mAllAction->setChecked(false); + mViewType = ELocationPickerCollectionListContent; + manageListView(); + clearContentModel(); } else @@ -193,8 +199,12 @@ //create MediaWall Object mWidget = new HgMediawall(); HbIcon defaultIcon(KDummyImage); - QImage defaultImage = defaultIcon.pixmap().toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied); - mWidget->setDefaultImage(defaultImage); + QPainter painter; + QPixmap defaultImage(defaultIcon.width(),defaultIcon.height()); + painter.begin(&defaultImage); + defaultIcon.paint(&painter,QRectF(0,0,defaultIcon.width(),defaultIcon.height())); + painter.end(); + mWidget->setDefaultImage( defaultImage.toImage() ); HgMediawall* mediawall = qobject_cast( mWidget ); mediawall->setObjectName("location"); HbStyleLoader::registerFilePath(":/location.hgmediawall.widgetml"); @@ -463,6 +473,12 @@ // ----------------------------------------------------------------------------- void LocationPickerView::colectionTabTriggered() { + if( mViewType == ELocationPickerCollectionListContent || + mViewType == ELocationPickerCollectionContent ) + { + mCollectionAction->setChecked(true); + return; + } mListItem->setGraphicsSize(HbListViewItem::MediumIcon); removeDetailsLabel(); //execute only if tab is not pressed @@ -486,6 +502,7 @@ // ----------------------------------------------------------------------------- void LocationPickerView::searchTabTriggered() { + mWidget->hide(); emit switchToSearchView(); } @@ -507,11 +524,11 @@ switch(acategoryId) { - case 1: categoryname = "Landmarks"; + case 1: categoryname = QString(hbTrId("txt_lint_subhead_places")); break; - case 8: categoryname = "Contacts"; + case 8: categoryname = QString(hbTrId("txt_lint_subhead_contact_addresses")); break; - case 9: categoryname = "Calender"; + case 9: categoryname = QString(hbTrId("txt_lint_subhead_calendar_event_locations")); break; } if(mCollectionContent->locationFound()) @@ -594,10 +611,10 @@ mLongPressMenu = new HbMenu(); mLongPressMenu->setTimeout(HbMenu::NoTimeout); connect(mLongPressMenu,SIGNAL(aboutToClose ()),this,SLOT(deleteMenu())); - mSelectAction = mLongPressMenu->addAction(hbTrId("Select")); + mSelectAction = mLongPressMenu->addAction(hbTrId("txt_lint_list_select")); if( mViewType == ELocationPickerCollectionContent || mViewType == ELocationPickerContent ) { - mDetailsAction = mLongPressMenu->addAction(hbTrId("txt_lint_list_details")); + mDetailsAction = mLongPressMenu->addAction(hbTrId("txt_lint_menu_details")); connect(mDetailsAction, SIGNAL(triggered()), this, SLOT(handleDetails())); } mIndex = aItem->modelIndex(); @@ -614,7 +631,7 @@ mLongPressMenu = new HbMenu(); mLongPressMenu->setTimeout(HbMenu::NoTimeout); connect(mLongPressMenu,SIGNAL(aboutToClose ()),this,SLOT(deleteMenu())); - mSelectAction = mLongPressMenu->addAction(hbTrId("Select")); + mSelectAction = mLongPressMenu->addAction(hbTrId("txt_lint_list_select")); mIndex = aIndex; connect(mSelectAction, SIGNAL(triggered()), this, SLOT(handleSelect())); mLongPressMenu->setPreferredPos(aPoint);