Question concerning KFileItemModel::setExpanded()

Frank Reininghaus frank78ac at googlemail.com
Tue Jan 24 15:55:24 GMT 2012


Hi Peter,

Am 24. Januar 2012 16:07 schrieb Peter Penz:
[...]
>> Maybe we should modify KFileItemModel::setExpanded() such that it
>> really only expands the parents of the given URLs? In that case, maybe
>> we should also change the name of the function to avoid confustion.
>
> Hm, I currently see two options:
> 1. We leave the name + implementation, fix the documentation to match the implementation and adjust the calling code to pass the parent URLs instead.
> 2. We leave the documentation, fix the implementation so that it only expands the parents and rename the method to avoid confusion (= your suggestion).
>
> When I wrote setExpanded(const QSet<KUrl>& urls) I had in mind to expand only the parent items like said in the documentation. I tend to go for your suggestion, as I also think the two overloaded setExpanded() methods are confusing. I'm not sure about the name - expandParentItems() or setParentItemsExpanded(...)? As we don't have a getter-method and this is no property I'd tend to go for void expandParentItems(const QSet<KUrl>& urls). Do you probably have a better suggestion?

expandParentItems is fine for me!

> Do you want to take care for proceeding with this task or should I have a look?

I can do that. I'll also make the url().url() -> url().path() change
then to fix the bug about the spaces in the folder names.

Thanks,
Frank




More information about the kfm-devel mailing list