This commit is contained in:
shenleban tongying 2024-11-12 22:27:34 +00:00 committed by GitHub
commit 0e007fea48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 );
} }