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

List:       kde-commits
Subject:    KDE/kdebase/workspace/libs/plasma/widgets
From:       Sebastian Sauer <mail () dipe ! org>
Date:       2008-07-30 0:11:41
Message-ID: 1217376701.816365.15255.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 839403 by sebsauer:

initialize activeMargins, now it asserts on startup on icon_p.h#282 rather then \
crashing what should help to fix the prob ;)


 M  +2 -1      icon.cpp  
 M  +4 -0      icon_p.h  


--- trunk/KDE/kdebase/workspace/libs/plasma/widgets/icon.cpp #839402:839403
@@ -68,7 +68,8 @@
       numDisplayLines(2),
       invertLayout(false),
       drawBg(false),
-      action(0)
+      action(0),
+      activeMargins(0)
 {
     m_hoverAnimId = -1;
     m_hoverAlpha = 20/255;
--- trunk/KDE/kdebase/workspace/libs/plasma/widgets/icon_p.h #839402:839403
@@ -265,24 +265,28 @@
 
 QRectF IconPrivate::addMargin(const QRectF &rect, MarginType type) const
 {
+    Q_ASSERT(activeMargins);
     const Margin &m = activeMargins[type];
     return rect.adjusted(-m.left, -m.top, m.right, m.bottom);
 }
 
 QRectF IconPrivate::subtractMargin(const QRectF &rect, MarginType type) const
 {
+    Q_ASSERT(activeMargins);
     const Margin &m = activeMargins[type];
     return rect.adjusted(m.left, m.top, -m.right, -m.bottom);
 }
 
 QSizeF IconPrivate::addMargin(const QSizeF &size, MarginType type) const
 {
+    Q_ASSERT(activeMargins);
     const Margin &m = activeMargins[type];
     return QSizeF(size.width() + m.left + m.right, size.height() + m.top + \
m.bottom);  }
 
 QSizeF IconPrivate::subtractMargin(const QSizeF &size, MarginType type) const
 {
+    Q_ASSERT(activeMargins);
     const Margin &m = activeMargins[type];
     return QSizeF(size.width() - m.left - m.right, size.height() - m.top - \
m.bottom);  }


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

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