mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-07 01:22:49 +02:00
* Error handling in QtScriptResolver.
This commit is contained in:
parent
218b92da9e
commit
a06b1fdf52
@ -37,7 +37,13 @@ QtScriptResolver::QtScriptResolver( const QString& scriptPath )
|
||||
m_thread->start();
|
||||
|
||||
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()->evaluateJavaScript( scriptFile.readAll() );
|
||||
scriptFile.close();
|
||||
|
Loading…
x
Reference in New Issue
Block a user