visibility of child items with klistviewsearchline

Scott Wheeler wheeler at
Fri Nov 12 19:53:08 GMT 2004

On Friday 12 November 2004 0:07, Jakob Schroeter wrote:
> Hi,
> I had a look at (KMail shows similar behaviour)
> and it seems to me this is actually an issue with KListViewSearchLine. The
> attached patch makes KListViewSearchLine show children of matched items by
> default.
> What do you think?

This is semantically confusing:

+void KListViewSearchLine::ensureChildrenNotVisible(QListViewItem *item)
+  for(; item; item = item->nextSibling())
+    item->setVisible( false );
+void KListViewSearchLine::ensureChildrenVisible(QListViewItem *item)
+  for(; item; item = item->nextSibling())
+      item->setVisible( true );

That should be "ensureSiblingsVisible".  Also I'd prefer "Hidden" to 

Also note that the rest of the code doesn't put spaces around the values in 
parenthesis and puts the opening brace of a conditional.

I'd also rather not change the default since this has already been released 
working the way that it presently does.  If the behavior changes in 3.4 I'd 
like for that to be explicit.

Other than that I'm fine with the patch.


Surely there is not another language that is so slipshod and systemless, and 
so slippery and elusive to the grasp. One is washed about in it, hither and 
thither, in the most helpless way; and when at last he thinks he has captured 
a rule which offers firm ground to take a rest on amid the general rage and 
turmoil of the ten parts of speech, he turns over the page and reads, "Let 
the pupil make careful note of the following exceptions."
--Mark Twain, The Awful German Language

More information about the kde-core-devel mailing list