KFilePreviewGenerator

Peter Penz peter.penz at gmx.at
Tue Sep 30 08:28:32 BST 2008


Hi Rafael,

> Hi there,
> 
> I have started to write some code for KFileWidget to be able to  
> generate inline previews on the list view.
> 
> Looking at the KFilePreviewGenerator I wonder, for instance, as a 3rd  
> party application developer, why am I forced to pass a  
> QSortFilterProxyModel to the constructor:
> 
> KFilePreviewGenerator(QAbstractItemView* parent, QAbstractProxyModel*
> model);
> 
> I think this should be casted internally, but the API having something
> like:
> 
> KFilePreviewGenerator(QAbstractItemView* parent, QAbstractItemModel*
> model);
> 
> Am I missing something ?

Hm, I think you are right here and the cast should be done internally. But in this case we can change the constructor to

KFilePreviewGenerator(QAbstractItemView* parent)

anyhow, as we can get the model by QAbstractItemView::model().

I'll take care to adjust this until next Monday and will post it for a review before on kde-core-devel.

Thanks for the input :-)
Peter

> Regards,
> Rafael Fernández López.




More information about the kde-core-devel mailing list