From 033e6a305978a7d56a2e5e01afefc85b74faa925 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Sun, 6 Jan 2013 01:59:25 +0100 Subject: [PATCH] qt5: port InfoPlugins --- src/infoplugins/generic/charts/ChartsPlugin.cpp | 1 - src/infoplugins/generic/charts/ChartsPlugin.h | 1 + src/infoplugins/generic/discogs/DiscogsPlugin.cpp | 1 - src/infoplugins/generic/discogs/DiscogsPlugin.h | 1 + src/infoplugins/generic/echonest/EchonestPlugin.cpp | 1 - src/infoplugins/generic/echonest/EchonestPlugin.h | 1 + src/infoplugins/generic/hypem/HypemPlugin.cpp | 1 - src/infoplugins/generic/hypem/HypemPlugin.h | 1 + .../generic/musicbrainz/MusicBrainzPlugin.cpp | 1 - .../generic/musicbrainz/MusicBrainzPlugin.h | 1 + .../generic/musixmatch/MusixMatchPlugin.cpp | 1 - src/infoplugins/generic/musixmatch/MusixMatchPlugin.h | 1 + .../generic/newreleases/NewReleasesPlugin.cpp | 1 - .../generic/newreleases/NewReleasesPlugin.h | 2 ++ src/infoplugins/generic/rovi/RoviPlugin.cpp | 1 - src/infoplugins/generic/rovi/RoviPlugin.h | 1 + src/infoplugins/generic/spotify/SpotifyPlugin.cpp | 1 - src/infoplugins/generic/spotify/SpotifyPlugin.h | 1 + src/infoplugins/linux/fdonotify/FdoNotifyPlugin.h | 1 + src/infoplugins/linux/mpris/MprisPlugin.h | 1 + src/infoplugins/mac/adium/AdiumPlugin.h | 1 + src/libtomahawk/TomahawkPlugin.h | 11 +++++++++++ src/libtomahawk/infosystem/InfoSystem.h | 1 + 23 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 src/libtomahawk/TomahawkPlugin.h diff --git a/src/infoplugins/generic/charts/ChartsPlugin.cpp b/src/infoplugins/generic/charts/ChartsPlugin.cpp index 0e87efd98..f5667c693 100644 --- a/src/infoplugins/generic/charts/ChartsPlugin.cpp +++ b/src/infoplugins/generic/charts/ChartsPlugin.cpp @@ -38,7 +38,6 @@ #include #include #include -#include #define CHART_URL "http://charts.tomahawk-player.org/" //#define CHART_URL "http://localhost:8080/" diff --git a/src/infoplugins/generic/charts/ChartsPlugin.h b/src/infoplugins/generic/charts/ChartsPlugin.h index a4c506f15..ebd0f1d0c 100644 --- a/src/infoplugins/generic/charts/ChartsPlugin.h +++ b/src/infoplugins/generic/charts/ChartsPlugin.h @@ -36,6 +36,7 @@ namespace InfoSystem class INFOPLUGINDLLEXPORT ChartsPlugin : public InfoPlugin { + Q_PLUGIN_METADATA( IID "org.tomahawk-player.Player.InfoPlugin" ) Q_OBJECT Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin ) diff --git a/src/infoplugins/generic/discogs/DiscogsPlugin.cpp b/src/infoplugins/generic/discogs/DiscogsPlugin.cpp index 405895f15..0b1cdeff9 100644 --- a/src/infoplugins/generic/discogs/DiscogsPlugin.cpp +++ b/src/infoplugins/generic/discogs/DiscogsPlugin.cpp @@ -27,7 +27,6 @@ #include #include -#include using namespace Tomahawk::InfoSystem; diff --git a/src/infoplugins/generic/discogs/DiscogsPlugin.h b/src/infoplugins/generic/discogs/DiscogsPlugin.h index 7471e2e11..ecf3ac834 100644 --- a/src/infoplugins/generic/discogs/DiscogsPlugin.h +++ b/src/infoplugins/generic/discogs/DiscogsPlugin.h @@ -34,6 +34,7 @@ namespace InfoSystem class INFOPLUGINDLLEXPORT DiscogsPlugin : public InfoPlugin { + Q_PLUGIN_METADATA( IID "org.tomahawk-player.Player.InfoPlugin" ) Q_OBJECT Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin ) diff --git a/src/infoplugins/generic/echonest/EchonestPlugin.cpp b/src/infoplugins/generic/echonest/EchonestPlugin.cpp index da2c96439..e2bbb22f8 100644 --- a/src/infoplugins/generic/echonest/EchonestPlugin.cpp +++ b/src/infoplugins/generic/echonest/EchonestPlugin.cpp @@ -24,7 +24,6 @@ #include "utils/Logger.h" #include -#include namespace Tomahawk { diff --git a/src/infoplugins/generic/echonest/EchonestPlugin.h b/src/infoplugins/generic/echonest/EchonestPlugin.h index bdd4e6a3a..e461060b1 100644 --- a/src/infoplugins/generic/echonest/EchonestPlugin.h +++ b/src/infoplugins/generic/echonest/EchonestPlugin.h @@ -37,6 +37,7 @@ namespace InfoSystem class INFOPLUGINDLLEXPORT EchonestPlugin : public InfoPlugin { + Q_PLUGIN_METADATA( IID "org.tomahawk-player.Player.InfoPlugin" ) Q_OBJECT Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin ) diff --git a/src/infoplugins/generic/hypem/HypemPlugin.cpp b/src/infoplugins/generic/hypem/HypemPlugin.cpp index abb55b36d..7cc557dac 100644 --- a/src/infoplugins/generic/hypem/HypemPlugin.cpp +++ b/src/infoplugins/generic/hypem/HypemPlugin.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include "Album.h" #include "Typedefs.h" diff --git a/src/infoplugins/generic/hypem/HypemPlugin.h b/src/infoplugins/generic/hypem/HypemPlugin.h index 63fc2f4c8..d0c9502e0 100644 --- a/src/infoplugins/generic/hypem/HypemPlugin.h +++ b/src/infoplugins/generic/hypem/HypemPlugin.h @@ -36,6 +36,7 @@ namespace InfoSystem class INFOPLUGINDLLEXPORT HypemPlugin : public InfoPlugin { + Q_PLUGIN_METADATA( IID "org.tomahawk-player.Player.InfoPlugin" ) Q_OBJECT Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin ) diff --git a/src/infoplugins/generic/musicbrainz/MusicBrainzPlugin.cpp b/src/infoplugins/generic/musicbrainz/MusicBrainzPlugin.cpp index 062950730..51dbdb7cb 100644 --- a/src/infoplugins/generic/musicbrainz/MusicBrainzPlugin.cpp +++ b/src/infoplugins/generic/musicbrainz/MusicBrainzPlugin.cpp @@ -24,7 +24,6 @@ #include #include -#include using namespace Tomahawk::InfoSystem; diff --git a/src/infoplugins/generic/musicbrainz/MusicBrainzPlugin.h b/src/infoplugins/generic/musicbrainz/MusicBrainzPlugin.h index 71ddb75b2..ac278bd11 100644 --- a/src/infoplugins/generic/musicbrainz/MusicBrainzPlugin.h +++ b/src/infoplugins/generic/musicbrainz/MusicBrainzPlugin.h @@ -34,6 +34,7 @@ namespace InfoSystem class INFOPLUGINDLLEXPORT MusicBrainzPlugin : public InfoPlugin { + Q_PLUGIN_METADATA( IID "org.tomahawk-player.Player.InfoPlugin" ) Q_OBJECT Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin ) diff --git a/src/infoplugins/generic/musixmatch/MusixMatchPlugin.cpp b/src/infoplugins/generic/musixmatch/MusixMatchPlugin.cpp index ec255752b..550ea20cc 100644 --- a/src/infoplugins/generic/musixmatch/MusixMatchPlugin.cpp +++ b/src/infoplugins/generic/musixmatch/MusixMatchPlugin.cpp @@ -24,7 +24,6 @@ #include #include -#include using namespace Tomahawk::InfoSystem; diff --git a/src/infoplugins/generic/musixmatch/MusixMatchPlugin.h b/src/infoplugins/generic/musixmatch/MusixMatchPlugin.h index 5c17c0c75..96c5dbad2 100644 --- a/src/infoplugins/generic/musixmatch/MusixMatchPlugin.h +++ b/src/infoplugins/generic/musixmatch/MusixMatchPlugin.h @@ -34,6 +34,7 @@ namespace InfoSystem class INFOPLUGINDLLEXPORT MusixMatchPlugin : public InfoPlugin { + Q_PLUGIN_METADATA( IID "org.tomahawk-player.Player.InfoPlugin" ) Q_OBJECT Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin ) diff --git a/src/infoplugins/generic/newreleases/NewReleasesPlugin.cpp b/src/infoplugins/generic/newreleases/NewReleasesPlugin.cpp index 32cfb5a21..f8285d74e 100644 --- a/src/infoplugins/generic/newreleases/NewReleasesPlugin.cpp +++ b/src/infoplugins/generic/newreleases/NewReleasesPlugin.cpp @@ -38,7 +38,6 @@ #include #include #include -#include #define CHART_URL "http://charts.tomahawk-player.org/" //#define CHART_URL "http://localhost:8080/" diff --git a/src/infoplugins/generic/newreleases/NewReleasesPlugin.h b/src/infoplugins/generic/newreleases/NewReleasesPlugin.h index 884fac901..212b058bd 100644 --- a/src/infoplugins/generic/newreleases/NewReleasesPlugin.h +++ b/src/infoplugins/generic/newreleases/NewReleasesPlugin.h @@ -37,8 +37,10 @@ namespace InfoSystem class INFOPLUGINDLLEXPORT NewReleasesPlugin : public InfoPlugin { + Q_PLUGIN_METADATA( IID "org.tomahawk-player.Player.InfoPlugin" ) Q_OBJECT Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin ) + public: NewReleasesPlugin(); virtual ~NewReleasesPlugin(); diff --git a/src/infoplugins/generic/rovi/RoviPlugin.cpp b/src/infoplugins/generic/rovi/RoviPlugin.cpp index e5c74d191..d067917d7 100644 --- a/src/infoplugins/generic/rovi/RoviPlugin.cpp +++ b/src/infoplugins/generic/rovi/RoviPlugin.cpp @@ -25,7 +25,6 @@ #include #include -#include using namespace Tomahawk::InfoSystem; diff --git a/src/infoplugins/generic/rovi/RoviPlugin.h b/src/infoplugins/generic/rovi/RoviPlugin.h index b54c3577a..87fc3bc08 100644 --- a/src/infoplugins/generic/rovi/RoviPlugin.h +++ b/src/infoplugins/generic/rovi/RoviPlugin.h @@ -35,6 +35,7 @@ namespace InfoSystem class INFOPLUGINDLLEXPORT RoviPlugin : public InfoPlugin { + Q_PLUGIN_METADATA( IID "org.tomahawk-player.Player.InfoPlugin" ) Q_OBJECT Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin ) diff --git a/src/infoplugins/generic/spotify/SpotifyPlugin.cpp b/src/infoplugins/generic/spotify/SpotifyPlugin.cpp index 38e38db40..a3ce8d367 100644 --- a/src/infoplugins/generic/spotify/SpotifyPlugin.cpp +++ b/src/infoplugins/generic/spotify/SpotifyPlugin.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include "Album.h" #include "Typedefs.h" diff --git a/src/infoplugins/generic/spotify/SpotifyPlugin.h b/src/infoplugins/generic/spotify/SpotifyPlugin.h index c21600090..b8de3967d 100644 --- a/src/infoplugins/generic/spotify/SpotifyPlugin.h +++ b/src/infoplugins/generic/spotify/SpotifyPlugin.h @@ -37,6 +37,7 @@ namespace InfoSystem class INFOPLUGINDLLEXPORT SpotifyPlugin : public InfoPlugin { + Q_PLUGIN_METADATA( IID "org.tomahawk-player.Player.InfoPlugin" ) Q_OBJECT Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin ) diff --git a/src/infoplugins/linux/fdonotify/FdoNotifyPlugin.h b/src/infoplugins/linux/fdonotify/FdoNotifyPlugin.h index fc672c00a..a83e2dc62 100644 --- a/src/infoplugins/linux/fdonotify/FdoNotifyPlugin.h +++ b/src/infoplugins/linux/fdonotify/FdoNotifyPlugin.h @@ -31,6 +31,7 @@ namespace InfoSystem class INFOPLUGINDLLEXPORT FdoNotifyPlugin : public InfoPlugin { + Q_PLUGIN_METADATA( IID "org.tomahawk-player.Player.InfoPlugin" ) Q_OBJECT Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin ) diff --git a/src/infoplugins/linux/mpris/MprisPlugin.h b/src/infoplugins/linux/mpris/MprisPlugin.h index 8a11fc1d4..47a82ca76 100644 --- a/src/infoplugins/linux/mpris/MprisPlugin.h +++ b/src/infoplugins/linux/mpris/MprisPlugin.h @@ -36,6 +36,7 @@ namespace InfoSystem class INFOPLUGINDLLEXPORT MprisPlugin : public InfoPlugin { + Q_PLUGIN_METADATA( IID "org.tomahawk-player.Player.InfoPlugin" ) Q_OBJECT Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin ) diff --git a/src/infoplugins/mac/adium/AdiumPlugin.h b/src/infoplugins/mac/adium/AdiumPlugin.h index 3687f1ab9..02980eff7 100644 --- a/src/infoplugins/mac/adium/AdiumPlugin.h +++ b/src/infoplugins/mac/adium/AdiumPlugin.h @@ -36,6 +36,7 @@ namespace InfoSystem { class INFOPLUGINDLLEXPORT AdiumPlugin : public InfoPlugin { + Q_PLUGIN_METADATA( IID "org.tomahawk-player.Player.InfoPlugin" ) Q_OBJECT Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin ) diff --git a/src/libtomahawk/TomahawkPlugin.h b/src/libtomahawk/TomahawkPlugin.h new file mode 100644 index 000000000..cf6c35760 --- /dev/null +++ b/src/libtomahawk/TomahawkPlugin.h @@ -0,0 +1,11 @@ +#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 ) + #if defined(Q_EXPORT_PLUGIN) + #undef Q_EXPORT_PLUGIN + #undef Q_EXPORT_PLUGIN2 + #endif + + #define Q_EXPORT_PLUGIN(a) + #define Q_EXPORT_PLUGIN2(a, b) +#else + # define Q_PLUGIN_METADATA(a) +#endif \ No newline at end of file diff --git a/src/libtomahawk/infosystem/InfoSystem.h b/src/libtomahawk/infosystem/InfoSystem.h index 2ef407880..c46fe46b7 100644 --- a/src/libtomahawk/infosystem/InfoSystem.h +++ b/src/libtomahawk/infosystem/InfoSystem.h @@ -23,6 +23,7 @@ #include "DllMacro.h" #include "utils/TomahawkUtils.h" #include "Typedefs.h" +#include "TomahawkPlugin.h" #include #include