Remove 0xAD symbol (soft hyphen) for popup window search

This commit is contained in:
Abs62 2023-01-18 20:25:03 +03:00 committed by Xiao YiFang
parent 8e2e6d8658
commit 620346bfaa

View file

@ -199,7 +199,7 @@ InputPhrase Preferences::sanitizeInputPhrase( QString const & inputPhrase ) cons
return result; return result;
} }
const QString withPunct = _phase.simplified(); const QString withPunct = _phase.simplified().remove( QChar( 0xAD ) ); // Simplify whitespaces and remove soft hyphens;
result.phrase = gd::toQString( Folding::trimWhitespaceOrPunct( gd::toWString( withPunct ) ) ); result.phrase = gd::toQString( Folding::trimWhitespaceOrPunct( gd::toWString( withPunct ) ) );
if ( !result.isValid() ) if ( !result.isValid() )
return result; // The suffix of an invalid input phrase must be empty. return result; // The suffix of an invalid input phrase must be empty.