homescreenapp/serviceproviders/hsmenuserviceprovider/src/hsmenuservice.cpp
changeset 92 6727c5d0afc7
parent 85 35368b604b28
child 96 458d8c8d9580
equal deleted inserted replaced
85:35368b604b28 92:6727c5d0afc7
   180  Executes action on an item
   180  Executes action on an item
   181  \param entryId of this item
   181  \param entryId of this item
   182  \param actionName string with action name
   182  \param actionName string with action name
   183  \retval int error code, 0 if no error
   183  \retval int error code, 0 if no error
   184  */
   184  */
   185 int HsMenuService::executeAction(int entryId, const QString &actionName)
   185 int HsMenuService::executeAction(int entryId, const QString &actionName, 
       
   186         QObject* receiver, const char* member)
   186 {
   187 {
   187     qDebug() << "HsMenuService::executeAction entryId:" << entryId
   188     qDebug() << "HsMenuService::executeAction entryId:" << entryId
   188              << "actionName:" << actionName;
   189              << "actionName:" << actionName;
   189     return CaService::instance()->executeCommand(entryId, actionName);
   190     return CaService::instance()->executeCommand(
       
   191             entryId, actionName, receiver, member);
   190 }
   192 }
   191 
   193 
   192 /*!
   194 /*!
   193  Launch task switcher
   195  Launch task switcher
   194  \retval boolean launching status
   196  \retval boolean launching status
   378  \retval boolean error code.
   380  \retval boolean error code.
   379  */
   381  */
   380 void HsMenuService::touch(int entryId)
   382 void HsMenuService::touch(int entryId)
   381 {
   383 {
   382     QSharedPointer<CaEntry> entry = CaService::instance()->getEntry(entryId);
   384     QSharedPointer<CaEntry> entry = CaService::instance()->getEntry(entryId);
   383     if (entry->flags() & RemovableEntryFlag &&
   385     CaService::instance()->touch(* entry);
   384         (entry->flags() & UsedEntryFlag) == 0 &&
       
   385         entry->role() == ItemEntryRole &&
       
   386         entry->entryTypeName() != QString(Hs::packageTypeName)) {
       
   387             CaService::instance()->touch(* entry);
       
   388     }
       
   389 }
   386 }
   390 
   387 
   391 /*!
   388 /*!
   392  Touch action on an lists of entries.
   389  Touch action on an lists of entries.
   393  \param entryIdList of this entry.
   390  \param entryIdList of this entry.