mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 15:29:42 +01:00
* Prevent duplicate accounts IDs in settings.
This commit is contained in:
parent
6fd839c237
commit
27ea1ea793
@ -1093,14 +1093,20 @@ TomahawkSettings::removeSipPlugin( const QString& pluginId )
|
||||
QStringList
|
||||
TomahawkSettings::accounts() const
|
||||
{
|
||||
return value( "accounts/allaccounts", QStringList() ).toStringList();
|
||||
QStringList accounts = value( "accounts/allaccounts", QStringList() ).toStringList();
|
||||
accounts.removeDuplicates();
|
||||
|
||||
return accounts;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkSettings::setAccounts( const QStringList& accountIds )
|
||||
{
|
||||
setValue( "accounts/allaccounts", accountIds );
|
||||
QStringList accounts = accountIds;
|
||||
accounts.removeDuplicates();
|
||||
|
||||
setValue( "accounts/allaccounts", accounts );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user