mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
Full-text search: Ignore " or ' at first position while sorting headwords
This commit is contained in:
parent
4e065d9204
commit
94bbeb650a
|
@ -45,7 +45,12 @@ struct FtsHeadword
|
|||
}
|
||||
|
||||
bool operator <( FtsHeadword const & other ) const
|
||||
{ return headword.localeAwareCompare( other.headword ) < 0; }
|
||||
{
|
||||
if( headword[ 0 ] == '\"' || headword[ 0 ] == '\'' )
|
||||
return headword.mid( 1 ).localeAwareCompare( other.headword ) < 0;
|
||||
else
|
||||
return headword.localeAwareCompare( other.headword ) < 0;
|
||||
}
|
||||
|
||||
bool operator ==( FtsHeadword const & other ) const
|
||||
{ return headword.compare( other.headword, Qt::CaseInsensitive ) == 0; }
|
||||
|
|
Loading…
Reference in a new issue