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

List:       kde-commits
Subject:    KDE/kdepim/kleopatra/models
From:       Frank Osterfeld <frank.osterfeld () kdemail ! net>
Date:       2008-05-08 11:11:10
Message-ID: 1210245070.902079.25542.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 805372 by osterfeld:

cast to interface, not to AbstractKeyListModel, which fails if the source model is a proxy model
fixes i59

 M  +2 -3      keylistsortfilterproxymodel.cpp  


--- trunk/KDE/kdepim/kleopatra/models/keylistsortfilterproxymodel.cpp #805371:805372
@@ -161,9 +161,8 @@
     //
     if ( d->keyFilter ) { // avoid artifacts when no filters are defined
 
-        assert( qobject_cast<AbstractKeyListModel*>( sourceModel() ) );
-        const AbstractKeyListModel * const klm = static_cast<AbstractKeyListModel*>( sourceModel() );
-
+        const KeyListModelInterface * const klm = dynamic_cast<KeyListModelInterface*>( sourceModel() );
+        assert( klm );
         const Key key = klm->key( nameIndex );
 
         return d->keyFilter->matches( key, KeyFilter::Filtering );
[prev in list] [next in list] [prev in thread] [next in thread] 

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