From 50f611f8e3bc7b42df2a0bcaf6adcc7ce15a1726 Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Sun, 17 May 2015 18:48:10 -0700 Subject: [PATCH] IconModelRole now uses IconNameModelRole --- interfaces/devicesmodel.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/interfaces/devicesmodel.cpp b/interfaces/devicesmodel.cpp index e3ba87624..9b06ffc9c 100644 --- a/interfaces/devicesmodel.cpp +++ b/interfaces/devicesmodel.cpp @@ -200,12 +200,10 @@ QVariant DevicesModel::data(const QModelIndex& index, int role) const DeviceDbusInterface* device = m_deviceList[index.row()]; - //FIXME: This function gets called lots of times, producing lots of dbus calls. Add a cache. + //This function gets called lots of times, producing lots of dbus calls. Add a cache? switch (role) { case IconModelRole: { - bool paired = device->isPaired(); - bool reachable = device->isReachable(); - QString icon = reachable? (paired? "user-online" : "user-busy") : "user-offline"; + QString icon = data(index, IconNameRole).toString(); return QIcon::fromTheme(icon); } case IdModelRole: