1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-10-04 17:41:42 +02:00

Fix some linux binary resolver stuff

This commit is contained in:
Leo Franchi
2012-05-18 12:06:03 -04:00
parent 8ce4b3587d
commit 4f947b893f
3 changed files with 36 additions and 18 deletions

View File

@@ -521,17 +521,25 @@ TomahawkSettings::doUpgrade( int oldVersion, int newVersion )
// If the user doesn't have a spotify account, create one, since now it
// is like the last.fm account and always exists
QStringList allAccounts = value( "accounts/allaccounts" ).toStringList();
bool found = false;
QString acct;
foreach ( const QString& account, allAccounts )
{
if ( account.startsWith( "spotifyaccount_" ) )
{
found = true;
acct = account;
break;
}
}
if ( !found )
if ( !acct.isEmpty() )
{
beginGroup( "accounts/" + acct );
QVariantHash conf = value( "configuration" ).toHash();
foreach ( const QString& key, conf.keys() )
qDebug() << key << conf[ key ].toString();
endGroup();
}
else
{
const QString accountKey = QString( "spotifyaccount_%1" ).arg( QUuid::createUuid().toString().mid( 1, 8 ) );
beginGroup( "accounts/" + accountKey );