mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-23 17:29:42 +01:00
Remove autoconnect hidden toggle
This commit is contained in:
parent
cdb70b05d2
commit
948a438ff2
@ -46,7 +46,6 @@ accountTypeToString( AccountType type )
|
||||
Account::Account( const QString& accountId )
|
||||
: QObject()
|
||||
, m_enabled( false )
|
||||
, m_autoConnect( false )
|
||||
, m_accountId( accountId )
|
||||
{
|
||||
connect( this, SIGNAL( error( int, QString ) ), this, SLOT( onError( int,QString ) ) );
|
||||
@ -126,7 +125,6 @@ Account::syncConfig()
|
||||
s->beginGroup( "accounts/" + m_accountId );
|
||||
s->setValue( "accountfriendlyname", m_accountFriendlyName );
|
||||
s->setValue( "enabled", m_enabled );
|
||||
s->setValue( "autoconnect", m_autoConnect );
|
||||
s->setValue( "credentials", m_credentials );
|
||||
s->setValue( "configuration", m_configuration );
|
||||
s->setValue( "acl", m_acl );
|
||||
@ -144,7 +142,6 @@ Account::loadFromConfig( const QString& accountId )
|
||||
s->beginGroup( "accounts/" + m_accountId );
|
||||
m_accountFriendlyName = s->value( "accountfriendlyname", QString() ).toString();
|
||||
m_enabled = s->value( "enabled", false ).toBool();
|
||||
m_autoConnect = s->value( "autoconnect", false ).toBool();
|
||||
m_credentials = s->value( "credentials", QVariantHash() ).toHash();
|
||||
m_configuration = s->value( "configuration", QVariantHash() ).toHash();
|
||||
m_acl = s->value( "acl", QVariantMap() ).toMap();
|
||||
@ -160,7 +157,6 @@ Account::removeFromConfig()
|
||||
s->beginGroup( "accounts/" + m_accountId );
|
||||
s->remove( "accountfriendlyname" );
|
||||
s->remove( "enabled" );
|
||||
s->remove( "autoconnect" );
|
||||
s->remove( "credentials" );
|
||||
s->remove( "configuration" );
|
||||
s->remove( "acl" );
|
||||
|
@ -78,7 +78,6 @@ public:
|
||||
QString accountServiceName() const { QMutexLocker locker( &m_mutex ); return m_accountServiceName; } // e.g. "Twitter", "Last.fm"
|
||||
QString accountFriendlyName() const { QMutexLocker locker( &m_mutex ); return m_accountFriendlyName; } // e.g. screen name on the service, JID, etc.
|
||||
bool enabled() const { QMutexLocker locker( &m_mutex ); return m_enabled; }
|
||||
bool autoConnect() const { QMutexLocker locker( &m_mutex ); return m_autoConnect; }
|
||||
QString accountId() const { QMutexLocker locker( &m_mutex ); return m_accountId; }
|
||||
|
||||
QVariantHash configuration() const { QMutexLocker locker( &m_mutex ); return m_configuration; }
|
||||
@ -109,7 +108,6 @@ public:
|
||||
void setAccountServiceName( const QString &serviceName ) { QMutexLocker locker( &m_mutex ); m_accountServiceName = serviceName; }
|
||||
void setAccountFriendlyName( const QString &friendlyName ) { QMutexLocker locker( &m_mutex ); m_accountFriendlyName = friendlyName; }
|
||||
void setEnabled( bool enabled ) { QMutexLocker locker( &m_mutex ); m_enabled = enabled; }
|
||||
void setAutoConnect( bool autoConnect ) { QMutexLocker locker( &m_mutex ); m_autoConnect = autoConnect; }
|
||||
void setAccountId( const QString &accountId ) { QMutexLocker locker( &m_mutex ); m_accountId = accountId; }
|
||||
void setCredentials( const QVariantHash &credentialHash ) { QMutexLocker locker( &m_mutex ); m_credentials = credentialHash; }
|
||||
void setConfiguration( const QVariantHash &configuration ) { QMutexLocker locker( &m_mutex ); m_configuration = configuration; }
|
||||
@ -148,7 +146,6 @@ private:
|
||||
QString m_accountFriendlyName;
|
||||
QString m_cachedError;
|
||||
bool m_enabled;
|
||||
bool m_autoConnect;
|
||||
QString m_accountId;
|
||||
QVariantHash m_credentials;
|
||||
QVariantHash m_configuration;
|
||||
|
@ -374,7 +374,7 @@ AccountManager::hookupAndEnable( Account* account, bool startup )
|
||||
if ( p )
|
||||
SipHandler::instance()->hookUpPlugin( p );
|
||||
|
||||
if ( account->enabled() && ( !startup || account->autoConnect() ) )
|
||||
if ( account->enabled() )
|
||||
{
|
||||
account->authenticate();
|
||||
m_enabledAccounts << account;
|
||||
|
@ -33,7 +33,6 @@ handleAccountAdded( Tomahawk::Accounts::Account* account, bool added )
|
||||
if ( added )
|
||||
{
|
||||
account->setEnabled( true );
|
||||
account->setAutoConnect( true );
|
||||
account->saveConfig();
|
||||
|
||||
TomahawkSettings::instance()->addAccount( account->accountId() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user