Commit 3c1452c1 authored by Urs Wolfer's avatar Urs Wolfer

Fix and cleanup RemoteDesktopsModel.


svn path=/trunk/KDE/kdenetwork/krdc/; revision=973769
parent ec7ad6cc
......@@ -87,21 +87,18 @@ QVariant RemoteDesktopsModel::data(const QModelIndex &index, int role) const
case Qt::ToolTipRole:
return item->data(index.column());
case Qt::DecorationRole:
if (item->data(index.column()).toString().contains("://")) //TODO: clean impl
if (!item->data(1).toString().isEmpty()) // contains an url
return KIcon("krdc");
#if 0
else if (item->data(index.column()).toString() == "Local Network") //TODO: clean impl
else if (item->data(1).toString() == "Local Network")
return KIcon("network-workgroup");
else if (item->data(index.column()).toString() == "...") //TODO: clean impl
else if (item->data(1).toString() == "...")
return KIcon("view-history");
return KIcon("folder-bookmarks");
case Qt::UserRole:
if (item->data(index.column() + 1).toString().contains("://"))
return QVariant(item->data(index.column() + 1).toString());
return QVariant();
case 10001: //url for dockwidget
return item->data(1);
return QVariant();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment