mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 17:24:08 +00:00
Escape wildcard symbols when headword is transferred to the input line from dictionary headwords dialog
This commit is contained in:
parent
269ea601f5
commit
d320b1ed70
|
@ -201,7 +201,11 @@ void DictHeadwords::itemClicked( const QModelIndex & index )
|
||||||
{
|
{
|
||||||
QVariant value = proxy->data( index, Qt::DisplayRole );
|
QVariant value = proxy->data( index, Qt::DisplayRole );
|
||||||
if ( value.canConvert< QString >() )
|
if ( value.canConvert< QString >() )
|
||||||
emit headwordSelected( value.toString() );
|
{
|
||||||
|
QString headword = value.toString();
|
||||||
|
headword.replace( QRegExp( "([\\*\\?\\[\\]])" ), "\\\\1" );
|
||||||
|
emit headwordSelected( headword );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DictHeadwords::autoApplyStateChanged( int state )
|
void DictHeadwords::autoApplyStateChanged( int state )
|
||||||
|
|
Loading…
Reference in a new issue