From 13945286ac85ff4c30eb1f5d5f5916d8f861f865 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 8 Jun 2012 20:00:41 +0200 Subject: [PATCH] * Fixed ACLRegistry for headless. --- src/libtomahawk/AclRegistry.cpp | 14 ++++++++++---- src/libtomahawk/AclRegistry.h | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/libtomahawk/AclRegistry.cpp b/src/libtomahawk/AclRegistry.cpp index 5ae2262c9..56653187f 100644 --- a/src/libtomahawk/AclRegistry.cpp +++ b/src/libtomahawk/AclRegistry.cpp @@ -26,10 +26,13 @@ #include "TomahawkApp.h" #include "Source.h" +#ifndef ENABLE_HEADLESS + #include "jobview/AclJobItem.h" + #include "jobview/JobStatusView.h" + #include "jobview/JobStatusModel.h" +#endif + #include "utils/Logger.h" -#include "jobview/AclJobItem.h" -#include "jobview/JobStatusView.h" -#include "jobview/JobStatusModel.h" ACLRegistry* ACLRegistry::s_instance = 0; @@ -124,6 +127,7 @@ ACLRegistry::isAuthorizedUser( const QString& dbid, const QString &username, ACL return ACLRegistry::NotFound; } #endif + m_cache.append( user ); emit aclResult( dbid, username, user.acl ); return user.acl; @@ -131,6 +135,7 @@ ACLRegistry::isAuthorizedUser( const QString& dbid, const QString &username, ACL #ifndef ENABLE_HEADLESS + void ACLRegistry::getUserDecision( ACLRegistry::User user, const QString &username ) { @@ -138,7 +143,6 @@ ACLRegistry::getUserDecision( ACLRegistry::User user, const QString &username ) m_jobQueue.enqueue( job ); queueNextJob(); } -#endif void @@ -189,6 +193,8 @@ ACLRegistry::queueNextJob() } } +#endif + void ACLRegistry::load() diff --git a/src/libtomahawk/AclRegistry.h b/src/libtomahawk/AclRegistry.h index 373d673a2..5405635c7 100644 --- a/src/libtomahawk/AclRegistry.h +++ b/src/libtomahawk/AclRegistry.h @@ -86,13 +86,13 @@ public slots: **/ ACLRegistry::ACL isAuthorizedUser( const QString &dbid, const QString &username, ACLRegistry::ACL globalType = ACLRegistry::NotFound, bool skipEmission = false ); - #ifndef ENABLE_HEADLESS +#ifndef ENABLE_HEADLESS void getUserDecision( ACLRegistry::User user, const QString &username ); - #endif private slots: void userDecision( ACLRegistry::User user ); void queueNextJob(); +#endif private: /**