messagingapp/msgnotifications/msgerrornotifier/src/msgerrornotifiersvc.cpp
changeset 27 e4592d119491
parent 25 84d9eb65b26f
child 47 5b14749788d7
equal deleted inserted replaced
25:84d9eb65b26f 27:e4592d119491
    23 #include <HbAction>
    23 #include <HbAction>
    24 #include <xqservicerequest.h>
    24 #include <xqservicerequest.h>
    25 #include <xqaiwrequest.h>
    25 #include <xqaiwrequest.h>
    26 #include <xqappmgr.h>
    26 #include <xqappmgr.h>
    27 #include <ccsdefs.h>
    27 #include <ccsdefs.h>
       
    28 #include <qaction.h>
    28 
    29 
    29 #define LOC_VIEW hbTrId("txt_messaging_button_view")
    30 #define LOC_VIEW hbTrId("txt_messaging_button_view")
    30 #define LOC_CANCEL hbTrId("txt_common_button_cancel")
    31 #define LOC_CANCEL hbTrId("txt_common_button_cancel")
    31 #define LOC_SEND_FAILURE hbTrId("txt_messaging_list_message_sending_failed")
    32 #define LOC_SEND_FAILURE hbTrId("txt_messaging_list_message_sending_failed")
    32 
    33 
    77         errorNote.append(contactName);        
    78         errorNote.append(contactName);        
    78     }
    79     }
    79     
    80     
    80     messageBox.setTimeout(HbPopup::NoTimeout);
    81     messageBox.setTimeout(HbPopup::NoTimeout);
    81     messageBox.setText(errorNote);
    82     messageBox.setText(errorNote);
    82     HbAction* actionView = new HbAction(LOC_VIEW);
    83     QAction* actionView = new QAction(LOC_VIEW,this);
    83     messageBox.setPrimaryAction(actionView);
    84     messageBox.setAction(actionView,HbDeviceMessageBox::AcceptButtonRole);
    84 
    85 
    85     HbAction* actionQuit = new HbAction(LOC_CANCEL);
    86     QAction* actionQuit = new QAction(LOC_CANCEL,this);
    86     actionQuit->setCommandRole(HbAction::QuitRole);
    87     actionQuit->setMenuRole(QAction::QuitRole);
    87     messageBox.setSecondaryAction(actionQuit);
    88     messageBox.setAction(actionView,HbDeviceMessageBox::RejectButtonRole);
    88 
    89 
    89     setCurrentRequestAsync();
    90     setCurrentRequestAsync();
    90 
    91 
    91     HbAction* result = messageBox.exec();
    92     const QAction* result = messageBox.exec();
    92 
    93 
    93     // TODO: use XQAiwrequest
    94     // TODO: use XQAiwrequest
    94     if (result->commandRole() != HbAction::QuitRole) {
    95     if (result->menuRole() != QAction::QuitRole) {
    95         QList<QVariant> args;
    96         QList<QVariant> args;
    96         QString serviceName("com.nokia.services.hbserviceprovider");
    97         QString serviceName("com.nokia.services.hbserviceprovider");
    97         QString operation("open(qint64)");
    98         QString operation("open(qint64)");
    98         XQAiwRequest* request;
    99         XQAiwRequest* request;
    99         XQApplicationManager appManager;
   100         XQApplicationManager appManager;