mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
Don't crash in headless mode if there's an account error
This commit is contained in:
@@ -510,13 +510,19 @@ AccountManager::onError( int code, const QString& msg )
|
|||||||
if ( code == Account::AuthError )
|
if ( code == Account::AuthError )
|
||||||
{
|
{
|
||||||
statusMessage = new SipStatusMessage( SipStatusMessage::SipLoginFailure, account->accountFriendlyName() );
|
statusMessage = new SipStatusMessage( SipStatusMessage::SipLoginFailure, account->accountFriendlyName() );
|
||||||
|
if ( !TomahawkUtils::headless() )
|
||||||
|
{
|
||||||
JobStatusView::instance()->model()->addJob( statusMessage );
|
JobStatusView::instance()->model()->addJob( statusMessage );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
QTimer::singleShot( 10000, account, SLOT( authenticate() ) );
|
||||||
|
if ( !TomahawkUtils::headless() )
|
||||||
{
|
{
|
||||||
statusMessage = new SipStatusMessage(SipStatusMessage::SipConnectionFailure, account->accountFriendlyName(), msg );
|
statusMessage = new SipStatusMessage(SipStatusMessage::SipConnectionFailure, account->accountFriendlyName(), msg );
|
||||||
JobStatusView::instance()->model()->addJob( statusMessage );
|
JobStatusView::instance()->model()->addJob( statusMessage );
|
||||||
QTimer::singleShot( 10000, account, SLOT( authenticate() ) );
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user