Commit d5217644 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Port away from KIO::pixmapForUrl

parent 97beeee6
......@@ -90,9 +90,8 @@ void TransferHistoryItemDelegate::paint(QPainter *painter,
const QAbstractItemModel *model = static_cast <const QAbstractItemModel *> (index.model());
QUrl url(model->data(index, TransferHistoryCategorizedDelegate::RoleUrl).toString());
QString name = url.path().mid(url.path().lastIndexOf("/") + 1);
QIcon icon(KIO::pixmapForUrl(
model->data(index, TransferHistoryCategorizedDelegate::RoleDest).toUrl(),
0, KIconLoader::Panel));
const QString iconName = KIO::iconNameForUrl(model->data(index, TransferHistoryCategorizedDelegate::RoleDest).toUrl());
QIcon icon = QIcon::fromTheme(iconName, QIcon::fromTheme("application-octet-stream"));
QString size = KIO::convertSize(model->data(index, TransferHistoryCategorizedDelegate::RoleSize).toInt());
QString date = model->data(index, TransferHistoryCategorizedDelegate::RoleDate).toDate().toString("dd.MM.yyyy");
QString host = url.host();
......
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