mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-10 08:04:25 +02:00
I guess actually fix the headless crash? Not sure why this should be
needed, but it works
This commit is contained in:
@@ -188,6 +188,9 @@ ACLRegistry::isAuthorizedUser( const QString& dbid, const QString &username, ACL
|
|||||||
void
|
void
|
||||||
ACLRegistry::getUserDecision( ACLRegistry::User user, const QString &username )
|
ACLRegistry::getUserDecision( ACLRegistry::User user, const QString &username )
|
||||||
{
|
{
|
||||||
|
if ( TomahawkUtils::headless() )
|
||||||
|
return;
|
||||||
|
|
||||||
tLog() << Q_FUNC_INFO;
|
tLog() << Q_FUNC_INFO;
|
||||||
AclJobItem* job = new AclJobItem( user, username );
|
AclJobItem* job = new AclJobItem( user, username );
|
||||||
m_jobQueue.enqueue( job );
|
m_jobQueue.enqueue( job );
|
||||||
@@ -198,6 +201,9 @@ ACLRegistry::getUserDecision( ACLRegistry::User user, const QString &username )
|
|||||||
void
|
void
|
||||||
ACLRegistry::userDecision( ACLRegistry::User user )
|
ACLRegistry::userDecision( ACLRegistry::User user )
|
||||||
{
|
{
|
||||||
|
if ( TomahawkUtils::headless() )
|
||||||
|
return;
|
||||||
|
|
||||||
tLog() << Q_FUNC_INFO;
|
tLog() << Q_FUNC_INFO;
|
||||||
m_cache.append( user );
|
m_cache.append( user );
|
||||||
save();
|
save();
|
||||||
@@ -212,6 +218,9 @@ ACLRegistry::userDecision( ACLRegistry::User user )
|
|||||||
void
|
void
|
||||||
ACLRegistry::queueNextJob()
|
ACLRegistry::queueNextJob()
|
||||||
{
|
{
|
||||||
|
if ( TomahawkUtils::headless() )
|
||||||
|
return;
|
||||||
|
|
||||||
if ( QThread::currentThread() != TOMAHAWK_APPLICATION::instance()->thread() )
|
if ( QThread::currentThread() != TOMAHAWK_APPLICATION::instance()->thread() )
|
||||||
{
|
{
|
||||||
QMetaObject::invokeMethod( this, "queueNextJob", Qt::QueuedConnection );
|
QMetaObject::invokeMethod( this, "queueNextJob", Qt::QueuedConnection );
|
||||||
|
@@ -86,6 +86,7 @@ headless()
|
|||||||
void
|
void
|
||||||
setHeadless( bool headless )
|
setHeadless( bool headless )
|
||||||
{
|
{
|
||||||
|
tLog() << Q_FUNC_INFO << "headless is" << (headless? "true" : "false");
|
||||||
s_headless = headless;
|
s_headless = headless;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user