Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Jun 21, 2024
1 parent e566771 commit 48eaefa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/headwordsmodel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void HeadwordListModel::setFilter( QRegularExpression reg )
if ( reg.pattern().isEmpty() ) {
QMutexLocker _( &lock );
//race condition.
if(!filtering){
if ( !filtering ) {
return;
}
filtering = false;
Expand All @@ -60,14 +60,13 @@ void HeadwordListModel::setFilter( QRegularExpression reg )

return;
}
else{
else {
QMutexLocker _( &lock );
//the first time to enter filtering mode.
if(!filtering){
if ( !filtering ) {
filtering = true;
original_words << words;
}

}
filterWords.clear();
auto sr = _dict->prefixMatch( gd::removeTrailingZero( reg.pattern() ), maxFilterResults );
Expand Down

0 comments on commit 48eaefa

Please sign in to comment.