mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-21 21:25:52 +02:00
Add compress-method to Tomahawk-Object in QtScriptResolvers
This commit is contained in:
@@ -48,6 +48,14 @@ QtScriptResolverHelper::readFile( const QString& fileName )
|
||||
return file.readAll();
|
||||
}
|
||||
|
||||
QString
|
||||
QtScriptResolverHelper::compress( const QString& data )
|
||||
{
|
||||
QByteArray comp = qCompress( data.toLatin1(), 9 );
|
||||
return comp.toBase64();
|
||||
}
|
||||
|
||||
|
||||
|
||||
QtScriptResolver::QtScriptResolver( const QString& scriptPath )
|
||||
: Tomahawk::ExternalResolver( scriptPath )
|
||||
|
@@ -42,6 +42,7 @@ public:
|
||||
|
||||
public slots:
|
||||
QString readFile( const QString& fileName );
|
||||
QString compress( const QString& data );
|
||||
|
||||
private:
|
||||
QString m_scriptPath;
|
||||
|
Reference in New Issue
Block a user