mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 13:47:26 +02:00
Fix compile without libattica
This commit is contained in:
@@ -54,9 +54,15 @@ 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
|
#ifdef LIBATTICA_FOUND
|
||||||
|
|
||||||
bool resolversLoaded() const;
|
bool resolversLoaded() const;
|
||||||
|
|
||||||
Attica::Content::List resolvers() const;
|
Attica::Content::List resolvers() const;
|
||||||
@@ -83,6 +89,7 @@ private slots:
|
|||||||
|
|
||||||
void loadPixmapsFromCache();
|
void loadPixmapsFromCache();
|
||||||
void savePixmapsToCache();
|
void savePixmapsToCache();
|
||||||
|
void resolverIconFetched();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString extractPayload( const QString& filename, const QString& resolverId ) const;
|
QString extractPayload( const QString& filename, const QString& resolverId ) const;
|
||||||
@@ -99,8 +106,6 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static AtticaManager* s_instance;
|
static AtticaManager* s_instance;
|
||||||
public slots:
|
|
||||||
void resolverIconFetched();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ATTICAMANAGER_H
|
#endif // ATTICAMANAGER_H
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#include "tomahawksettings.h"
|
#include "tomahawksettings.h"
|
||||||
#include "tomahawkapp.h"
|
#include "tomahawkapp.h"
|
||||||
#include "resolver.h"
|
#include "resolver.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include "utils/logger.h"
|
#include "utils/logger.h"
|
||||||
|
|
||||||
@@ -138,6 +139,7 @@ ResolversModel::addResolver( const QString& resolver, bool enable )
|
|||||||
void
|
void
|
||||||
ResolversModel::atticaResolverInstalled( const QString& resolverId )
|
ResolversModel::atticaResolverInstalled( const QString& resolverId )
|
||||||
{
|
{
|
||||||
|
#ifdef LIBATTICA_FOUND
|
||||||
Tomahawk::ExternalResolver* r = APP->resolverForPath( AtticaManager::instance()->pathFromId( resolverId ) );
|
Tomahawk::ExternalResolver* r = APP->resolverForPath( AtticaManager::instance()->pathFromId( resolverId ) );
|
||||||
if ( !r )
|
if ( !r )
|
||||||
return;
|
return;
|
||||||
@@ -147,6 +149,7 @@ ResolversModel::atticaResolverInstalled( const QString& resolverId )
|
|||||||
beginInsertRows( QModelIndex(), idx, idx );
|
beginInsertRows( QModelIndex(), idx, idx );
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -542,7 +542,9 @@ 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 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user