[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot] 2024-11-02 09:05:05 +00:00 committed by YiFang Xiao
parent 469896bbf1
commit c00239a1b1
4 changed files with 10 additions and 10 deletions

View file

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

View file

@ -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("<div><span>this website dictionary is opened in the new tab</span></div>");
if ( GlobalBroadcaster::instance()->getPreference()->openWebSiteInNewTab ) {
result += string( "<div><span>this website dictionary is opened in the new tab</span></div>" );
}
else{
else {
fmt::format_to( std::back_inserter( result ),
R"(<iframe id="gdexpandframe-{}" src="{}"
onmouseover="processIframeMouseOver('gdexpandframe-{}');"

View file

@ -4365,12 +4365,12 @@ void MainWindow::showFTSIndexingName( QString const & name )
}
}
void MainWindow::openWebsiteInNewTab( QString const & name,QString const & url )
void MainWindow::openWebsiteInNewTab( QString const & name, QString const & url )
{
QString escaped = Utils::escapeAmps( name );
auto view = new QWebEngineView(this);
view->load(QUrl(url));
auto view = new QWebEngineView( this );
view->load( QUrl( url ) );
ui.tabWidget->insertTab( index, view, escaped );
mruList.append( dynamic_cast< QWidget * >( view ) );

View file

@ -293,7 +293,7 @@ private slots:
void openDictionaryFolder( QString const & id );
void showFTSIndexingName( QString const & name );
void openWebsiteInNewTab( QString const & name,QString const & url );
void openWebsiteInNewTab( QString const & name, QString const & url );
void handleAddToFavoritesButton();