diff -r 0b3699f6c654 -r e36b2f4799c0 contentstorage/casrv/calocalizerscanner/src/calocalizerscannerproxy.cpp --- a/contentstorage/casrv/calocalizerscanner/src/calocalizerscannerproxy.cpp Fri Sep 17 08:32:18 2010 +0300 +++ b/contentstorage/casrv/calocalizerscanner/src/calocalizerscannerproxy.cpp Mon Oct 04 00:38:31 2010 +0300 @@ -29,6 +29,7 @@ #include "cainnerquery.h" #include "cainnerentry.h" #include "casqlcommands.h" +#include "cautils.h" @@ -174,45 +175,10 @@ { if( iRecentQmFile.Compare( aLocEntry->GetQmFilename() ) ) { - - if( !HbTextResolverSymbian::Init( aLocEntry->GetQmFilename(), KLocalizationFilepathC ) ) - { - if( !HbTextResolverSymbian::Init( aLocEntry->GetQmFilename(), KLocalizationFilepathZ ) ) - { - // this should not be called too often - TChar currentDriveLetter; - TDriveList driveList; - RFs fs; - User::LeaveIfError( fs.Connect() ); - User::LeaveIfError( fs.DriveList( driveList ) ); - - RBuf path; - path.Create( KLocalizationFilepath().Length() + 1 ); - CleanupClosePushL( path ); - - for ( TInt driveNr=EDriveY; driveNr >= EDriveA; driveNr-- ) - { - if ( driveList[driveNr] ) - { - User::LeaveIfError( fs.DriveToChar( driveNr, - currentDriveLetter ) ); - path.Append( currentDriveLetter ); - path.Append( KLocalizationFilepath ); - if( HbTextResolverSymbian::Init( aLocEntry->GetQmFilename(), path ) ) - { - break; - } - } - path.Zero(); - } - CleanupStack::PopAndDestroy( &path ); - fs.Close(); - } - } - + MenuUtils::InitTextResolverSymbianL(aLocEntry->GetQmFilename()); // keeping last qm filename to avoid another initialization iRecentQmFile.Close(); - iRecentQmFile.Create( aLocEntry->GetQmFilename().Length() ); + iRecentQmFile.CreateL( aLocEntry->GetQmFilename().Length() ); iRecentQmFile.Copy( aLocEntry->GetQmFilename() ); } return HbTextResolverSymbian::LoadLC( aLocEntry->GetStringId() );