1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-09 07:36:48 +02:00

Remove ifdef of libattica

This commit is contained in:
Leo Franchi
2012-01-27 13:50:29 -05:00
parent 4334840dad
commit 39c7af6262
5 changed files with 4 additions and 29 deletions

View File

@@ -109,10 +109,10 @@ macro_optional_find_package(QCA2)
macro_log_feature(QCA2_FOUND "QCA2" "Provides encryption and signing functions required for Grooveshark resolver" "http://delta.affinix.com/qca/" FALSE "" "") macro_log_feature(QCA2_FOUND "QCA2" "Provides encryption and signing functions required for Grooveshark resolver" "http://delta.affinix.com/qca/" FALSE "" "")
macro_optional_find_package(LibAttica) macro_optional_find_package(LibAttica)
macro_log_feature(LIBATTICA_FOUND "libattica" "Provides support for automatic fetching and managing of resolvers from the tomahawk website" "https://projects.kde.org/projects/kdesupport/attica" FALSE "" "") macro_log_feature(LIBATTICA_FOUND "libattica" "Provides support for automatic fetching and managing of resolvers from the tomahawk website" "https://projects.kde.org/projects/kdesupport/attica" TRUE "" "")
macro_optional_find_package(QuaZip) macro_optional_find_package(QuaZip)
macro_log_feature(QuaZip_FOUND "QuaZip" "Provides support for extracting downloaded resolvers automatically." "http://quazip.sourceforge.net/" FALSE "" "") macro_log_feature(QuaZip_FOUND "QuaZip" "Provides support for extracting downloaded resolvers automatically." "http://quazip.sourceforge.net/" TRUE "" "")
macro_optional_find_package(Jreen) macro_optional_find_package(Jreen)
macro_log_feature(LIBJREEN_FOUND "Jreen" "Qt XMPP Library" "https://github.com/euroelessar/jreen" FALSE "" "Jreen is needed for the Jabber SIP plugin.\n") macro_log_feature(LIBJREEN_FOUND "Jreen" "Qt XMPP Library" "https://github.com/euroelessar/jreen" FALSE "" "Jreen is needed for the Jabber SIP plugin.\n")

View File

@@ -20,6 +20,5 @@
#cmakedefine LIBLASTFM_FOUND #cmakedefine LIBLASTFM_FOUND
#cmakedefine GLOOX_FOUND #cmakedefine GLOOX_FOUND
#cmakedefine QCA2_FOUND #cmakedefine QCA2_FOUND
#cmakedefine LIBATTICA_FOUND
#endif // CONFIG_H_IN #endif // CONFIG_H_IN

View File

@@ -27,11 +27,9 @@
#include "dllmacro.h" #include "dllmacro.h"
#ifdef LIBATTICA_FOUND
#include <attica/provider.h> #include <attica/provider.h>
#include <attica/providermanager.h> #include <attica/providermanager.h>
#include <attica/content.h> #include <attica/content.h>
#endif
class DLLEXPORT AtticaManager : public QObject class DLLEXPORT AtticaManager : public QObject
{ {
@@ -68,14 +66,7 @@ public:
} }
explicit AtticaManager ( QObject* parent = 0 ); explicit AtticaManager ( QObject* parent = 0 );
#ifdef LIBATTICA_FOUND
virtual ~AtticaManager(); virtual ~AtticaManager();
#else
virtual ~AtticaManager() {}
#endif
#ifdef LIBATTICA_FOUND
bool resolversLoaded() const; bool resolversLoaded() const;
@@ -122,13 +113,10 @@ private:
Attica::Provider m_resolverProvider; Attica::Provider m_resolverProvider;
Attica::Content::List m_resolvers; Attica::Content::List m_resolvers;
StateHash m_resolverStates; StateHash m_resolverStates;
#endif
static AtticaManager* s_instance; static AtticaManager* s_instance;
}; };
#ifdef LIBATTICA_FOUND
Q_DECLARE_METATYPE( Attica::Content ); Q_DECLARE_METATYPE( Attica::Content );
#endif
#endif // ATTICAMANAGER_H #endif // ATTICAMANAGER_H

View File

@@ -182,14 +182,10 @@ SettingsDialog::SettingsDialog( QWidget *parent )
ui->removeScript->setEnabled( false ); ui->removeScript->setEnabled( false );
ui->scriptList->setVerticalScrollMode( QAbstractItemView::ScrollPerPixel ); ui->scriptList->setVerticalScrollMode( QAbstractItemView::ScrollPerPixel );
#ifdef LIBATTICA_FOUND
connect( ui->getMoreResolvers, SIGNAL( clicked() ), this, SLOT( getMoreResolvers() ) ); connect( ui->getMoreResolvers, SIGNAL( clicked() ), this, SLOT( getMoreResolvers() ) );
connect( AtticaManager::instance(), SIGNAL( resolverInstalled( QString ) ), this, SLOT( atticaResolverInstalled( QString ) ) ); connect( AtticaManager::instance(), SIGNAL( resolverInstalled( QString ) ), this, SLOT( atticaResolverInstalled( QString ) ) );
connect( AtticaManager::instance(), SIGNAL( resolverUninstalled( QString ) ), this, SLOT( atticaResolverUninstalled( QString ) ) ); connect( AtticaManager::instance(), SIGNAL( resolverUninstalled( QString ) ), this, SLOT( atticaResolverUninstalled( QString ) ) );
#else
ui->getMoreResolvers->hide();
#endif
connect( ui->scriptList->selectionModel(), SIGNAL( selectionChanged( QItemSelection,QItemSelection ) ), this, SLOT( scriptSelectionChanged() ) ); connect( ui->scriptList->selectionModel(), SIGNAL( selectionChanged( QItemSelection,QItemSelection ) ), this, SLOT( scriptSelectionChanged() ) );
connect( ui->addScript, SIGNAL( clicked( bool ) ), this, SLOT( addScriptResolver() ) ); connect( ui->addScript, SIGNAL( clicked( bool ) ), this, SLOT( addScriptResolver() ) );
@@ -495,9 +491,7 @@ SettingsDialog::removeScriptResolver()
if( !ui->scriptList->selectionModel()->selectedIndexes().isEmpty() ) if( !ui->scriptList->selectionModel()->selectedIndexes().isEmpty() )
{ {
QString resolver = ui->scriptList->selectionModel()->selectedIndexes().first().data( ResolversModel::ResolverPath ).toString(); QString resolver = ui->scriptList->selectionModel()->selectedIndexes().first().data( ResolversModel::ResolverPath ).toString();
#ifdef LIBATTICA_FOUND
AtticaManager::instance()->uninstallResolver( resolver ); AtticaManager::instance()->uninstallResolver( resolver );
#endif
m_resolversModel->removeResolver( resolver ); m_resolversModel->removeResolver( resolver );
} }
}*/ }*/
@@ -506,11 +500,11 @@ SettingsDialog::removeScriptResolver()
void void
SettingsDialog::getMoreResolvers() SettingsDialog::getMoreResolvers()
{ {
#if defined(Q_WS_MAC) && defined(LIBATTICA_FOUND) #if defined(Q_WS_MAC)
GetNewStuffDialog* diag = new GetNewStuffDialog( this, Qt::Sheet ); GetNewStuffDialog* diag = new GetNewStuffDialog( this, Qt::Sheet );
connect( diag, SIGNAL( finished( int ) ), this, SLOT( getMoreResolversFinished( int ) ) ); connect( diag, SIGNAL( finished( int ) ), this, SLOT( getMoreResolversFinished( int ) ) );
diag->show(); diag->show();
#elif defined(LIBATTICA_FOUND) #else
GetNewStuffDialog diag( this ); GetNewStuffDialog diag( this );
int ret = diag.exec(); int ret = diag.exec();
Q_UNUSED( ret ); Q_UNUSED( ret );
@@ -519,7 +513,6 @@ SettingsDialog::getMoreResolvers()
} }
#ifdef LIBATTICA_FOUND
// void // void
// SettingsDialog::atticaResolverInstalled( const QString& resolverId ) // SettingsDialog::atticaResolverInstalled( const QString& resolverId )
// { // {
@@ -532,7 +525,6 @@ SettingsDialog::getMoreResolvers()
// { // {
// m_resolversModel->removeResolver( AtticaManager::instance()->pathFromId( resolverId ) ); // m_resolversModel->removeResolver( AtticaManager::instance()->pathFromId( resolverId ) );
// } // }
#endif
void void

View File

@@ -248,11 +248,9 @@ TomahawkApp::init()
tDebug() << "Init Pipeline."; tDebug() << "Init Pipeline.";
initPipeline(); initPipeline();
#ifdef LIBATTICA_FOUND
#ifndef ENABLE_HEADLESS #ifndef ENABLE_HEADLESS
// load remote list of resolvers able to be installed // load remote list of resolvers able to be installed
AtticaManager::instance(); AtticaManager::instance();
#endif
#endif #endif
if ( arguments().contains( "--http" ) || TomahawkSettings::instance()->value( "network/http", true ).toBool() ) if ( arguments().contains( "--http" ) || TomahawkSettings::instance()->value( "network/http", true ).toBool() )
@@ -324,9 +322,7 @@ TomahawkApp::~TomahawkApp()
#ifndef ENABLE_HEADLESS #ifndef ENABLE_HEADLESS
delete m_mainwindow; delete m_mainwindow;
#ifdef LIBATTICA_FOUND
delete AtticaManager::instance(); delete AtticaManager::instance();
#endif
#endif #endif