Avoid the unnecessary construction of a KIconEffect by using the one provided by Dolphin's global KIconLoader

svn path=/trunk/KDE/kdebase/apps/; revision=1169558
This commit is contained in:
Jonathan Michael Thomas 2010-08-29 17:12:25 +00:00
parent 28093154dc
commit efb1cd9cad

View 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) {