summaryrefslogtreecommitdiffstats
path: root/tdeui/kiconviewsearchline.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2015-01-15 07:59:16 +0900
committerMichele Calgaro <[email protected]>2015-01-15 07:59:16 +0900
commit98e72add315583a49ea7fb8f63e408ea041ac8d9 (patch)
tree42b9f674fd32d6fca91d63c1d34b3a1154a096e6 /tdeui/kiconviewsearchline.cpp
parent10bc86c4cd7e25661b4a38a2e32e3cbf7cefcbc9 (diff)
downloadtdelibs-98e72add315583a49ea7fb8f63e408ea041ac8d9.tar.gz
tdelibs-98e72add315583a49ea7fb8f63e408ea041ac8d9.zip
Minor code clean up.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'tdeui/kiconviewsearchline.cpp')
-rw-r--r--tdeui/kiconviewsearchline.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/tdeui/kiconviewsearchline.cpp b/tdeui/kiconviewsearchline.cpp
index 892e80442..77b8082ea 100644
--- a/tdeui/kiconviewsearchline.cpp
+++ b/tdeui/kiconviewsearchline.cpp
@@ -91,15 +91,11 @@ TQIconView *TDEIconViewSearchLine::iconView() const
*****************************************************************************/
void TDEIconViewSearchLine::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 TDEIconViewSearchLine::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 TDEIconViewSearchLine::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 );