]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Clean stop-gap porting ifdef for KICONTHEMES_VERSION
authorMéven Car <meven@kde.org>
Wed, 15 Jan 2025 08:57:37 +0000 (09:57 +0100)
committerMéven Car <meven@kde.org>
Wed, 15 Jan 2025 08:57:37 +0000 (09:57 +0100)
That were introduced in:
a55c467fbb31d822d89722812388425327830377
38ab14c87a945153e683657483fa4bcf44d6b0fb

src/kitemviews/kstandarditemlistwidget.cpp
src/main.cpp
src/panels/information/informationpanelcontent.cpp

index 340343158157fef9f864f8e0529683412a49f0f3..aebcfa7d4e702a2b4d5f67a8839c16f08701fc01 100644 (file)
@@ -1121,14 +1121,7 @@ void KStandardItemListWidget::updatePixmapCache()
         }
 
         if (m_isCut) {
-#if KICONTHEMES_VERSION >= QT_VERSION_CHECK(6, 5, 0)
             KIconEffect::toDisabled(m_pixmap);
-#else
-            QImage img = m_pixmap.toImage();
-            KIconEffect::toGray(img, 1);
-            KIconEffect::semiTransparent(img);
-            m_pixmap = QPixmap::fromImage(img);
-#endif
         }
 
         if (m_isHidden) {
@@ -1201,13 +1194,7 @@ void KStandardItemListWidget::updatePixmapCache()
     // Prepare the pixmap that is used when the item gets hovered
     if (isHovered()) {
         m_hoverPixmap = m_pixmap;
-#if KICONTHEMES_VERSION >= QT_VERSION_CHECK(6, 5, 0)
         KIconEffect::toActive(m_hoverPixmap);
-#else
-        QImage img = m_pixmap.toImage();
-        KIconEffect::toGamma(img, 0.7);
-        m_hoverPixmap = QPixmap::fromImage(img);
-#endif
     } else if (hoverOpacity() <= 0.0) {
         // No hover animation is ongoing. Clear m_hoverPixmap to save memory.
         m_hoverPixmap = QPixmap();
index 4e8feb1671cf369e021b87e189db371d5bfd0fbf..0d2f825c76441ae05c152469440872ea6a57454f 100644 (file)
@@ -69,9 +69,7 @@ int main(int argc, char **argv)
     /**
      * trigger initialisation of proper icon theme
      */
-#if KICONTHEMES_VERSION >= QT_VERSION_CHECK(6, 3, 0)
     KIconTheme::initTheme();
-#endif
 
     QApplication app(argc, argv);
     app.setWindowIcon(QIcon::fromTheme(QStringLiteral("system-file-manager"), app.windowIcon()));
index 78900ab8acb8ed5b811133e57938ce073a6d6826..b112b2caf3e874ff2c104fc903f236b31aadc74a 100644 (file)
@@ -413,15 +413,8 @@ void InformationPanelContent::markOutdatedPreview()
         // use it until the preview is done
         showIcon(m_item);
     } else {
-#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);
     }
 }