port away from KIcon
This commit is contained in:
parent
7bea46d23c
commit
9da71194c8
@ -86,7 +86,7 @@ DefaultFilterModel::DefaultFilterModel(QObject *parent) :
|
|||||||
this, SIGNAL(countChanged()));
|
this, SIGNAL(countChanged()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DefaultFilterModel::addFilter(const QString &caption, const Filter &filter, const KIcon &icon)
|
void DefaultFilterModel::addFilter(const QString &caption, const Filter &filter, const QIcon &icon)
|
||||||
{
|
{
|
||||||
QList<QStandardItem *> newRow;
|
QList<QStandardItem *> newRow;
|
||||||
QStandardItem *item = new QStandardItem(caption);
|
QStandardItem *item = new QStandardItem(caption);
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include <QtGui/QtGui>
|
#include <QtGui/QtGui>
|
||||||
#include <QtCore/QtCore>
|
#include <QtCore/QtCore>
|
||||||
#include <KIcon>
|
#include <QIcon>
|
||||||
#include <KDebug>
|
#include <KDebug>
|
||||||
|
|
||||||
namespace KCategorizedItemsViewModels {
|
namespace KCategorizedItemsViewModels {
|
||||||
@ -105,7 +105,7 @@ public:
|
|||||||
* @param caption The localized string to be displayed as a name of the filter
|
* @param caption The localized string to be displayed as a name of the filter
|
||||||
* @param filter The filter structure
|
* @param filter The filter structure
|
||||||
*/
|
*/
|
||||||
void addFilter(const QString &caption, const Filter &filter, const KIcon &icon = KIcon());
|
void addFilter(const QString &caption, const Filter &filter, const QIcon &icon = QIcon());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a separator to the model
|
* Adds a separator to the model
|
||||||
|
@ -44,7 +44,7 @@ PlasmaAppletItem::PlasmaAppletItem(PlasmaAppletItemModel *model,
|
|||||||
setText(m_info.name() + " - "+ m_info.category().toLower());
|
setText(m_info.name() + " - "+ m_info.category().toLower());
|
||||||
|
|
||||||
const QString iconName = m_info.icon().isEmpty() ? "application-x-plasma" : info.icon();
|
const QString iconName = m_info.icon().isEmpty() ? "application-x-plasma" : info.icon();
|
||||||
KIcon icon(iconName);
|
QIcon icon = QIcon::fromTheme(iconName);
|
||||||
setIcon(icon);
|
setIcon(icon);
|
||||||
|
|
||||||
//set plugininfo parts as roles in the model, only way qml can understand it
|
//set plugininfo parts as roles in the model, only way qml can understand it
|
||||||
|
Loading…
Reference in New Issue
Block a user