From 38ab14c87a945153e683657483fa4bcf44d6b0fb Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Wed, 17 Jul 2024 00:03:52 +0200 Subject: Port away from deprecated KIconEffect API --- src/panels/information/informationpanelcontent.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/panels') diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp index 86a569a86..70d85a402 100644 --- a/src/panels/information/informationpanelcontent.cpp +++ b/src/panels/information/informationpanelcontent.cpp @@ -411,8 +411,15 @@ void InformationPanelContent::markOutdatedPreview() // use it until the preview is done showIcon(m_item); } else { - KIconEffect *iconEffect = KIconLoader::global()->iconEffect(); - QPixmap disabledPixmap = iconEffect->apply(m_preview->pixmap(), KIconLoader::Desktop, KIconLoader::DisabledState); +#if KICONTHEMES_VERSION >= QT_VERSION_CHECK(6, 5, 0) + QPixmap disabledPixmap = m_preview->pixmap(); + KIconEffect::toDisabled(disabledPixmap); +#else + QImage img = m_preview->pixmap().toImage(); + KIconEffect::toGray(img, 1); + KIconEffect::semiTransparent(img); + QPixmap disabledPixmap = QPixmap::fromImage(img); +#endif m_preview->setPixmap(disabledPixmap); } } -- cgit v1.3