]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Avoid the unnecessary construction of a KIconEffect by using the one provided by...
authorJonathan Michael Thomas <echidnaman@kubuntu.org>
Sun, 29 Aug 2010 17:12:25 +0000 (17:12 +0000)
committerJonathan Michael Thomas <echidnaman@kubuntu.org>
Sun, 29 Aug 2010 17:12:25 +0000 (17:12 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=1169558

src/views/selectiontoggle.cpp

index 6608b582126f072e2e2c0b6d26794f1dfe64ef08..d802e22e082f73396ced43d816da704f2dea3cda 100644 (file)
@@ -162,8 +162,8 @@ void SelectionToggle::paintEvent(QPaintEvent* event)
 
     // draw the icon overlay
     if (m_isHovered) {
-        KIconEffect iconEffect;
-        QPixmap activeIcon = iconEffect.apply(m_icon, KIconLoader::Desktop, KIconLoader::ActiveState);
+        KIconEffect *iconEffect = KIconLoader::global()->iconEffect();
+        QPixmap activeIcon = iconEffect->apply(m_icon, KIconLoader::Desktop, KIconLoader::ActiveState);
         painter.drawPixmap(0, 0, activeIcon);
     } else {
         if (m_fadingValue < 255) {