qthighway/examples/serviceapp/src/serviceapp.cpp
changeset 8 71781823f776
parent 4 90517678cc4f
child 11 06b8e2af4411
--- a/qthighway/examples/serviceapp/src/serviceapp.cpp	Fri May 14 16:41:33 2010 +0300
+++ b/qthighway/examples/serviceapp/src/serviceapp.cpp	Thu May 27 13:42:11 2010 +0300
@@ -148,6 +148,10 @@
     {
         mDialService->complete(mNumber->text());
     }
+    if (mNewDialService && mNewDialService->asyncAnswer())
+    {
+        mNewDialService->complete(mNumber->text());
+    }
 }
 
 
@@ -158,6 +162,10 @@
     {
         mUriService->complete(true);
     }
+    if (mNewUriService && mNewUriService->asyncAnswer())
+    {
+        mNewUriService->complete(true);
+    }
 }
 
 void ServiceApp::answerFile()
@@ -167,6 +175,10 @@
     {
         mFileService->complete(true);
     }
+    if (mNewFileService && mNewFileService->asyncAnswer())
+    {
+        mNewFileService->complete(true);
+    }
 }
 
 
@@ -237,7 +249,7 @@
     int ret = 0;
     if (asyncAnswer)
     {
-        mAsyncReqIds.insert(info.clientSecureId(), setCurrentRequestAsync());
+        mAsyncReqIds.insertMulti(info.clientSecureId(), setCurrentRequestAsync());
         connect(this, SIGNAL(clientDisconnected()), this, SLOT(handleClientDisconnect()));
     }
     else
@@ -453,7 +465,7 @@
     int ret = 0;
     if (asyncAnswer)
     {
-        mAsyncReqIds.insert(info.clientSecureId(), setCurrentRequestAsync());
+        mAsyncReqIds.insertMulti(info.clientSecureId(), setCurrentRequestAsync());
         connect(this, SIGNAL(clientDisconnected()), this, SLOT(handleClientDisconnect()));
     }
     else
@@ -672,7 +684,7 @@
     mServiceApp->setLabelNumber(label,param);
     if (asyncAnswer)
     {
-        mAsyncReqIds.insert(info.clientSecureId(), setCurrentRequestAsync());
+        mAsyncReqIds.insertMulti(info.clientSecureId(), setCurrentRequestAsync());
         connect(this, SIGNAL(clientDisconnected()), this, SLOT(handleClientDisconnect()));
     }
     
@@ -748,7 +760,7 @@
     mServiceApp->setLabelNumber(label,param);
     if (asyncAnswer)
     {
-        mAsyncReqIds.insert(info.clientSecureId(), setCurrentRequestAsync());
+        mAsyncReqIds.insertMulti(info.clientSecureId(), setCurrentRequestAsync());
         connect(this, SIGNAL(clientDisconnected()), this, SLOT(handleClientDisconnect()));
     }
 
@@ -816,7 +828,7 @@
     mServiceApp->setLabelNumber(label,param);
     if (asyncAnswer)
     {
-        mAsyncReqIds.insert(info.clientSecureId(), setCurrentRequestAsync());
+        mAsyncReqIds.insertMulti(info.clientSecureId(), setCurrentRequestAsync());
         connect(this, SIGNAL(clientDisconnected()), this, SLOT(handleClientDisconnect()));
     }
     
@@ -849,7 +861,7 @@
     mServiceApp->setLabelNumber(label,param);
     if (asyncAnswer)
     {
-        mAsyncReqIds.insert(info.clientSecureId(), setCurrentRequestAsync());
+        mAsyncReqIds.insertMulti(info.clientSecureId(), setCurrentRequestAsync());
         connect(this, SIGNAL(clientDisconnected()), this, SLOT(handleClientDisconnect()));
     }
     return true;
@@ -918,7 +930,7 @@
     mServiceApp->setLabelNumber(label,param);
     if (asyncAnswer)
     {
-        mAsyncReqIds.insert(info.clientSecureId(), setCurrentRequestAsync());
+        mAsyncReqIds.insertMulti(info.clientSecureId(), setCurrentRequestAsync());
         connect(this, SIGNAL(clientDisconnected()), this, SLOT(handleClientDisconnect()));
     }
 
@@ -951,7 +963,7 @@
     mServiceApp->setLabelNumber(label,param);
     if (asyncAnswer)
     {
-        mAsyncReqIds.insert(info.clientSecureId(), setCurrentRequestAsync());
+        mAsyncReqIds.insertMulti(info.clientSecureId(), setCurrentRequestAsync());
         connect(this, SIGNAL(clientDisconnected()), this, SLOT(handleClientDisconnect()));
     }
     return true;