mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-10 08:04:25 +02:00
Decode percent-encoded Tomahawk links.
This commit is contained in:
@@ -165,8 +165,9 @@ GlobalActionManager::copyToClipboard( const Tomahawk::query_ptr& query ) const
|
|||||||
bool
|
bool
|
||||||
GlobalActionManager::parseTomahawkLink( const QString& url )
|
GlobalActionManager::parseTomahawkLink( const QString& url )
|
||||||
{
|
{
|
||||||
if( url.contains( "tomahawk://" ) ) {
|
QString decodedUrl = QString::fromUtf8( QByteArray::fromPercentEncoding( url.toAscii() ).data() );
|
||||||
QString cmd = url.mid( 11 );
|
if( decodedUrl.contains( "tomahawk://" ) ) {
|
||||||
|
QString cmd = decodedUrl.mid( 11 );
|
||||||
qDebug() << "Parsing tomahawk link command" << cmd;
|
qDebug() << "Parsing tomahawk link command" << cmd;
|
||||||
|
|
||||||
QString cmdType = cmd.split( "/" ).first();
|
QString cmdType = cmd.split( "/" ).first();
|
||||||
|
Reference in New Issue
Block a user