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

List:       kde-commits
Subject:    KDE/kdebase/workspace/kcontrol/kfontinst/kcmfontinst
From:       Craig Drummond <craig () kde ! org>
Date:       2010-01-19 20:32:25
Message-ID: 1263933145.119741.11617.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1077252 by craig:

If style sets SH_ItemView_PaintAlternatingRowColorsForEmptyArea, then
then idx.internalPointer will be null - so need to check for this.


 M  +3 -3      GroupList.cpp  


--- trunk/KDE/kdebase/workspace/kcontrol/kfontinst/kcmfontinst/GroupList.cpp #1077251:1077252
@@ -750,12 +750,12 @@
         CGroupListItem       *grp=static_cast<CGroupListItem *>(idx.internalPointer());
         QStyleOptionViewItem opt(option);
 
-        if(grp->isUnclassified())
+        if(grp && grp->isUnclassified())
             opt.rect.adjust(0, 0, 0, -1);
             
         QStyledItemDelegate::paint(painter, opt, idx);
 
-        if(grp->isUnclassified())
+        if(grp && grp->isUnclassified())
         {
             opt.rect.adjust(2, 0, -2, 1);
             painter->setPen(QApplication::palette().color(QPalette::Text));
@@ -769,7 +769,7 @@
 
         CGroupListItem *grp=static_cast<CGroupListItem *>(idx.internalPointer());
 
-        if(grp->isUnclassified())
+        if(grp && grp->isUnclassified())
             sz.setHeight(sz.height()+1);
         return sz;
     }
[prev in list] [next in list] [prev in thread] [next in thread] 

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