mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
Provide base64 encode and decode to js resolvers
This commit is contained in:
@@ -176,6 +176,20 @@ QtScriptResolverHelper::addCustomUrlHandler( const QString& protocol, const QStr
|
||||
}
|
||||
|
||||
|
||||
QByteArray
|
||||
QtScriptResolverHelper::base64Encode( const QByteArray& input )
|
||||
{
|
||||
return input.toBase64();
|
||||
}
|
||||
|
||||
|
||||
QByteArray
|
||||
QtScriptResolverHelper::base64Decode( const QByteArray& input )
|
||||
{
|
||||
return QByteArray::fromBase64( input );
|
||||
}
|
||||
|
||||
|
||||
QSharedPointer< QIODevice >
|
||||
QtScriptResolverHelper::customIODeviceFactory( const Tomahawk::result_ptr& result )
|
||||
{
|
||||
|
@@ -53,6 +53,9 @@ public:
|
||||
|
||||
Q_INVOKABLE void addCustomUrlHandler( const QString& protocol, const QString& callbackFuncName );
|
||||
|
||||
Q_INVOKABLE QByteArray base64Encode( const QByteArray& input );
|
||||
Q_INVOKABLE QByteArray base64Decode( const QByteArray& input );
|
||||
|
||||
QSharedPointer<QIODevice> customIODeviceFactory( const Tomahawk::result_ptr& result );
|
||||
|
||||
public slots:
|
||||
|
Reference in New Issue
Block a user