diff --git a/src/article_maker.cc b/src/article_maker.cc index 2f019adb..6508bcba 100644 --- a/src/article_maker.cc +++ b/src/article_maker.cc @@ -707,40 +707,38 @@ void ArticleRequest::bodyFinished() bodyDone = true; - { - string footer; + string footer; - if ( closePrevSpan ) { - footer += ""; - closePrevSpan = false; - } - - if ( !foundAnyDefinitions ) { - // No definitions were ever found, say so to the user. - - // Larger words are usually whole sentences - don't clutter the output - // with their full bodies. - footer += ArticleMaker::makeNotFoundBody( word.size() < 40 ? word : "", group.name ); - - // When there were no definitions, we run stemmed search. - stemmedWordFinder = std::make_shared< WordFinder >( this ); - - connect( stemmedWordFinder.get(), - &WordFinder::finished, - this, - &ArticleRequest::stemmedSearchFinished, - Qt::QueuedConnection ); - - stemmedWordFinder->stemmedMatch( word, activeDicts ); - } - else { - footer += R"(
)"; - footer += ""; - } - - appendString( footer ); + if ( closePrevSpan ) { + footer += ""; + closePrevSpan = false; } + if ( !foundAnyDefinitions ) { + // No definitions were ever found, say so to the user. + + // Larger words are usually whole sentences - don't clutter the output + // with their full bodies. + 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 ); + + connect( stemmedWordFinder.get(), + &WordFinder::finished, + this, + &ArticleRequest::stemmedSearchFinished, + Qt::QueuedConnection ); + + stemmedWordFinder->stemmedMatch( word, activeDicts ); + } + else { + footer += R"(
)"; + footer += ""; + } + + appendString( footer ); + if ( stemmedWordFinder.get() ) { update(); qDebug() << "send dicts(stemmed):" << hittedWord; diff --git a/src/fulltextsearch.cc b/src/fulltextsearch.cc index dae3ddd0..5f81b471 100644 --- a/src/fulltextsearch.cc +++ b/src/fulltextsearch.cc @@ -8,15 +8,6 @@ #include #include -#include - -#if defined( Q_OS_WIN32 ) - - #include "initializing.hh" - #include - #include - -#endif #include "globalregex.hh" namespace FTS {