phonebookui/pbkcommonui/src/cntactionlauncher.cpp
changeset 50 77bc263e1626
parent 47 7cbcb2896f0e
child 53 e6aff7b69165
equal deleted inserted replaced
49:74b30151afd6 50:77bc263e1626
    50         executed = mContactAction->invokeAction( aContact, aDetail );
    50         executed = mContactAction->invokeAction( aContact, aDetail );
    51         }
    51         }
    52     
    52     
    53     return executed;
    53     return executed;
    54     }
    54     }
       
    55 
       
    56 bool CntActionLauncher::execute( QContact aContact, QContactDetail aDetail, QVariantMap aParameters )
       
    57     {
       
    58     bool executed = false;
       
    59     QList<QContactActionDescriptor> all = QContactAction::actionDescriptors(mAction, "symbian");
       
    60     mContactAction = QContactAction::action( all.first() );
       
    61     if ( mContactAction )
       
    62         {
       
    63         if (aContact.preferredDetail(mAction).isEmpty() && (mAction == "call" || mAction == "message" || mAction == "email"))
       
    64             {
       
    65             aContact.setPreferredDetail(mAction, aDetail);
       
    66             //return value will be ignored because we cannot do anything if it fails.
       
    67             mContactManager->saveContact(&aContact);
       
    68             }
       
    69         
       
    70         connect(mContactAction, SIGNAL(stateChanged(QContactAction::State)),
       
    71                 this, SLOT(progress(QContactAction::State)));
       
    72         executed = mContactAction->invokeAction( aContact, aDetail, aParameters );
       
    73         }
       
    74     
       
    75     return executed;
       
    76     }
    55  
    77  
    56 /*!
    78 /*!
    57 Launch dynamic action
    79 Launch dynamic action
    58 */
    80 */
    59 bool CntActionLauncher::execute( QContact aContact, QContactDetail aDetail, QContactActionDescriptor aActionDescriptor )
    81 bool CntActionLauncher::execute( QContact aContact, QContactDetail aDetail, QContactActionDescriptor aActionDescriptor )