diff --git a/src/article_maker.cc b/src/article_maker.cc index 50bfd0ed..debd7c8e 100644 --- a/src/article_maker.cc +++ b/src/article_maker.cc @@ -517,7 +517,7 @@ void ArticleRequest::altSearchFinished() if ( GlobalBroadcaster::instance()->getPreference()->openWebsiteInNewTab ) { if ( activeDict->getFeature() == Dictionary::WebSite ) { //todo ,replace the word with actual url - emit GlobalBroadcaster::instance() -> websiteDictionary( word,url ); + emit GlobalBroadcaster::instance() -> websiteDictionary( word, url ); continue; } } diff --git a/src/dict/website.cc b/src/dict/website.cc index 08f7f6e9..ddb3433b 100644 --- a/src/dict/website.cc +++ b/src/dict/website.cc @@ -54,7 +54,7 @@ public: map< Property, string > getProperties() noexcept override { map< Property, string > properties; - properties.insert({ Property::Url, urlTemplate_ } ) ; + properties.insert( { Property::Url, urlTemplate_ } ); return properties; } @@ -330,12 +330,12 @@ sptr< DataRequest > WebSiteDictionary::getArticle( wstring const & str, QUrl url( urlString ); GlobalBroadcaster::instance()->addWhitelist( url.host() ); - QString encodeUrl=encodeUrl = urlString; + QString encodeUrl = encodeUrl = urlString; - if ( GlobalBroadcaster::instance()->getPreference()->openWebSiteInNewTab ){ - result += string("
this website dictionary is opened in the new tab
"); + if ( GlobalBroadcaster::instance()->getPreference()->openWebSiteInNewTab ) { + result += string( "
this website dictionary is opened in the new tab
" ); } - else{ + else { fmt::format_to( std::back_inserter( result ), R"(