Escape wildcard symbols when headword is transferred to the input line from dictionary headwords dialog

This commit is contained in:
Abs62 2014-03-17 21:23:36 +04:00
parent 269ea601f5
commit d320b1ed70

View file

@ -201,7 +201,11 @@ void DictHeadwords::itemClicked( const QModelIndex & index )
{
QVariant value = proxy->data( index, Qt::DisplayRole );
if ( value.canConvert< QString >() )
emit headwordSelected( value.toString() );
{
QString headword = value.toString();
headword.replace( QRegExp( "([\\*\\?\\[\\]])" ), "\\\\1" );
emit headwordSelected( headword );
}
}
void DictHeadwords::autoApplyStateChanged( int state )