locationdataharvester/mylocationsengine/src/lookupmaptiledb.cpp
changeset 31 8db05346071b
parent 30 96df3ab41000
child 35 59575560d1e6
equal deleted inserted replaced
30:96df3ab41000 31:8db05346071b
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description: Maptile database lookup table source implementation.
    14 * Description: Maptile database lookup table source implementation.
    15 *
    15 *
    16 */
    16 */
       
    17 #include <QString>
       
    18 #include <QFile>
    17 
    19 
    18 #include <bautils.h>
    20 #include <bautils.h>
    19 #include "mylocationlogger.h"
    21 #include "mylocationlogger.h"
    20 #include "lookupmaptiledb.h"
    22 #include "lookupmaptiledb.h"
    21 
    23 
   378     myView.FirstL();
   380     myView.FirstL();
   379 
   381 
   380     // Delete if no reference to maptile
   382     // Delete if no reference to maptile
   381     if (!myView.AtRow())
   383     if (!myView.AtRow())
   382     {
   384     {
   383         ret = iFsSession.Delete(aLookupItem.iFilePath);     
   385         QString filePath =  QString::fromUtf16( aLookupItem.iFilePath.Ptr(), aLookupItem.iFilePath.Length() );
       
   386         //delete all releted  maptile 
       
   387         QString temp=filePath;
       
   388         temp.append(MAPTILE_IMAGE_PORTRAIT);       
       
   389         QFile file;
       
   390         file.remove(temp);
       
   391         
       
   392         temp=filePath;
       
   393         temp.append(MAPTILE_IMAGE_CONTACT);
       
   394         temp.append(MAPTILE_IMAGE_LANDSCAPE);
       
   395         file.remove(temp);
       
   396         
       
   397         temp=filePath;
       
   398         temp.append(MAPTILE_IMAGE_CALENDAR);
       
   399         temp.append(MAPTILE_IMAGE_LANDSCAPE);
       
   400         file.remove(temp);
       
   401         
       
   402         temp=filePath;
       
   403         temp.append(MAPTILE_IMAGE_HURRIGANES);         
       
   404         file.remove(temp);
       
   405          
       
   406        // ret = iFsSession.Delete(aLookupItem.iFilePath);     
   384     }
   407     }
   385         
   408         
   386     CleanupStack::PopAndDestroy(&myView); // myView
   409     CleanupStack::PopAndDestroy(&myView); // myView
   387 
   410 
   388     Close();
   411     Close();