From b908854d5968b4b541e4ed1ba61ca4730b35cf03 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 8 Jun 2012 20:05:41 +0200 Subject: [PATCH] * Fixed Account for headless. --- src/libtomahawk/accounts/Account.cpp | 5 +++++ src/libtomahawk/accounts/Account.h | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/libtomahawk/accounts/Account.cpp b/src/libtomahawk/accounts/Account.cpp index 7ab25d226..e182889eb 100644 --- a/src/libtomahawk/accounts/Account.cpp +++ b/src/libtomahawk/accounts/Account.cpp @@ -64,6 +64,8 @@ Account::~Account() } +#ifndef ENABLE_HEADLESS + QWidget* Account::configurationWidget() { @@ -84,6 +86,9 @@ Account::icon() const return QPixmap(); } +#endif + + void Account::authenticate() { diff --git a/src/libtomahawk/accounts/Account.h b/src/libtomahawk/accounts/Account.h index 6b8b35cb3..cb61cdf74 100644 --- a/src/libtomahawk/accounts/Account.h +++ b/src/libtomahawk/accounts/Account.h @@ -82,17 +82,18 @@ public: /** * Configuration widgets can have a "dataError( bool )" signal to enable/disable the OK button in their wrapper dialogs. */ +#ifndef ENABLE_HEADLESS virtual QWidget* configurationWidget() = 0; virtual QWidget* aboutWidget() { return 0; } + virtual QWidget* aclWidget() = 0; + virtual QPixmap icon() const = 0; +#endif virtual void saveConfig() {} // called when the widget has been edited. save values from config widget, call sync() to write to disk account generic settings QVariantHash credentials() const { QMutexLocker locker( &m_mutex ); return m_credentials; } QVariantMap acl() const { QMutexLocker locker( &m_mutex ); return m_acl; } - virtual QWidget* aclWidget() = 0; - - virtual QPixmap icon() const = 0; virtual ConnectionState connectionState() const = 0; virtual bool isAuthenticated() const = 0;