From ce19d8c70b7709a2ac7949dcd7c64275e8d5aa9a Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Fri, 8 Jun 2012 15:59:23 +0200 Subject: [PATCH] Move Last.fm account to libtomahawk --- src/CMakeLists.txt | 6 ------ src/libtomahawk/CMakeLists.txt | 5 +++++ src/{ => libtomahawk}/accounts/lastfm/LastFmAccount.cpp | 0 src/{ => libtomahawk}/accounts/lastfm/LastFmAccount.h | 7 ++++--- src/{ => libtomahawk}/accounts/lastfm/LastFmConfig.cpp | 0 src/{ => libtomahawk}/accounts/lastfm/LastFmConfig.h | 0 src/{ => libtomahawk}/accounts/lastfm/LastFmConfig.ui | 0 src/{ => libtomahawk}/accounts/lastfm/LastFmInfoPlugin.cpp | 0 src/{ => libtomahawk}/accounts/lastfm/LastFmInfoPlugin.h | 3 ++- 9 files changed, 11 insertions(+), 10 deletions(-) rename src/{ => libtomahawk}/accounts/lastfm/LastFmAccount.cpp (100%) rename src/{ => libtomahawk}/accounts/lastfm/LastFmAccount.h (92%) rename src/{ => libtomahawk}/accounts/lastfm/LastFmConfig.cpp (100%) rename src/{ => libtomahawk}/accounts/lastfm/LastFmConfig.h (100%) rename src/{ => libtomahawk}/accounts/lastfm/LastFmConfig.ui (100%) rename src/{ => libtomahawk}/accounts/lastfm/LastFmInfoPlugin.cpp (100%) rename src/{ => libtomahawk}/accounts/lastfm/LastFmInfoPlugin.h (97%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fba02bab7..f283094f5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -68,10 +68,6 @@ SET( tomahawkSourcesGui ${tomahawkSourcesGui} sourcetree/items/GroupItem.cpp sourcetree/items/HistoryItem.cpp - accounts/lastfm/LastFmAccount.cpp - accounts/lastfm/LastFmConfig.cpp - accounts/lastfm/LastFmInfoPlugin.cpp - TomahawkTrayIcon.cpp AudioControls.cpp SettingsDialog.cpp @@ -92,8 +88,6 @@ SET( tomahawkUI ${tomahawkUI} StackedSettingsDialog.ui ProxyDialog.ui - accounts/lastfm/LastFmConfig.ui - AudioControls.ui LoadXSPFDialog.ui SocialWidget.ui diff --git a/src/libtomahawk/CMakeLists.txt b/src/libtomahawk/CMakeLists.txt index cdf5ebd32..d3b4c8ed3 100644 --- a/src/libtomahawk/CMakeLists.txt +++ b/src/libtomahawk/CMakeLists.txt @@ -189,6 +189,10 @@ set( libSources accounts/spotify/SpotifyAccountConfig.cpp accounts/spotify/SpotifyPlaylistUpdater.cpp + accounts/lastfm/LastFmAccount.cpp + accounts/lastfm/LastFmConfig.cpp + accounts/lastfm/LastFmInfoPlugin.cpp + sip/SipPlugin.cpp sip/SipHandler.cpp sip/SipInfo.cpp @@ -312,6 +316,7 @@ set( libUI ${libUI} infobar/InfoBar.ui accounts/AccountFactoryWrapper.ui accounts/spotify/SpotifyAccountConfig.ui + accounts/lastfm/LastFmConfig.ui ) include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/.. .. diff --git a/src/accounts/lastfm/LastFmAccount.cpp b/src/libtomahawk/accounts/lastfm/LastFmAccount.cpp similarity index 100% rename from src/accounts/lastfm/LastFmAccount.cpp rename to src/libtomahawk/accounts/lastfm/LastFmAccount.cpp diff --git a/src/accounts/lastfm/LastFmAccount.h b/src/libtomahawk/accounts/lastfm/LastFmAccount.h similarity index 92% rename from src/accounts/lastfm/LastFmAccount.h rename to src/libtomahawk/accounts/lastfm/LastFmAccount.h index 90ca37737..f1b7ffc0c 100644 --- a/src/accounts/lastfm/LastFmAccount.h +++ b/src/libtomahawk/accounts/lastfm/LastFmAccount.h @@ -21,6 +21,7 @@ #include "accounts/Account.h" #include "AtticaManager.h" +#include "DllMacro.h" #include @@ -37,7 +38,7 @@ namespace Accounts { class LastFmConfig; -class LastFmAccountFactory : public AccountFactory +class DLLEXPORT LastFmAccountFactory : public AccountFactory { Q_OBJECT public: @@ -57,11 +58,11 @@ private: }; /** - * 3.Last.Fm account is special. It is both an attica resolver *and* a InfoPlugin. We always want the infoplugin, + * Last.Fm account is special. It is both an attica resolver *and* a InfoPlugin. We always want the infoplugin, * but the user can install the attica resolver on-demand. So we take care of both there. * */ -class LastFmAccount : public CustomAtticaAccount +class DLLEXPORT LastFmAccount : public CustomAtticaAccount { Q_OBJECT public: diff --git a/src/accounts/lastfm/LastFmConfig.cpp b/src/libtomahawk/accounts/lastfm/LastFmConfig.cpp similarity index 100% rename from src/accounts/lastfm/LastFmConfig.cpp rename to src/libtomahawk/accounts/lastfm/LastFmConfig.cpp diff --git a/src/accounts/lastfm/LastFmConfig.h b/src/libtomahawk/accounts/lastfm/LastFmConfig.h similarity index 100% rename from src/accounts/lastfm/LastFmConfig.h rename to src/libtomahawk/accounts/lastfm/LastFmConfig.h diff --git a/src/accounts/lastfm/LastFmConfig.ui b/src/libtomahawk/accounts/lastfm/LastFmConfig.ui similarity index 100% rename from src/accounts/lastfm/LastFmConfig.ui rename to src/libtomahawk/accounts/lastfm/LastFmConfig.ui diff --git a/src/accounts/lastfm/LastFmInfoPlugin.cpp b/src/libtomahawk/accounts/lastfm/LastFmInfoPlugin.cpp similarity index 100% rename from src/accounts/lastfm/LastFmInfoPlugin.cpp rename to src/libtomahawk/accounts/lastfm/LastFmInfoPlugin.cpp diff --git a/src/accounts/lastfm/LastFmInfoPlugin.h b/src/libtomahawk/accounts/lastfm/LastFmInfoPlugin.h similarity index 97% rename from src/accounts/lastfm/LastFmInfoPlugin.h rename to src/libtomahawk/accounts/lastfm/LastFmInfoPlugin.h index 0e5024fee..f744c740e 100644 --- a/src/accounts/lastfm/LastFmInfoPlugin.h +++ b/src/libtomahawk/accounts/lastfm/LastFmInfoPlugin.h @@ -22,6 +22,7 @@ #include "infosystem/InfoSystem.h" #include "infosystem/InfoSystemWorker.h" +#include "DllMacro.h" #include #include @@ -42,7 +43,7 @@ namespace Accounts namespace InfoSystem { -class LastFmInfoPlugin : public InfoPlugin +class DLLEXPORT LastFmInfoPlugin : public InfoPlugin { Q_OBJECT