From 5593c134cdac3a9590ae61854801b04a24a903e7 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 28 Mar 2012 07:06:02 +0200 Subject: [PATCH] * Reorder toma.hk parameters to match website order. --- src/libtomahawk/globalactionmanager.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/libtomahawk/globalactionmanager.cpp b/src/libtomahawk/globalactionmanager.cpp index 5cc66d6f0..069887438 100644 --- a/src/libtomahawk/globalactionmanager.cpp +++ b/src/libtomahawk/globalactionmanager.cpp @@ -89,12 +89,13 @@ GlobalActionManager::openLinkFromQuery( const query_ptr& query ) const { QString title, artist, album; - if( !query->results().isEmpty() && !query->results().first().isNull() ) + if ( !query->results().isEmpty() && !query->results().first().isNull() ) { title = query->results().first()->track(); artist = query->results().first()->artist().isNull() ? QString() : query->results().first()->artist()->name(); album = query->results().first()->album().isNull() ? QString() : query->results().first()->album()->name(); - } else + } + else { title = query->track(); artist = query->artist(); @@ -110,11 +111,11 @@ GlobalActionManager::openLink( const QString& title, const QString& artist, cons { QUrl link( QString( "%1/open/track/" ).arg( hostname() ) ); - if( !title.isEmpty() ) - link.addQueryItem( "title", title ); - if( !artist.isEmpty() ) + if ( !artist.isEmpty() ) link.addQueryItem( "artist", artist ); - if( !album.isEmpty() ) + if ( !title.isEmpty() ) + link.addQueryItem( "title", title ); + if ( !album.isEmpty() ) link.addQueryItem( "album", album ); return link;