Merge commit 'refs/merge-requests/3' of git://gitorious.org/meego-handset-ux/bluetooth-qt
authorKevron Rees <kevron_m_rees@linux.intel.com>
Fri, 15 Jul 2011 22:15:08 +0000 (15:15 -0700)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Fri, 15 Jul 2011 22:15:08 +0000 (15:15 -0700)
1  2 
bluetooth-qt/bluetoothdevicemodel.cpp

@@@ -31,8 -31,6 +31,8 @@@ BluetoothDevicesModel::BluetoothDevices
                roles[i]=properties.property(i).name();
        }
  
 +      roles[roles.keys().count()+1] = "bluetoothDevice";
 +
        setRoleNames(roles);
  }
  
@@@ -51,11 -49,6 +51,11 @@@ QVariant BluetoothDevicesModel::data(co
                return QVariant(); ///this is retarded but it has to be done.
        }
  
 +      if(roleNames()[role] == "bluetoothDevice")
 +      {
 +              return QVariant::fromValue<QObject*>((QObject*)m_devices[index.row()]);
 +      }
 +
        QString roleName = roleNames()[role];
        QMetaObject object = BluetoothDevice::staticMetaObject;
  
@@@ -138,7 -131,7 +138,7 @@@ void BluetoothDevicesModel::setDiscover
  {
        if(adapter)
        {
-               QDBusReply<void> reply = adapter->SetProperty("DiscoverableTimeout", QDBusVariant(timeout));
+               QDBusReply<void> reply = adapter->SetProperty("DiscoverableTimeout", QDBusVariant((uint)timeout));
                if(!reply.isValid())
                {
                        qDebug()<<"error setting discoverable timeout: "<<reply.error().message();