December 2, 2010

lucabox lucabox
Lab Rat
1 posts

Service Framework - invoke signal on server side



I am experimenting a bit with the (IPC) service framework using qtmoiblity 1.1 (currently on windows but the app I am doing will have to run on symbian & meego)

my question is:

can I invoke a signal on the server Qobject derived class?

I wrote a helper function to call methods on the server side:

  1. void MyClass::invokeServerMethod(const char* aMethod, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3) {
  2.     QObject* server = m_clientHelper->service();
  3.     if(server) {
  4.         if( !QMetaObject::invokeMethod(server, aMethod, Qt::QueuedConnection, val0, val1, val2, val3) ) {
  5.                 CRITICAL("could not invoke method" << QString(aMethod));
  6.         }
  7.     } else {
  8.         CRITICAL("No service found, could not invoke method" << aMethod);
  9.     }
  10.     return;
  11. }

everything works as long as I call on the server side a SLOT, but if the parameter I pass as aMethod is a SIGNAL then I hit this assert it qtmobility code

  1. Q_ASSERT(d->endPointType == ObjectEndPoint::Client); in file ipc\objectendpoint.cpp

which makes me think that I cannot invoke a signal on the server fron my client process.

anyone knows why is that?



Mobile Software Engineer
France Telecom R&D UK, Orange Labs

1 reply

December 11, 2010

Bradley Bradley
Lab Rat
300 posts

Can you provide a more complete example?


Nokia Certified Qt Specialist.

  ‹‹ Expanding QListView within QScrollArea      Camera Problem on Symbain^3 ››

You must log in to post a reply. Not a member yet? Register here!