Returning a QIcon instead of a fixed size QPixmap for DecorationRole.
This commit is contained in:
parent
06c0306e0e
commit
f21746cfae
2 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue