register service on the system bus. This will likely fail because we do
authorKevron Rees <kevron_m_rees@linux.intel.com>
Thu, 19 Apr 2012 00:16:31 +0000 (17:16 -0700)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Thu, 19 Apr 2012 00:16:31 +0000 (17:16 -0700)
not have permissions to register on the system bus.  if so, we will
need to create a permissions file so dbus will accept us.

src/dialerapplication.cpp

index 699dca8..36bd002 100644 (file)
@@ -83,7 +83,7 @@ void DialerApplication::connectAll()
             connect(m_manager->voicemail(), SIGNAL(messagesWaitingChanged()), this,
                     SLOT(messagesWaitingChanged()));
             PAControl* paControl = PAControl::instance();
-        qDebug()<<"UBER DEBUG!!!  I can has connect with paControl onCallsChanged";
+            qDebug()<<"UBER DEBUG!!!  I can has connect with paControl onCallsChanged";
             connect(m_manager->callManager(), SIGNAL(callsChanged()), paControl,
                     SLOT(onCallsChanged()));
         }
@@ -138,14 +138,20 @@ void DialerApplication::init()
 
     DBusDialerAdapter *adapter = new DBusDialerAdapter(this);
     if(!adapter)
-        {
-            qWarning() << "DBus adapter instantiation failed.";
-        }
+    {
+        qWarning() << "DBus adapter instantiation failed.";
+    }
 
-    if(!QDBusConnection::sessionBus().registerObject(DBUS_SERVICE_PATH, this))
+    if(!QDBusConnection::systemBus().registerService("com.hfdialer"))
+    {
+        qCritical() << "Error registering on zee bus: " <<
+                       QDBusConnection::systemBus().lastError().message();
+    }
+
+    if(!QDBusConnection::systemBus().registerObject(DBUS_SERVICE_PATH, this))
         {
             qCritical() << "Error registering dbus object:" <<
-                QDBusConnection::sessionBus().lastError().message();
+                QDBusConnection::systemBus().lastError().message();
         }
     connect(m_manager, SIGNAL(modemChanged()),
             SLOT(modemChanged()));
@@ -167,7 +173,7 @@ void DialerApplication::modemChanged()
     else
     {
         qDebug()<<"modem is null";
-        }
+    }
 }
 
 void DialerApplication::modemConnected()