From 086850467a47e6021b7b015b2445c9ccb7608e93 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Thu, 28 Jul 2022 21:23:52 +0800 Subject: [PATCH] opt: return directly when load about:blank or load unsuccessful --- articleview.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/articleview.cc b/articleview.cc index 887f6e66..6dee2b84 100644 --- a/articleview.cc +++ b/articleview.cc @@ -535,7 +535,19 @@ void ArticleView::loadFinished( bool result ) { setZoomFactor( cfg.preferences.zoomFactor ); QUrl url = ui.definition->url(); - qDebug() << "article view loaded url:" << url.url().left( 200 ); + qDebug() << "article view loaded url:" << url.url().left( 200 ) << result; + + if( url.url() == "about:blank" ) + { + return; + } + + if( !result ) + { + qWarning() << "article loaded unsuccessful"; + return; + } + if( cfg.preferences.autoScrollToTargetArticle ) {