1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-18 11:51:44 +02:00

fixed bugs in QtKeyChain integration

This commit is contained in:
Stefan Derkits
2012-05-14 17:18:34 +02:00
parent a968f3e92b
commit e5933b775d
2 changed files with 15 additions and 1 deletions

View File

@@ -125,6 +125,7 @@ Account::keychainJobFinished(QKeychain::Job* j )
deserializeCredentials( readJob->binaryData() ); deserializeCredentials( readJob->binaryData() );
tLog() << Q_FUNC_INFO << readJob->key(); tLog() << Q_FUNC_INFO << readJob->key();
tLog() << Q_FUNC_INFO << m_credentials; tLog() << Q_FUNC_INFO << m_credentials;
emit credentialsChanged();
} }
else else
{ {
@@ -191,6 +192,17 @@ Account::syncConfig()
} }
void
Account::syncType()
{
TomahawkSettings* s = TomahawkSettings::instance();
s->beginGroup( "accounts/" + m_accountId );
s->setValue( "types", m_types );
s->endGroup();
s->sync();
}
void void
Account::loadFromConfig( const QString& accountId ) Account::loadFromConfig( const QString& accountId )
{ {
@@ -246,7 +258,8 @@ Account::setTypes( AccountTypes types )
m_types << "ResolverType"; m_types << "ResolverType";
if ( types & StatusPushType ) if ( types & StatusPushType )
m_types << "StatusPushType"; m_types << "StatusPushType";
syncConfig(); //syncConfig();
syncType();
} }

View File

@@ -139,6 +139,7 @@ signals:
protected: protected:
virtual void loadFromConfig( const QString &accountId ); virtual void loadFromConfig( const QString &accountId );
virtual void syncConfig(); virtual void syncConfig();
virtual void syncType();
private slots: private slots:
void onConnectionStateChanged( Tomahawk::Accounts::Account::ConnectionState ); void onConnectionStateChanged( Tomahawk::Accounts::Account::ConnectionState );