Returning a QIcon instead of a fixed size QPixmap for DecorationRole.

This commit is contained in:
Albert Vaca 2015-04-19 22:21:37 -07:00
parent 06c0306e0e
commit f21746cfae
2 changed files with 2 additions and 2 deletions

View file

@ -204,7 +204,7 @@ QVariant DevicesModel::data(const QModelIndex& index, int role) const
bool paired = device->isPaired();
bool reachable = device->isReachable();
QString icon = reachable? (paired? "user-online" : "user-busy") : "user-offline";
return QIcon::fromTheme(icon).pixmap(32, 32);
return QIcon::fromTheme(icon);
}
case IdModelRole:
return device->id();

View file

@ -164,7 +164,7 @@ QVariant NotificationsModel::data(const QModelIndex& index, int role) const
//FIXME: This function gets called lots of times, producing lots of dbus calls. Add a cache?
switch (role) {
case IconModelRole:
return QIcon::fromTheme("device-notifier").pixmap(32, 32);
return QIcon::fromTheme("device-notifier");
case IdModelRole:
return notification->internalId();
case NameModelRole: