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

List:       kde-commits
Subject:    extragear/pim/mailody/src
From:       Tom Albers <tomalbers () kde ! nl>
Date:       2008-06-02 19:25:08
Message-ID: 1212434708.397740.9392.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 815884 by toma:

Only return the recipient in the display/sort role. Else we get strange results for \
the checkboxrole request.


 M  +3 -3      headerproxy.cpp  


--- trunk/extragear/pim/mailody/src/headerproxy.cpp #815883:815884
@@ -67,7 +67,8 @@
 
 QVariant HeaderProxy::data( const QModelIndex & index, int role ) const
 {
-    if ( index.column() == 1 ) { /* if this is a request for the sender column */
+    /* if this is a request for the sender column */
+    if ( index.column() == 1  && (role == Qt::DisplayRole || role == Qt::EditRole) ) \
{   const QModelIndex sourceIndex = mapToSource( index );
         const QModelIndex col2 = sourceModel()->index( sourceIndex.row(), 2, \
sourceIndex.parent() );  
@@ -83,9 +84,8 @@
             else
                 return sourceModel()->data( col2, Qt::EditRole ).toString();
 
-        } else { /* it's not my address, return the requested value */
+        } else /* it's not my address, return the requested value */
             return sourceModel()->data( sourceIndex, role );
-        }
 
     } else /* this is not a request for the sender column, call base */
         return QSortFilterProxyModel::data( index, role );


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

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