KFileItem::metaInfo() weirdness

Nick Shaforostoff shaforostoff at gmail.com
Thu Apr 23 12:59:48 BST 2009


On Четверг 23 апреля 2009 1:55:24 pm Carsten Pfeiffer wrote:
> Hiya,
> 
> why would I only get the meta info for a file item if previewing is 
> configured?
> 
> KFileMetaInfo KFileItem::metaInfo(bool autoget, int) const
> {
>     if (autoget && !d->m_metaInfo.isValid())
>     {
>         bool isLocalUrl;
>         KUrl url(mostLocalUrl(isLocalUrl));
> ->     if (KGlobalSettings::showFilePreview(url))
>             d->m_metaInfo = KFileMetaInfo(url);//, mimetype() );
>     }
>     return d->m_metaInfo;
> }
> 
> I'd like to remove that line.
Yeah. And for dolphin use case, you could pass KGlobalSettings::showFilePreview(url) as autoget value:
item->metaInfo(KGlobalSettings::showFilePreview(item->url()),0)




More information about the kde-core-devel mailing list