clean: deprecated QVariant::type

This commit is contained in:
shenleban tongying 2024-10-06 17:10:56 -04:00
parent 997f24d62f
commit 90d55d7392

View file

@ -1389,7 +1389,7 @@ void ArticleView::playSound()
return link;})(); )"; return link;})(); )";
webview->page()->runJavaScript( variable, [ this ]( const QVariant & result ) { webview->page()->runJavaScript( variable, [ this ]( const QVariant & result ) {
if ( result.type() == QVariant::String ) { if ( result.typeId() == qMetaTypeId< QString >() ) {
QString soundScript = result.toString(); QString soundScript = result.toString();
if ( !soundScript.isEmpty() ) if ( !soundScript.isEmpty() )
openLink( QUrl::fromEncoded( soundScript.toUtf8() ), webview->url() ); openLink( QUrl::fromEncoded( soundScript.toUtf8() ), webview->url() );