controlpanelui/src/cpserviceprovider/src/cplauncherservice.cpp
changeset 40 593f946f4fec
parent 22 a5692c68d772
equal deleted inserted replaced
22:a5692c68d772 40:593f946f4fec
    27 : XQServiceProvider("cpserviceprovider.com.nokia.symbian.ICpPluginLauncher",mainWindow),
    27 : XQServiceProvider("cpserviceprovider.com.nokia.symbian.ICpPluginLauncher",mainWindow),
    28   mMainWindow(mainWindow),
    28   mMainWindow(mainWindow),
    29   mAsyncRequestIndex(-1),
    29   mAsyncRequestIndex(-1),
    30   mReturnValue(false)
    30   mReturnValue(false)
    31 {
    31 {
    32     CPSP_LOG("CpLauncherService Constructing...");
    32     CPSP_LOG_FUNC_ENTRY("CpLauncherService::CpLauncherService")
       
    33     
    33     publishAll();
    34     publishAll();
    34     connect(this,SIGNAL(clientDisconnected()),this,SLOT(handleClientDisconnected()));
    35     connect(this,SIGNAL(clientDisconnected()),this,SLOT(handleClientDisconnected()));
    35 }
    36 }
    36 
    37 
    37 CpLauncherService::~CpLauncherService()
    38 CpLauncherService::~CpLauncherService()
    38 {
    39 {
    39     CPSP_LOG("CpLauncherService Destructing...");
    40     CPSP_LOG_FUNC_ENTRY("CpLauncherService::~CpLauncherService")
    40 }
    41 }
    41 
    42 
    42 bool CpLauncherService::complete()
    43 bool CpLauncherService::complete()
    43 {
    44 {
       
    45     CPSP_LOG_FUNC_ENTRY("CpLauncherService::complete")
       
    46     
    44     CPSP_LOG( QString("CpLauncherService::complete() mAsyncRequestIndex = %1, mReturnValue = %2").arg(
    47     CPSP_LOG( QString("CpLauncherService::complete() mAsyncRequestIndex = %1, mReturnValue = %2").arg(
    45             mAsyncRequestIndex).arg(mReturnValue.toBool()) );
    48             mAsyncRequestIndex).arg(mReturnValue.toBool()) )
       
    49     
    46     bool ret = completeRequest(mAsyncRequestIndex, mReturnValue);
    50     bool ret = completeRequest(mAsyncRequestIndex, mReturnValue);
    47     mAsyncRequestIndex = -1;
    51     mAsyncRequestIndex = -1;
    48     return ret;
    52     return ret;
    49 }
    53 }
    50 
    54 
    51 void CpLauncherService::setReturnValue(const QVariant &returnValue)
    55 void CpLauncherService::setReturnValue(const QVariant &returnValue)
    52 {
    56 {
       
    57     CPSP_LOG_FUNC_ENTRY("CpLauncherService::setReturnValue")
       
    58     
    53     mReturnValue = returnValue;
    59     mReturnValue = returnValue;
    54 }
    60 }
    55 
    61 
    56 bool CpLauncherService::launchSettingView(const QString &pluginFile,const QVariant &hint)
    62 bool CpLauncherService::launchSettingView(const QString &pluginFile,const QVariant &hint)
    57 {
    63 {
    58     CPSP_LOG("Entering CpLauncherService::launchSettingView");
    64     CPSP_LOG_FUNC_ENTRY("CpLauncherService::launchSettingView");
    59    
    65    
    60     mAsyncRequestIndex = setCurrentRequestAsync();
    66     mAsyncRequestIndex = setCurrentRequestAsync();
    61     
    67     
    62     bool succeed = false;
    68     bool succeed = false;
    63        
    69        
    81         
    87         
    82         if (!succeed) {
    88         if (!succeed) {
    83             qApp->quit();  //quit application if loading plugin failed or creating setting view failed.
    89             qApp->quit();  //quit application if loading plugin failed or creating setting view failed.
    84         }
    90         }
    85     }
    91     }
    86        
       
    87     CPSP_LOG("Leaving CpLauncherService::launchSettingView");
       
    88     
    92     
    89     return succeed;
    93     return succeed;
    90 }
    94 }
    91 
    95 
    92 void CpLauncherService::handleClientDisconnected()
    96 void CpLauncherService::handleClientDisconnected()
    93 {
    97 {
       
    98     CPSP_LOG_FUNC_ENTRY("CpLauncherService::handleClientDisconnected")
       
    99         
    94     qApp->quit();
   100     qApp->quit();
    95 }
   101 }
    96 
   102 
    97 //End of File
   103 //End of File