Am Freitag, 8. Januar 2010 schrieb Christophe M: > > Hi, > > > > I am about to write my own little GPS application in Qt and try to connect > > to FixStatusChanged signal from Gypsy but have the following problem > > > > Code snippet: > > ... > > deviceInterface = new QDBusInterface("org.freedesktop.Gypsy", > > "/org/freedesktop/Gypsy/default", "org.freedesktop.Gypsy.Device", > > QDBusConnection::systemBus(),this); > > ... > > connect(deviceInterface, SIGNAL(FixStatusChanged(int)), this, > > SIGNAL(fixChanged(int))); > > > > I want to pass the signal on to use it somewhere else in my application... > > > > now when starting my application I get: > > > > Object::connect: No such signal > > org::freedesktop::Gypsy::Device::FixStatusChanged(int) > > > > but mdbus -s org.freedesktop.Gypsy /org/freedesktop/Gypsy > > lists: > > [SIGNAL] org.freedesktop.Gypsy.Device.FixStatusChanged( i:fixstatus ) > > > > Do you have any idea what is going wrong? > > > > You can find the full code here: > > > > > > http://git.senfdax.de/?p=qgpslog;a=blob;f=src/gypsy.cpp;h=27014f72b3705c6439e10d9130c8c03f8cd9bfdf;hb=HEAD > > > > Thanks for any help. > > > > Cheers, > > Christian > > > > > Hi! > Quick response, I don't have a lot of time, here is an example of connection > to fso in Qt : > > m_db_ressourceManager = new QDBusInterface("org.freesmartphone.ogpsd", > "/org/freedesktop/Gypsy","", QDBusConnection::systemBus()); > > connect > (m_db_ressourceManager,SIGNAL(FixStatusChanged(int)),this,SLOT(fixStatusChanged(int))); > > > Try : > > new QDBusInterface("org. > > > > freedesktop.Gypsy", "/org/freedesktop/Gypsy/default", "", > > QDBusConnection::systemBus()); > > > Then connect to the signal. > > Many dbus examples are in the Qalee tree : > http://think-free83.homelinux.org/project/qalee/trunk/ > And on the wiki there is some informations : http://www.qalee.org
I tried: QDBusInterface *m_db_ressourceManager = new QDBusInterface("org.freedesktop.Gypsy", "/org/freedesktop/Gypsy","", QDBusConnection::systemBus()); QDBusMessage message = m_db_ressourceManager->call("GetPosition"); qDebug() << "message" << message; connect (m_db_ressourceManager,SIGNAL(FixStatusChanged(int)),this,SLOT(showFix(int))); but get: message QDBusMessage(type=Error, service="", error name="org.freedesktop.DBus.Error.AccessDenied", error message="Rejected send message, 4 matched rules; type="method_call", sender=":1.42" (uid=0 pid=2202 comm="./qgpslog) interface="(unset)" member="GetPosition" error name="(unset)" requested_reply=0 destination="org.freedesktop.Gypsy" (uid=0 pid=1554 comm="python))", signature="", contents=([]) ) Object::connect: No such signal QDBusInterface::FixStatusChanged(int) I also tried to to change my interface to use org.freesmartphone.ogpsd as service name and tried different settings for object path: "" "/default" "/org/freedesktop/Gypsy" "/org/freedesktop/Gypsy/default" None with success. Note I am using SHR unstable and compiled qt 4.5.2 from OE without modifications. _______________________________________________ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community