diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2015-01-15 07:59:16 +0900 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2015-12-23 02:22:58 +0100 |
commit | 26d879762a7fcccd9b8c4a5ead496f95a67f7886 (patch) | |
tree | b253784f82202c8b218bc42735f260b73635adb3 | |
parent | 61d4cd95ac06d4df8819a5d46931b5b350bdfaa1 (diff) | |
download | tdelibs-26d879762a7fcccd9b8c4a5ead496f95a67f7886.tar.gz tdelibs-26d879762a7fcccd9b8c4a5ead496f95a67f7886.zip |
Minor code clean up.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 98e72add315583a49ea7fb8f63e408ea041ac8d9)
-rw-r--r-- | kdeui/kiconviewsearchline.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/kdeui/kiconviewsearchline.cpp b/kdeui/kiconviewsearchline.cpp index fc485454a..f34ff27f8 100644 --- a/kdeui/kiconviewsearchline.cpp +++ b/kdeui/kiconviewsearchline.cpp @@ -91,15 +91,11 @@ TQIconView *KIconViewSearchLine::iconView() const *****************************************************************************/ void KIconViewSearchLine::updateSearch( const TQString &s ) { - long original_count; - int original_hiddenListChanged; - if( ! d->iconView ) - return; // disabled + return; - TQString search = d->search = s.isNull() ? text() : s; + d->search = s.isNull() ? text() : s; TQIconViewItem *currentItem = d->iconView->currentItem(); - TQIconViewItem *item = NULL; // Remove Non-Matching items, add them to the hidden list @@ -107,7 +103,7 @@ void KIconViewSearchLine::updateSearch( const TQString &s ) while ( i != NULL ) { item = i; i = i->nextItem(); // Point to next, otherwise will loose it. - if ( ! itemMatches( item, search ) ) { + if ( ! itemMatches( item, d->search ) ) { hideItem( item ); if ( item == currentItem ) @@ -118,8 +114,7 @@ void KIconViewSearchLine::updateSearch( const TQString &s ) } } - d->iconView->sort(); - //d->iconView->arrangeItemsInGrid(true); // Already done inside the sort() routine + d->iconView->sort(); // This also arranges items in grid if ( currentItem != NULL ) d->iconView->ensureItemVisible( currentItem ); |