[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [amarok/spotify] src/core-impl/collections/spotifycollection: Store resolver path in config file ins
From:       Edward Hades <edward.hades () gmail ! com>
Date:       2012-10-28 11:20:00
Message-ID: 20121028112000.1260BA6118 () git ! kde ! org
[Download RAW message or body]

Git commit 88323ca8c2b3eebbc169863269ffde666198b738 by Edward Hades, on behalf of \
Ryan Feng. Committed on 24/08/2012 at 13:54.
Pushed by hades into branch 'spotify'.

Store resolver path in config file instead of KWallet

M  +8    -8    src/core-impl/collections/spotifycollection/SpotifyConfig.cpp

http://commits.kde.org/amarok/88323ca8c2b3eebbc169863269ffde666198b738

diff --git a/src/core-impl/collections/spotifycollection/SpotifyConfig.cpp \
b/src/core-impl/collections/spotifycollection/SpotifyConfig.cpp index \
                0cd7ca5..cfed529 100644
--- a/src/core-impl/collections/spotifycollection/SpotifyConfig.cpp
+++ b/src/core-impl/collections/spotifycollection/SpotifyConfig.cpp
@@ -82,10 +82,11 @@ SpotifyConfig::load()
     else
     {
         m_username = config.readEntry( "username", QString() );
-        m_resolverPath = config.readEntry( "resolver", QString() );
         m_password = QByteArray::fromBase64( config.readEntry( "password", QString() \
).toLocal8Bit() );  }
 
+    m_resolverPath = config.readEntry( "resolver", KStandardDirs::locateLocal( \
"data", +                                     QString("amarok/%1").arg( \
defaultResolverName() ) ) );  m_highQuality = config.readEntry( "highquality", false \
);  }
 
@@ -120,13 +121,6 @@ SpotifyConfig::save()
         if( result != KMessageBox::No )
             config.writeEntry( "password", base64_password.toBase64() );
 
-        // Set default resolver path
-        if( m_resolverPath.isEmpty() )
-            m_resolverPath = KStandardDirs::locateLocal( "data",
-                               QString("amarok/%1").arg( defaultResolverName() ) );
-
-        config.writeEntry( "resolver", m_resolverPath );
-
         config.sync();
     }
     else
@@ -144,6 +138,12 @@ SpotifyConfig::save()
         }
     }
 
+    // Set default resolver path
+    if( m_resolverPath.isEmpty() )
+        m_resolverPath = KStandardDirs::locateLocal( "data",
+                           QString("amarok/%1").arg( defaultResolverName() ) );
+
+    config.writeEntry( "resolver", m_resolverPath );
     config.writeEntry( "highquality", m_highQuality );
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic