diff --git a/src/libtomahawk/accounts/Account.cpp b/src/libtomahawk/accounts/Account.cpp index 16a895fce..48de36282 100644 --- a/src/libtomahawk/accounts/Account.cpp +++ b/src/libtomahawk/accounts/Account.cpp @@ -125,6 +125,7 @@ Account::keychainJobFinished(QKeychain::Job* j ) deserializeCredentials( readJob->binaryData() ); tLog() << Q_FUNC_INFO << readJob->key(); tLog() << Q_FUNC_INFO << m_credentials; + emit credentialsChanged(); } 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 Account::loadFromConfig( const QString& accountId ) { @@ -246,7 +258,8 @@ Account::setTypes( AccountTypes types ) m_types << "ResolverType"; if ( types & StatusPushType ) m_types << "StatusPushType"; - syncConfig(); + //syncConfig(); + syncType(); } diff --git a/src/libtomahawk/accounts/Account.h b/src/libtomahawk/accounts/Account.h index d485d2a34..d94d30d33 100644 --- a/src/libtomahawk/accounts/Account.h +++ b/src/libtomahawk/accounts/Account.h @@ -139,6 +139,7 @@ signals: protected: virtual void loadFromConfig( const QString &accountId ); virtual void syncConfig(); + virtual void syncType(); private slots: void onConnectionStateChanged( Tomahawk::Accounts::Account::ConnectionState );