KIO design decision necessary: unique names in KIO listings

Sebastian Trueg trueg at
Fri Jan 14 19:59:10 GMT 2011

Hi guys,

the problem is fairly simple: KIO relies on entry names to be unique.
That makes sense since there needs to be some way to identify the items
in a dir listing. This also worked nicely in pre-Nepomuk days.

However, with the introduction of desktop search the filename is no
unique identifier anymore. Two query results can have the same name.

My solution for nepomuksearch was two fold:
1. Use an encoded file URL as UDS_NAME
2. Use the actual filename as UDS_DISPLAY_NAME

This works to an extend. As you can see in bug 263169[1] the properties
dialog (there may be other places) uses UDS_NAME to display item names.
The reason is that items can be renamed and in KIO terms renaming an
item means changing its UDS_NAME.

The question now is:
Should KIO rename change its meaning to: change UDS_DISPLAY_NAME?
Should we define a new way to uniquely identify items in a dir listing?
Or what is the best solution here?
IMHO not allowing the renaming of files in a search result listing is
not an option since.



More information about the kde-core-devel mailing list