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

Port away from deprecated DesktopIcon

Summary: Use QIcon::fromTheme

Test Plan: Still get the stopwatch icon as thumbnail when thumbnail is loaded

Reviewers: #gwenview, vkrause

Reviewed By: vkrause

Subscribers: vkrause

Tags: #gwenview

Maniphest Tasks: T11654

Differential Revision:
parent 0905b073
......@@ -387,7 +387,7 @@ void ThumbnailView::updateThumbnailSize()
} else {
waitingThumbnailSize = qRound(32 * dpr);
QPixmap icon = DesktopIcon(QStringLiteral("chronometer"), waitingThumbnailSize);
QPixmap icon = QIcon::fromTheme(QStringLiteral("chronometer")).pixmap(waitingThumbnailSize);
QPixmap pix(value);
QPainter painter(&pix);
......@@ -604,7 +604,7 @@ void ThumbnailView::setBrokenThumbnail(const KFileItem& item)
thumbnail.mWaitingForThumbnail = false;
} else {
thumbnail.initAsIcon(DesktopIcon(QStringLiteral("image-missing"), 48));
thumbnail.mFullSize = thumbnail.mGroupPix.size();
......@@ -646,7 +646,7 @@ QPixmap ThumbnailView::thumbnailForIndex(const QModelIndex& index, QSize* fullSi
// "folder-remote" icon for remote folders, so that they do
// not look like regular folders
thumbnail.mWaitingForThumbnail = false;
thumbnail.initAsIcon(DesktopIcon(QStringLiteral("folder-remote"), groupSize));
} else {
// set mWaitingForThumbnail to true (necessary in the case
// 'thumbnail' already existed before, but with a too small
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