mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
* Error handling in QtScriptResolver.
This commit is contained in:
@@ -37,7 +37,13 @@ QtScriptResolver::QtScriptResolver( const QString& scriptPath )
|
|||||||
m_thread->start();
|
m_thread->start();
|
||||||
|
|
||||||
QFile scriptFile( scriptPath );
|
QFile scriptFile( scriptPath );
|
||||||
scriptFile.open( QIODevice::ReadOnly );
|
if ( !scriptFile.open( QIODevice::ReadOnly ) )
|
||||||
|
{
|
||||||
|
qDebug() << Q_FUNC_INFO << "Failed loading JavaScript resolver:" << scriptPath;
|
||||||
|
deleteLater();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_engine->mainFrame()->setHtml( "<html><body></body></html>" );
|
m_engine->mainFrame()->setHtml( "<html><body></body></html>" );
|
||||||
m_engine->mainFrame()->evaluateJavaScript( scriptFile.readAll() );
|
m_engine->mainFrame()->evaluateJavaScript( scriptFile.readAll() );
|
||||||
scriptFile.close();
|
scriptFile.close();
|
||||||
|
Reference in New Issue
Block a user