From c00239a1b17f29e933cf7c0381b2256259f2285e Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Sat, 2 Nov 2024 09:05:05 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- src/article_maker.cc | 2 +- src/dict/website.cc | 10 +++++----- src/ui/mainwindow.cc | 6 +++--- src/ui/mainwindow.hh | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) 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"(