1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-30 09:10:53 +02:00

Replace CC-BY-UK-2.0 licensed with New BSD licensed sha256 code

This commit is contained in:
Uwe L. Korn
2013-07-02 16:25:25 +02:00
parent 17ca3693b3
commit f542631337
4 changed files with 212 additions and 141 deletions

View File

@@ -212,12 +212,22 @@ JSResolver::init()
// add c++ part of tomahawk javascript library
d->engine->mainFrame()->addToJavaScriptWindowObject( "Tomahawk", d->resolverHelper );
// add rest of it
d->engine->setScriptPath( "tomahawk.js" );
QFile jslib( RESPATH "js/tomahawk.js" );
jslib.open( QIODevice::ReadOnly );
d->engine->mainFrame()->evaluateJavaScript( jslib.readAll() );
jslib.close();
{
// Load a JavaScript SHA256 implementation
d->engine->setScriptPath( "sha256.js" );
QFile jslib( RESPATH "js/sha256.js" );
jslib.open( QIODevice::ReadOnly );
d->engine->mainFrame()->evaluateJavaScript( jslib.readAll() );
jslib.close();
}
{
// Load the tomahawk javascript utilities
d->engine->setScriptPath( "tomahawk.js" );
QFile jslib( RESPATH "js/tomahawk.js" );
jslib.open( QIODevice::ReadOnly );
d->engine->mainFrame()->evaluateJavaScript( jslib.readAll() );
jslib.close();
}
// add resolver dependencies, if any
foreach ( QString s, d->requiredScriptPaths )