mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
Merge pull request #1906 from xiaoyifang/opt/articleview-loadfinish
opt: rearrange some code execution order
This commit is contained in:
commit
8d0859b932
|
@ -440,19 +440,16 @@ void ArticleView::inspectElement()
|
|||
void ArticleView::loadFinished( bool result )
|
||||
{
|
||||
setZoomFactor( cfg.preferences.zoomFactor );
|
||||
QUrl url = webview->url();
|
||||
qDebug() << "article view loaded url:" << url.url().left( 200 ) << result;
|
||||
|
||||
webview->unsetCursor();
|
||||
|
||||
if ( url.url() == "about:blank" ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !result ) {
|
||||
qWarning() << "article loaded unsuccessful";
|
||||
return;
|
||||
}
|
||||
QUrl url = webview->url();
|
||||
if ( url.url() == "about:blank" ) {
|
||||
return;
|
||||
}
|
||||
qDebug() << "article view loaded url:" << url.url().left( 50 ) << result;
|
||||
|
||||
if ( cfg.preferences.autoScrollToTargetArticle ) {
|
||||
QString const scrollTo = Utils::Url::queryItemValue( url, "scrollto" );
|
||||
|
|
Loading…
Reference in a new issue