[FSO] QT Dbus connection to Gypsy

Michael Tansella michael-tansella at gmx.de
Fri Oct 17 14:27:51 CEST 2008

I'm new to QT and Dbus and I want to establish a simple connection to Gypsy. I 
looked at the Code of Kbluetooth 
and tried to port it to my intensions. But unfortunately it didnt't work. 
MokoNav::isConnected() always returns FALSE.
Can you tell me if I'm on the right way or what I'm doing wrong??

Michael Tansella 

void MokoNav::ConnectGPS()
QDBusConnection* dbus = new QDBusConnection("dbus");
QDBusConnection dbusconn = 
dbus->connectToBus(QDBusConnection::SessionBus, "dbus");
Service = "org.freedesktop";
sessionPath = "/org/freedesktop/Gypsy";
sessionIface = "org.freedesktop.Gypsy";
session = new QDBusInterface(Service,sessionPath,sessionIface,dbusconn);
std::cerr << "check GPS...";
bool test = isConnected(); 
std::cerr << test;

bool MokoNav::isConnected()
QDBusReply<bool> reply = session->call("IsConnected");
if (reply.isValid())
return reply.value();
return false;

More information about the community mailing list