10-28-2012 08:02 AM
I'm using Invocation Framework as client and as target.
client works well.
now added support to be invoked as a target.
added in bar descriptor:
<invoke-target id="my-id">
<invoke-target-name>my-name</invoke-target-name>
<icon>assets/images/my-icon.png</icon>
<type>APPLICATION</type>
<filter>
<action>bb.action.OPEN</action>
<mime-type>image/png</mime-type>
.... some more
</filter>
</invoke-target>
Using the InvocationClient APP from Cascades-Community-Samples at Github I can query my app, app will be found and also launched or opened.
so the app is known as a target and filtering works as expected.
But I don't get the InvokationRequest in my SLOT:
hpp:
private Q_SLOTS: void handleInvoke(const InvokeRequest& request);
cpp:
void MyApp::handleInvoke(const InvokeRequest& request) {
qDebug() << "Invoke Request to handle";
}
debugged and found that the connect wasn't done.
this is my connect code:
m_invokeManager = new InvokeManager(this);
ok = connect(m_invokeManager, SIGNAL(invoked(const InvokeRequest&)), this, SLOT(handleInvoke(const InvokeRequest&)));
if (!ok) {
qDebug() << "connect handleInvoke failed";
}
Connection failed with:
Object::connect: No such signal bb::system::InvokeManager::invoked(const InvokeRequest&)
any idea what could be wrong ?
Solved! Go to Solution.
10-28-2012 02:45 PM
Probably need the namespaces... try this
_invokeManager = new InvokeManager(this); connect(_invokeManager, SIGNAL(invoked(const bb::system::InvokeRequest&)),this, SLOT(onInvoked(const bb::system::InvokeRequest&)));
10-28-2012 05:58 PM
thx, Kyle
added the namespace bb::system for connecting slots and signals
and got compile errors
removed use namespace bb::system from headerfile
cleaned project
and suddenly the errors gone and the slot was used
all works now as expected
10-29-2012 06:22 AM
BTW: had the same problem with another project.
changed to full bb::system:: namespace for the connect,
also got immediately error that invoked... etc is unknown
clear project and new build didn't help, but closing and re-opening the workspace did it.
so next time with unexpected errors I'll close/reopen workspace first ;-)