From c2c6f743a58c90d9d0f5e46eadee296e9b7b492c Mon Sep 17 00:00:00 2001 From: Kevin Ottens Date: Mon, 2 Apr 2007 17:31:38 +0000 Subject: Add some conveniences. svn path=/trunk/KDE/kdebase/apps/; revision=649451 --- src/kfileplacesmodel.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/kfileplacesmodel.cpp') diff --git a/src/kfileplacesmodel.cpp b/src/kfileplacesmodel.cpp index cdbfee244..273830b3e 100644 --- a/src/kfileplacesmodel.cpp +++ b/src/kfileplacesmodel.cpp @@ -89,6 +89,16 @@ bool KFilePlacesModel::mountNeeded(const QModelIndex &index) const return data(index, MountNeededRole).toBool(); } +KIcon KFilePlacesModel::icon(const QModelIndex &index) const +{ + return KIcon(data(index, Qt::DecorationRole).value()); +} + +QString KFilePlacesModel::text(const QModelIndex &index) const +{ + return data(index, Qt::DisplayRole).toString(); +} + QVariant KFilePlacesModel::data(const QModelIndex &index, int role) const { if (!index.isValid()) -- cgit v1.3