emailuis/nmailui/src/nmattachmentpicker.cpp
changeset 23 2dc6caa42ec3
parent 20 ecc8def7944a
child 30 759dc5235cdb
equal deleted inserted replaced
20:ecc8def7944a 23:2dc6caa42ec3
    76     Construct & send appmgr request to start appropriate picker   
    76     Construct & send appmgr request to start appropriate picker   
    77 */
    77 */
    78 void NmAttachmentPicker::fetch(const QString& interface, 
    78 void NmAttachmentPicker::fetch(const QString& interface, 
    79     const QString& operation)
    79     const QString& operation)
    80 {
    80 {
    81     if (mRequest) {
    81     delete mRequest;
    82         delete mRequest;
    82     mRequest = NULL;
    83         mRequest = NULL;
    83     XQApplicationManager appMgr;
    84     }	
    84     mRequest = appMgr.create(interface, operation, true);
    85     mRequest = mAppmgr.create(interface, operation, true);
       
    86 
    85 
    87     if (mRequest) {
    86     if (mRequest) {
    88         mRequest->setSynchronous(false);
    87         mRequest->setSynchronous(false);
    89         connect(mRequest, SIGNAL(requestOk(const QVariant&)),
    88         connect(mRequest, SIGNAL(requestOk(const QVariant&)),
    90                 this, SIGNAL(attachmentsFetchOk(const QVariant&)));
    89                 this, SIGNAL(attachmentsFetchOk(const QVariant&)));
    91 
    90 
    92         connect(mRequest, SIGNAL(requestError(int, const QString&)),
    91         connect(mRequest, SIGNAL(requestError(int, const QString&)),
    93                 this, SIGNAL(attachmentsFetchError(int, const QString&)));
    92                 this, SIGNAL(attachmentsFetchError(int, const QString&)));
    94         
    93         
    95         if (!(mRequest)->send()) {
    94         mRequest->send();
    96             //sending request failed
    95     } 
    97             NMLOG("appmgr: send request failed");
       
    98         }
       
    99     }
       
   100     else {
       
   101         //create request failed
       
   102         NMLOG("appmgr: create request failed");
       
   103     }      	  
       
   104 }
    96 }