mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
Merge daf2e81ae3
into 20fcea33e1
This commit is contained in:
commit
243ce1c7b7
|
@ -538,14 +538,22 @@ void DictServerWordSearchRequest::readMatchData( QByteArray & reply )
|
||||||
if ( word.endsWith( '\"' ) ) {
|
if ( word.endsWith( '\"' ) ) {
|
||||||
word.chop( 1 );
|
word.chop( 1 );
|
||||||
}
|
}
|
||||||
if ( word[ 0 ] == '\"' ) {
|
if ( word.startsWith( '\"' ) ) {
|
||||||
word = word.mid( 1 );
|
word = word.mid( 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !word.isEmpty() ) {
|
||||||
this->addMatchedWord( word );
|
this->addMatchedWord( word );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
constexpr int halfSecond = 500;
|
||||||
|
if ( this->dictImpl->socket.waitForReadyRead( halfSecond ) ) {
|
||||||
reply = this->dictImpl->socket.readLine();
|
reply = this->dictImpl->socket.readLine();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
} while ( true );
|
} while ( true );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue