1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-21 16:29:43 +01:00

Fix compile without libattica

This commit is contained in:
Leo Franchi 2011-09-11 17:29:37 -04:00
parent f3e45bd240
commit 1425b68c39
3 changed files with 12 additions and 2 deletions

View File

@ -54,9 +54,15 @@ public:
}
explicit AtticaManager ( QObject* parent = 0 );
#ifdef LIBATTICA_FOUND
virtual ~AtticaManager();
#else
virtual ~AtticaManager() {}
#endif
#ifdef LIBATTICA_FOUND
bool resolversLoaded() const;
Attica::Content::List resolvers() const;
@ -83,6 +89,7 @@ private slots:
void loadPixmapsFromCache();
void savePixmapsToCache();
void resolverIconFetched();
private:
QString extractPayload( const QString& filename, const QString& resolverId ) const;
@ -99,8 +106,6 @@ private:
#endif
static AtticaManager* s_instance;
public slots:
void resolverIconFetched();
};
#endif // ATTICAMANAGER_H

View File

@ -23,6 +23,7 @@
#include "tomahawksettings.h"
#include "tomahawkapp.h"
#include "resolver.h"
#include "config.h"
#include "utils/logger.h"
@ -138,6 +139,7 @@ ResolversModel::addResolver( const QString& resolver, bool enable )
void
ResolversModel::atticaResolverInstalled( const QString& resolverId )
{
#ifdef LIBATTICA_FOUND
Tomahawk::ExternalResolver* r = APP->resolverForPath( AtticaManager::instance()->pathFromId( resolverId ) );
if ( !r )
return;
@ -147,6 +149,7 @@ ResolversModel::atticaResolverInstalled( const QString& resolverId )
beginInsertRows( QModelIndex(), idx, idx );
endInsertRows();
}
#endif
}

View File

@ -542,7 +542,9 @@ 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 );
}
}