mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
opt: suppress url title (#1619)
* opt: suppress url title * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
08a952205c
commit
d30de48fa8
|
@ -478,7 +478,7 @@ void ArticleView::loadFinished( bool result )
|
|||
|
||||
void ArticleView::handleTitleChanged( QString const & title )
|
||||
{
|
||||
if ( !title.isEmpty() )
|
||||
if ( !title.isEmpty() && !title.contains( "://" ) )
|
||||
emit titleChanged( this, title );
|
||||
}
|
||||
|
||||
|
@ -1443,7 +1443,10 @@ void ArticleView::setContent( const QByteArray & data, const QString & mimeType,
|
|||
|
||||
QString ArticleView::getTitle()
|
||||
{
|
||||
return webview->page()->title();
|
||||
auto title = webview->title();
|
||||
if ( title.contains( "://" ) )
|
||||
return {};
|
||||
return webview->title();
|
||||
}
|
||||
|
||||
QString ArticleView::getWord() const
|
||||
|
|
Loading…
Reference in a new issue