--- a/controlpanelui/src/cpserviceprovider/src/cplauncherservice.cpp Thu Jun 10 16:07:41 2010 +0800
+++ b/controlpanelui/src/cpserviceprovider/src/cplauncherservice.cpp Fri Jun 25 17:12:20 2010 +0800
@@ -31,6 +31,7 @@
{
CPSP_LOG("CpLauncherService Constructing...");
publishAll();
+ connect(this,SIGNAL(clientDisconnected()),this,SLOT(handleClientDisconnected()));
}
CpLauncherService::~CpLauncherService()
@@ -38,11 +39,13 @@
CPSP_LOG("CpLauncherService Destructing...");
}
-void CpLauncherService::complete()
+bool CpLauncherService::complete()
{
CPSP_LOG( QString("CpLauncherService::complete() mAsyncRequestIndex = %1, mReturnValue = %2").arg(
mAsyncRequestIndex).arg(mReturnValue.toBool()) );
- completeRequest(mAsyncRequestIndex, mReturnValue);
+ bool ret = completeRequest(mAsyncRequestIndex, mReturnValue);
+ mAsyncRequestIndex = -1;
+ return ret;
}
void CpLauncherService::setReturnValue(const QVariant &returnValue)
@@ -86,4 +89,9 @@
return succeed;
}
+void CpLauncherService::handleClientDisconnected()
+{
+ qApp->quit();
+}
+
//End of File