[Patch] Usage of URL's filename to detect hidden files

Craig Drummond Craig.Drummond at gmx.net
Wed Mar 17 19:40:12 GMT 2004


> I like the idea of the isHidden() method, but I'm not sure about its
> implementation :)
>
> When does your problem happen? You have an item with a leading dot in the
> filename but no leading dot in the text? Doesn't this mean that the ioslave
> returning this would actually want this item to show up, and would use a
> leading dot in the _name_ (which is the visible part), if it wanted the
> item to be hidden?

The reason being in the fonts:/ ioslave I want to return the font name (e.g. 
"Times New Roman") as the UDS_NAME, and the actual file name (times.ttf) as 
the UDS_URL. I realise this is not the normal case - but it does no harm, and 
lets the fonts stuff look nicer.

>
> About the current implementation: in KFileItem, m_url is never empty, is
> it? I don't see how it could be (other than passed empty to the ctor, but
> what for?). This wouldn't make much sense.

OK - just thought that it should check, and fall back to the previous method. 
I assumed that the version taking a UDSEntry may have an empty URL under some 
circumstances.

Craig.




More information about the kde-core-devel mailing list