mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-20 04:41:36 +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();
|
return file.readAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString
|
||||||
|
QtScriptResolverHelper::compress( const QString& data )
|
||||||
|
{
|
||||||
|
QByteArray comp = qCompress( data.toLatin1(), 9 );
|
||||||
|
return comp.toBase64();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QtScriptResolver::QtScriptResolver( const QString& scriptPath )
|
QtScriptResolver::QtScriptResolver( const QString& scriptPath )
|
||||||
: Tomahawk::ExternalResolver( scriptPath )
|
: Tomahawk::ExternalResolver( scriptPath )
|
||||||
|
@@ -42,6 +42,7 @@ public:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
QString readFile( const QString& fileName );
|
QString readFile( const QString& fileName );
|
||||||
|
QString compress( const QString& data );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_scriptPath;
|
QString m_scriptPath;
|
||||||
|
Reference in New Issue
Block a user