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

Port away from KIconLoader::loadMimeTypeIcon

Summary: It does not do much special, except for having a fallback for when no mimetype icon is available.

Test Plan: Viewed attachment properties for file with/without mime type icons

Reviewers: #kde_pim, vkrause

Reviewed By: #kde_pim, vkrause

Subscribers: vkrause, kde-pim

Tags: #kde_pim

Differential Revision:
parent 0bca0aa3
......@@ -130,12 +130,8 @@ void AttachmentPropertiesDialog::Private::mimeTypeChanged(const QString &type)
QMimeDatabase db;
const QMimeType mimeType = db.mimeTypeForName(type);
QPixmap pix;
if (mimeType.isValid()) {
pix = KIconLoader::global()->loadMimeTypeIcon(mimeType.iconName(), KIconLoader::Desktop);
} else {
pix = QIcon::fromTheme(QStringLiteral("unknown")).pixmap(q->style()->pixelMetric(QStyle::PM_MessageBoxIconSize));
QPixmap pix = QIcon::fromTheme(mimeType.iconName(), QIcon::fromTheme(QStringLiteral("unknown"))).pixmap(q->style()->pixelMetric(QStyle::PM_MessageBoxIconSize));
if (mReadOnly) {
} else {
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