Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
KGet
Commits
d5217644
Commit
d5217644
authored
Sep 29, 2020
by
Nicolas Fella
Browse files
Port away from KIO::pixmapForUrl
parent
97beeee6
Changes
1
Hide whitespace changes
Inline
Side-by-side
ui/history/transferhistoryitemdelegate.cpp
View file @
d5217644
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment