Use QIcon for loading icon for folder thumbnail for consistensy

When using e. g. Dolphin, which uses QIcon, the thumbnails for folders
would be inconsistent with the normal folder icons.

BUG: 364253
REVIEW: 128164
parent 5a05b039
......@@ -38,6 +38,7 @@
#include <QBitmap>
#include <QCryptographicHash>
#include <QImage>
#include <QIcon>
#include <QPainter>
#include <QPixmap>
#include <QUrl>
......@@ -466,9 +467,8 @@ QImage ThumbnailProtocol::thumbForDirectory(const QUrl& directory)
const QMimeDatabase db;
const QString iconName = db.mimeTypeForName("inode/directory").iconName();
const QPixmap folder = KIconLoader::global()->loadMimeTypeIcon(iconName,
KIconLoader::Desktop,
qMin(m_width, m_height));
const QPixmap folder = QIcon::fromTheme(iconName).pixmap(qMin(m_width, m_height));
const int folderWidth = folder.width();
const int folderHeight = folder.height();
......
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