diff --git a/src/libtomahawk/globalactionmanager.cpp b/src/libtomahawk/globalactionmanager.cpp index d49dad75b..e98702b24 100644 --- a/src/libtomahawk/globalactionmanager.cpp +++ b/src/libtomahawk/globalactionmanager.cpp @@ -77,22 +77,6 @@ GlobalActionManager::openLinkFromQuery( const Tomahawk::query_ptr& query ) const return openLink( title, artist, album ); } -QUrl -GlobalActionManager::openLinkFromHash( const Tomahawk::InfoSystem::InfoCriteriaHash& hash ) const -{ - QString title, artist, album; - - if( !hash.isEmpty() && hash.contains( "title" ) && hash.contains( "artist" ) ) - { - title = hash["title"]; - artist = hash["artist"]; - if( hash.contains( "album" ) ) - album = hash["album"]; - } - - return openLink( title, artist, album ); -} - QUrl GlobalActionManager::openLink( const QString& title, const QString& artist, const QString& album ) const { diff --git a/src/libtomahawk/globalactionmanager.h b/src/libtomahawk/globalactionmanager.h index 4d1f1313c..5e5e11928 100644 --- a/src/libtomahawk/globalactionmanager.h +++ b/src/libtomahawk/globalactionmanager.h @@ -23,7 +23,6 @@ #include "playlist.h" #include "query.h" #include "playlist/dynamic/DynamicPlaylist.h" -#include "infosystem/infosystem.h" #include "dllmacro.h" #include @@ -37,7 +36,7 @@ public: virtual ~GlobalActionManager(); QUrl openLinkFromQuery( const Tomahawk::query_ptr& query ) const; - QUrl openLinkFromHash( const Tomahawk::InfoSystem::InfoCriteriaHash& hash ) const; + QUrl openLink( const QString& title, const QString& artist, const QString& album ) const; void copyToClipboard( const Tomahawk::query_ptr& query ) const; QString copyPlaylistToClipboard( const Tomahawk::dynplaylist_ptr& playlist ); @@ -70,8 +69,6 @@ private: bool doQueueAdd( const QStringList& parts, const QList< QPair< QString, QString > >& queryItems ); - QUrl openLink( const QString& title, const QString& artist, const QString& album ) const; - Tomahawk::playlist_ptr m_toShow; Tomahawk::query_ptr m_waitingToBookmark; Tomahawk::query_ptr m_waitingToPlay; diff --git a/src/libtomahawk/infosystem/infoplugins/adiumplugin.cpp b/src/libtomahawk/infosystem/infoplugins/adiumplugin.cpp index 6bb93587d..ecfcb90aa 100644 --- a/src/libtomahawk/infosystem/infoplugins/adiumplugin.cpp +++ b/src/libtomahawk/infosystem/infoplugins/adiumplugin.cpp @@ -140,10 +140,26 @@ AdiumPlugin::audioStarted( const QVariant &input ) nowPlaying.append(" - "); nowPlaying.append( hash["artist"] ); nowPlaying.append( " " ); - nowPlaying.append( GlobalActionManager::instance()->openLinkFromHash( hash ).toEncoded() ); + nowPlaying.append( openLinkFromHash( hash ).toEncoded() ); setStatus( nowPlaying ); } +QUrl +AdiumPlugin::openLinkFromHash( const Tomahawk::InfoSystem::InfoCriteriaHash& hash ) const +{ + QString title, artist, album; + + if( !hash.isEmpty() && hash.contains( "title" ) && hash.contains( "artist" ) ) + { + title = hash["title"]; + artist = hash["artist"]; + if( hash.contains( "album" ) ) + album = hash["album"]; + } + + return GlobalActionManager::instance()->openLink( title, artist, album ); +} + void AdiumPlugin::audioFinished( const QVariant &input ) { diff --git a/src/libtomahawk/infosystem/infoplugins/adiumplugin.h b/src/libtomahawk/infosystem/infoplugins/adiumplugin.h index 776f62585..724c97ca3 100644 --- a/src/libtomahawk/infosystem/infoplugins/adiumplugin.h +++ b/src/libtomahawk/infosystem/infoplugins/adiumplugin.h @@ -41,6 +41,10 @@ protected slots: void pushInfo( const QString caller, const Tomahawk::InfoSystem::InfoType type, const QVariant input ); public slots: + void namChangedSlot( QNetworkAccessManager *nam ) {} // unused + void notInCacheSlot( const Tomahawk::InfoSystem::InfoCriteriaHash criteria, const QString caller, const Tomahawk::InfoSystem::InfoType type, const QVariant input, const Tomahawk::InfoSystem::InfoCustomData customData ) {} // unused + +private: void settingsChanged(); void audioStarted( const QVariant &input ); @@ -49,10 +53,8 @@ public slots: void audioPaused(); void audioResumed( const QVariant &input ); - void namChangedSlot( QNetworkAccessManager *nam ) {} // unused - void notInCacheSlot( const Tomahawk::InfoSystem::InfoCriteriaHash criteria, const QString caller, const Tomahawk::InfoSystem::InfoType type, const QVariant input, const Tomahawk::InfoSystem::InfoCustomData customData ) {} // unused + QUrl openLinkFromHash( const InfoCriteriaHash& hash ) const; -private: bool m_active; QString m_beforeStatus; QString m_afterStatus; diff --git a/thirdparty/jreen b/thirdparty/jreen index 8f995f246..2957d0ff0 160000 --- a/thirdparty/jreen +++ b/thirdparty/jreen @@ -1 +1 @@ -Subproject commit 8f995f246637f533feb7124744e113034a32b505 +Subproject commit 2957d0ff03d9561af8afc4bd3a45947392868875