[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [web-accounts/accounts-sso] src/models: Use KIcon instead of QIcon::fromTheme
From:       Alex Fiestas <afiestas () kde ! org>
Date:       2013-02-21 13:28:11
Message-ID: 20130221132811.F30A0A6091 () git ! kde ! org
[Download RAW message or body]

Git commit d81cca76cac3063f8befd9c304319dac53da1578 by Alex Fiestas.
Committed on 04/12/2012 at 17:53.
Pushed by afiestas into branch 'accounts-sso'.

Use KIcon instead of QIcon::fromTheme

QIcon::fromTheme seems that is not smart enough to fallback to hicolor
in case the icon is missing in Oxygen.

Right now we are using Ubuntu's icons for providers which are installed
in the hicolor dir.

M  +2    -1    src/models/accountsmodel.cpp

http://commits.kde.org/web-accounts/d81cca76cac3063f8befd9c304319dac53da1578

diff --git a/src/models/accountsmodel.cpp b/src/models/accountsmodel.cpp
index efc49b5..cbf60bc 100644
--- a/src/models/accountsmodel.cpp
+++ b/src/models/accountsmodel.cpp
@@ -22,6 +22,7 @@
 
 #include <QtGui/QIcon>
 #include <klocalizedstring.h>
+#include <kicon.h>
 
 #include <Accounts/Account>
 #include <Accounts/Manager>
@@ -154,7 +155,7 @@ QVariant AccountsModel::data(const QModelIndex& index, int role) const
     }
 
     if (role == Qt::DecorationRole) {
-        QIcon icon = QIcon::fromTheme(d->m_manager->provider(account->providerName()).iconName());
+        KIcon icon = KIcon(d->m_manager->provider(account->providerName()).iconName());
         if (!icon.isNull()) {
             return icon;
         }

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic