Add 'clear' button to search bar and implement search indicator via spinner
This commit is contained in:
parent
d4336b56d6
commit
a2e120a8a3
5 changed files with 51 additions and 2 deletions
|
|
@ -39,6 +39,7 @@ void
|
|||
TimelineFilter::startFiltering()
|
||||
{
|
||||
incrementalSearchIndex = 0;
|
||||
emit isFilteringChanged();
|
||||
invalidateFilter();
|
||||
|
||||
continueFiltering();
|
||||
|
|
@ -82,6 +83,7 @@ TimelineFilter::event(QEvent *ev)
|
|||
continueFiltering();
|
||||
}
|
||||
}
|
||||
emit isFilteringChanged();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -172,6 +174,7 @@ TimelineFilter::setSource(TimelineModel *s)
|
|||
incrementalSearchIndex = 0;
|
||||
|
||||
emit sourceChanged();
|
||||
emit isFilteringChanged();
|
||||
invalidateFilter();
|
||||
}
|
||||
}
|
||||
|
|
@ -200,6 +203,12 @@ TimelineFilter::currentIndex() const
|
|||
return -1;
|
||||
}
|
||||
|
||||
bool
|
||||
TimelineFilter::isFiltering() const
|
||||
{
|
||||
return incrementalSearchIndex != std::numeric_limits<int>::max() && !(threadId.isEmpty() && contentFilter.isEmpty());
|
||||
}
|
||||
|
||||
bool
|
||||
TimelineFilter::filterAcceptsRow(int source_row, const QModelIndex &) const
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue