1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 19:30:21 +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_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_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_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 GLOOX_FOUND
#cmakedefine QCA2_FOUND
#cmakedefine LIBATTICA_FOUND
#endif // CONFIG_H_IN

View File

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

View File

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

View File

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