[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/workspace/libs/plasma/widgets
From:       Alex Merry <kde () randomguy3 ! me ! uk>
Date:       2008-08-19 21:34:25
Message-ID: 1219181665.699507.29326.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 849654 by alexmerry:

Better initialisation/destruction.



 M  +5 -4      icon.cpp  


--- trunk/KDE/kdebase/workspace/libs/plasma/widgets/icon.cpp #849653:849654
@@ -62,6 +62,9 @@
 IconPrivate::IconPrivate(Icon *i)
     : q(i),
       iconSvg(0),
+      m_fadeIn(false),
+      m_hoverAnimId(-1),
+      m_hoverAlpha(20/255),
       iconSize(48, 48),
       states(IconPrivate::NoState),
       orientation(Qt::Vertical),
@@ -71,14 +74,11 @@
       action(0),
       activeMargins(0)
 {
-    m_hoverAnimId = -1;
-    m_hoverAlpha = 20/255;
 }
 
 IconPrivate::~IconPrivate()
 {
     qDeleteAll(cornerActions);
-    delete iconSvg;
 }
 
 void Icon::readColors() 
@@ -94,6 +94,7 @@
       m_hovered(false),
       m_pressed(false),
       m_visible(false),
+      m_selected(false),
       m_animationId(-1)
 {
 }
@@ -494,7 +495,7 @@
 void Icon::setSvg(const QString &svgFilePath, const QString &elementId)
 {
     if (!d->iconSvg) {
-        d->iconSvg = new Plasma::Svg();
+        d->iconSvg = new Plasma::Svg(this);
     }
 
     d->iconSvg->setImagePath(svgFilePath);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic