controlpanelui/src/cpserviceprovider/src/cplauncherservice.cpp
changeset 22 a5692c68d772
parent 19 36aa4756ee82
child 33 0cfa53de576f
equal deleted inserted replaced
21:2883a5458389 22:a5692c68d772
    29   mAsyncRequestIndex(-1),
    29   mAsyncRequestIndex(-1),
    30   mReturnValue(false)
    30   mReturnValue(false)
    31 {
    31 {
    32     CPSP_LOG("CpLauncherService Constructing...");
    32     CPSP_LOG("CpLauncherService Constructing...");
    33     publishAll();
    33     publishAll();
       
    34     connect(this,SIGNAL(clientDisconnected()),this,SLOT(handleClientDisconnected()));
    34 }
    35 }
    35 
    36 
    36 CpLauncherService::~CpLauncherService()
    37 CpLauncherService::~CpLauncherService()
    37 {
    38 {
    38     CPSP_LOG("CpLauncherService Destructing...");
    39     CPSP_LOG("CpLauncherService Destructing...");
    39 }
    40 }
    40 
    41 
    41 void CpLauncherService::complete()
    42 bool CpLauncherService::complete()
    42 {
    43 {
    43     CPSP_LOG( QString("CpLauncherService::complete() mAsyncRequestIndex = %1, mReturnValue = %2").arg(
    44     CPSP_LOG( QString("CpLauncherService::complete() mAsyncRequestIndex = %1, mReturnValue = %2").arg(
    44             mAsyncRequestIndex).arg(mReturnValue.toBool()) );
    45             mAsyncRequestIndex).arg(mReturnValue.toBool()) );
    45     completeRequest(mAsyncRequestIndex, mReturnValue);
    46     bool ret = completeRequest(mAsyncRequestIndex, mReturnValue);
       
    47     mAsyncRequestIndex = -1;
       
    48     return ret;
    46 }
    49 }
    47 
    50 
    48 void CpLauncherService::setReturnValue(const QVariant &returnValue)
    51 void CpLauncherService::setReturnValue(const QVariant &returnValue)
    49 {
    52 {
    50     mReturnValue = returnValue;
    53     mReturnValue = returnValue;
    84     CPSP_LOG("Leaving CpLauncherService::launchSettingView");
    87     CPSP_LOG("Leaving CpLauncherService::launchSettingView");
    85     
    88     
    86     return succeed;
    89     return succeed;
    87 }
    90 }
    88 
    91 
       
    92 void CpLauncherService::handleClientDisconnected()
       
    93 {
       
    94     qApp->quit();
       
    95 }
       
    96 
    89 //End of File
    97 //End of File