API addition to KTreeWidgetSearchLine to fix the shortcuts dialog

Andreas Hartmetz ahartmetz at gmail.com
Sun Oct 28 02:29:31 GMT 2007


Am Sonntag, 21. Oktober 2007 16:19:30 schrieb Andreas Hartmetz:
> Hi all,
>
> The new key shortcuts dialog has the problem that it doesn't hide the
> fold-out widget when its item is being hidden by the search line. This can
> be fixed by adding a hiddenChanged() signal to KTreeWidgetSearchLine and
> using it in the shortcuts dialog.
>
> The attached patch does the following things:
> [searchline]
> -Implement the KTreeWidgetSearchLine::hiddenChanged() signal
> -Add documentation about a known problem of KTreeWidgetSearchLine
> [shortcuts dialog]
> -Close the foldout when its item is hidden
> -Deselect an item when its foldout closes
>  (has no effect except looking better)
> -Use a different way to obtain an item pointer from a model index.
>  The new way involves a couple more lines of code but doesn't ignore
>  the model-view-delegate model as much. It's just as bad a hack as the old
>  way apart from that.
>  Details: The old way has every item's data() return its this pointer, the
> new way involves un-protecting QTreeWidget::itemFromIndex() by implementing
> a tiny subclass that un-protects itemFromIndex(). The subclass doesn't
> reimplement any virtuals, which brings up a question to the experts: Does
> the compiler generate a vtable for this subclass?
>
> The shortcuts dialog still has an issue: see what happens when you unset
> the first shortcut of an action with multiple shortcuts. I'll get to that
> later.
>

Committed on Monday.
I've finally figured out how to make KMail display mails from myself that 
start a thread: Filter not only on list ID but also on reveiver address :)
That's the reason why this mail has gone to the list only now.

> Cheers,
> Andreas






More information about the kde-core-devel mailing list