mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-20 12:52:30 +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 )
|
||||||
|
@@ -38,10 +38,11 @@ class QtScriptResolverHelper : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QtScriptResolverHelper(const QString& scriptPath, QObject* parent );
|
QtScriptResolverHelper( const QString& scriptPath, QObject* parent );
|
||||||
|
|
||||||
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