controlpanelui/src/cpplugins/ringtoneplugin/src/cppersonalizationentryitemdata.cpp
changeset 31 e79ce701c376
parent 25 19394c261aa5
child 33 0cfa53de576f
equal deleted inserted replaced
25:19394c261aa5 31:e79ce701c376
    51         {
    51         {
    52             setDescription( hbTrId("txt_cp_list_no_tone" ) );   //sepcial handling about NoTone
    52             setDescription( hbTrId("txt_cp_list_no_tone" ) );   //sepcial handling about NoTone
    53         }
    53         }
    54         else
    54         else
    55         {
    55         {
    56             setDescription( strRing.section(QDir::separator (),-1) );
    56 		    setDescription( QFileInfo(strRing).baseName() );
    57         }
    57         }
    58     }
    58     }
    59     else
    59     else
    60     {
    60     {
    61         CPFW_LOG("CpPersonalizationEntryItemData::mProfileModel:NULL!");
    61         CPFW_LOG("CpPersonalizationEntryItemData::mProfileModel:NULL!");
   169 }
   169 }
   170 
   170 
   171 void CpPersonalizationEntryItemData::handleOk(const QString &strFname)
   171 void CpPersonalizationEntryItemData::handleOk(const QString &strFname)
   172 {
   172 {
   173     if(strFname.length())
   173     if(strFname.length())
   174     {
   174     {   
   175         setDescription( strFname.section(QDir::separator (),-1) );
   175         //lower level services(tone fetcher or music fetcher)
       
   176         //will guarantee strFname is a valid absolute file path.
       
   177         setDescription(QFileInfo(strFname).baseName());
   176     }
   178     }
   177     else
   179     else
   178     {
   180     {
   179         setDescription( hbTrId("txt_cp_list_no_tone" ) );
   181         setDescription( hbTrId("txt_cp_list_no_tone" ) );
   180     }
   182     }