opt: refactor code (#1657)

* opt: refactor code

* [autofix.ci] apply automated fixes

* opt: refactor code

* opt: refactor code

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
xiaoyifang 2024-07-10 13:47:53 +08:00 committed by GitHub
parent c42a79c7d4
commit 93ca284bad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 29 additions and 40 deletions

View file

@ -707,7 +707,6 @@ void ArticleRequest::bodyFinished()
bodyDone = true;
{
string footer;
if ( closePrevSpan ) {
@ -720,7 +719,7 @@ void ArticleRequest::bodyFinished()
// Larger words are usually whole sentences - don't clutter the output
// with their full bodies.
footer += ArticleMaker::makeNotFoundBody( word.size() < 40 ? word : "", group.name );
footer += ArticleMaker::makeNotFoundBody( word.size() < 40 ? word : word.left( 40 ) + "...", group.name );
// When there were no definitions, we run stemmed search.
stemmedWordFinder = std::make_shared< WordFinder >( this );
@ -739,7 +738,6 @@ void ArticleRequest::bodyFinished()
}
appendString( footer );
}
if ( stemmedWordFinder.get() ) {
update();

View file

@ -8,15 +8,6 @@
#include <QThreadPool>
#include <QMessageBox>
#include <qalgorithms.h>
#if defined( Q_OS_WIN32 )
#include "initializing.hh"
#include <qt_windows.h>
#include <QOperatingSystemVersion>
#endif
#include "globalregex.hh"
namespace FTS {