From 43408594bb201425e4e5eb40c690498143830513 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Sun, 20 Sep 2020 00:40:01 +0200 Subject: [PATCH] Port away from KIconLoader::loadMimeTypeIcon It's about to be deprecated --- ui/propertiesdialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/propertiesdialog.cpp b/ui/propertiesdialog.cpp index 1abfda51d..ea3702cd5 100644 --- a/ui/propertiesdialog.cpp +++ b/ui/propertiesdialog.cpp @@ -101,7 +101,8 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, Okular::Document *doc) /// retrieve icon and place it in a QLabel QLabel *pixmapLabel = new QLabel(value); hboxLayout->addWidget(pixmapLabel, 0); - pixmapLabel->setPixmap(KIconLoader::global()->loadMimeTypeIcon(mimeType.iconName(), KIconLoader::Small)); + const QIcon icon = QIcon::fromTheme(mimeType.iconName(), QIcon::fromTheme(QStringLiteral("application-octet-stream"))); + pixmapLabel->setPixmap(icon.pixmap(KIconLoader::SizeSmall)); /// mime type's name and label squeezed = new KSqueezedTextLabel(i18nc("mimetype information, example: \"PDF Document (application/pdf)\"", "%1 (%2)", mimeType.comment(), valueString), value); } else {