mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-28 11:42:42 +01:00
Protect-ize account members and some methods
This commit is contained in:
parent
d50e41f4d2
commit
8b862774c9
@ -129,9 +129,14 @@ public:
|
||||
syncConfig();
|
||||
}
|
||||
|
||||
virtual void sync() { QMutexLocker locker( &m_mutex ); syncConfig(); };
|
||||
|
||||
signals:
|
||||
void configurationChanged();
|
||||
|
||||
protected:
|
||||
virtual void loadFromConfig( const QString &accountId )
|
||||
{
|
||||
QMutexLocker locker( &m_mutex );
|
||||
m_accountId = accountId;
|
||||
TomahawkSettings* s = TomahawkSettings::instance();
|
||||
s->beginGroup( "accounts/" + m_accountId );
|
||||
@ -147,7 +152,6 @@ public:
|
||||
|
||||
virtual void syncConfig()
|
||||
{
|
||||
QMutexLocker locker( &m_mutex );
|
||||
TomahawkSettings* s = TomahawkSettings::instance();
|
||||
s->beginGroup( "accounts/" + m_accountId );
|
||||
s->setValue( "accountfriendlyname", m_accountFriendlyName );
|
||||
@ -171,10 +175,6 @@ public:
|
||||
QVariantMap m_acl;
|
||||
QStringList m_types;
|
||||
mutable QMutex m_mutex;
|
||||
|
||||
signals:
|
||||
void configurationChanged();
|
||||
|
||||
};
|
||||
|
||||
class DLLEXPORT AccountFactory : public QObject
|
||||
|
@ -94,7 +94,7 @@ private slots:
|
||||
void profilePicReply();
|
||||
|
||||
private:
|
||||
inline void syncConfig() { m_account->setCredentials( m_credentials ); m_account->setConfiguration( m_configuration ); m_account->syncConfig(); }
|
||||
inline void syncConfig() { m_account->setCredentials( m_credentials ); m_account->setConfiguration( m_configuration ); m_account->sync(); }
|
||||
bool refreshTwitterAuth();
|
||||
void parseGotTomahawk( const QRegExp ®ex, const QString &screenName, const QString &text );
|
||||
|
||||
|
@ -467,7 +467,7 @@ XmppSipPlugin::configurationChanged()
|
||||
QVariantHash credentials = m_account->credentials();
|
||||
credentials[ "username" ] = m_currentUsername;
|
||||
m_account->setCredentials( credentials );
|
||||
m_account->syncConfig();
|
||||
m_account->sync();
|
||||
}
|
||||
|
||||
if ( reconnect )
|
||||
|
Loading…
x
Reference in New Issue
Block a user