mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-19 12:21: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 )
|
||||
|
@@ -38,10 +38,11 @@ class QtScriptResolverHelper : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QtScriptResolverHelper(const QString& scriptPath, QObject* parent );
|
||||
QtScriptResolverHelper( const QString& scriptPath, QObject* parent );
|
||||
|
||||
public slots:
|
||||
QString readFile(const QString& fileName);
|
||||
QString readFile( const QString& fileName );
|
||||
QString compress( const QString& data );
|
||||
|
||||
private:
|
||||
QString m_scriptPath;
|
||||
|
Reference in New Issue
Block a user