fixed setProperty for discoverable timeout
authorKevron Rees <kevron_m_rees@linux.intel.com>
Tue, 12 Jul 2011 20:27:24 +0000 (13:27 -0700)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Tue, 12 Jul 2011 20:27:24 +0000 (13:27 -0700)
bluetooth-qt/bluetoothdevicemodel.cpp

index 24015a5..f765168 100644 (file)
@@ -131,8 +131,15 @@ void BluetoothDevicesModel::setDiscoverableTimeout(int timeout)
 {
        if(adapter)
        {
-               bool success = adapter->setProperty("DiscoverableTimeout", timeout);
-               qDebug()<<"Setting discoverable timeout to "<<timeout<<": "<<success;
+               QDBusReply<void> reply = adapter->SetProperty("DiscoverableTimeout", QDBusVariant(timeout));
+               if(!reply.isValid())
+               {
+                       qDebug()<<"error setting discoverable timeout: "<<reply.error().message();
+               }
+               else
+               {
+                       qDebug()<<"Setting discoverable timeout to "<<timeout;
+               }
        }
 }