Bug 235861 - last.fm username and password won't be saved (without kwallet)
Summary: last.fm username and password won't be saved (without kwallet)
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Services/Last.fm (show other bugs)
Version: 2.3.1-GIT
Platform: unspecified Linux
: HI major
Target Milestone: 2.3.2
Assignee: Amarok Developers
URL:
Keywords:
: 236243 237693 246372 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-05-01 00:17 UTC by esstmehrtiere
Modified: 2010-09-04 15:43 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description esstmehrtiere 2010-05-01 00:17:14 UTC
Version:           2.3.0 (using 4.4.2 (KDE 4.4.2), Kubuntu packages)
Compiler:          cc
OS:                Linux (x86_64) release 2.6.32-22-generic

using ubuntu 10.04 64 bit

since i am using the final release of 10.04 (clean install) no last.fm userdata will be saved :(

authorization of the last.fm account works fine, but after continuing by clicking OK nothing is saved
Comment 1 Sven Krohlas 2010-05-01 09:21:01 UTC
Is that still a problem in 2.3.1 beta 1?
Comment 2 esstmehrtiere 2010-05-01 16:35:30 UTC
Am 01.05.2010 09:21, schrieb Sven Krohlas:
> https://bugs.kde.org/show_bug.cgi?id=235861
>
>
> Sven Krohlas<sven@asbest-online.de>  changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |kde@dontletsstart.com,
>                     |                            |lfranchi@kde.org,
>                     |                            |parallelgrapefruit@gmail.co
>                     |                            |m
>            Component|general                     |Services/Last.fm
>
>
>
>
> --- Comment #1 from Sven Krohlas<sven asbest-online de>   2010-05-01 09:21:01 ---
> Is that still a problem in 2.3.1 beta 1?
>
>    
japp, auch noch in der 2.3.1 beta 1 version werden last.fm name und 
passwort nicht gespeichert.
Comment 3 Sven Krohlas 2010-05-02 11:29:05 UTC
English, please. ;-)
Comment 4 esstmehrtiere 2010-05-02 13:14:29 UTC
Am 02.05.2010 11:29, schrieb Sven Krohlas:
> https://bugs.kde.org/show_bug.cgi?id=235861
>
>
> Sven Krohlas<sven@asbest-online.de>  changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Version|2.3.0                       |2.3.0.90
>
>
>
>
> --- Comment #3 from Sven Krohlas<sven asbest-online de>   2010-05-02 11:29:05 ---
> English, please. ;-)
>
>    
ok, it still doesn't work in version 2.3.0.90 ;)
Comment 5 Sven Krohlas 2010-05-25 14:29:34 UTC
*** Bug 237693 has been marked as a duplicate of this bug. ***
Comment 6 Casey Link 2010-05-29 02:01:02 UTC
commit 021e38aeb66ff162b892cd66ac0bee6d75891df6
Author: Casey Link <unnamedrambler@gmail.com>
Date:   Fri May 28 17:53:12 2010 -0500

    Ensure last.fm settings are written to disk when saving. This hopefully
    will fix the issue of the last.fm service not working without KWallet.
    
    CCBUG: 235861

diff --git a/src/services/lastfm/LastFmServiceConfig.cpp b/src/services/lastfm/LastFmServiceConfig.cpp
index c5dec70..67147d4 100644
--- a/src/services/lastfm/LastFmServiceConfig.cpp
+++ b/src/services/lastfm/LastFmServiceConfig.cpp
@@ -119,6 +119,7 @@ void LastFmServiceConfig::save()
     {
         debug() << "Could not access the wallet to save the last.fm credentials";
     }
+    config.sync();
 }
 
 void
Comment 7 Eelko Berkenpies 2010-06-11 22:56:15 UTC
I'm afraid this is still broken in recent GIT. I did a clean build and a clean install a few hours ago (a2d1a78) and I am experiencing the exact same problem.
Comment 8 Myriam Schweingruber 2010-06-12 11:58:13 UTC
Setting to confirmed.
Comment 9 Thorsten Mühlfelder 2010-07-13 23:51:29 UTC
Had the same problem with today's git version after I've removed the amarok settings files.

And I guess the MySQL settings (username/password) have the same problem.
Comment 10 Myriam Schweingruber 2010-08-01 00:53:16 UTC
*** Bug 246372 has been marked as a duplicate of this bug. ***
Comment 11 erik_hahn 2010-08-26 18:56:19 UTC
Still a problem in Amarok 2.3.2 (Ubuntu)
Comment 12 Myriam Schweingruber 2010-08-26 20:51:50 UTC
(In reply to comment #11)
> Still a problem in Amarok 2.3.2 (Ubuntu)

Impossible, Amarok 2.3.2 is not released, you either have 2.3.1 or 2.3.2 beta (aka 2.3.1.90)
Comment 13 erik_hahn 2010-08-27 20:00:02 UTC
It's 2.3.1.
Comment 14 alver 2010-08-28 05:34:25 UTC
Probably not surprising: Problem also appears in osx10.6.4, amarok2.3.1, kde4.4.5 from macports.
Comment 15 Mark Kretschmann 2010-09-04 15:02:44 UTC
*** Bug 236243 has been marked as a duplicate of this bug. ***
Comment 16 Mark Kretschmann 2010-09-04 15:43:11 UTC
commit 0a7a673fe2b1dfda7489b19e4f792a2359e81e62
Author: Mark Kretschmann <kretschmann@kde.org>
Date:   Sat Sep 4 15:37:07 2010 +0200

    Make the Last.fm service work without KWallet.
    
    This was broken because the wrong signals were used in the confirmation dialog.
    
    BUG: 235861

diff --git a/ChangeLog b/ChangeLog
index 2c95b9a..39f132d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@ VERSION 2.3.2
     * Use system date/time format for default name when saving user playlists.
 
   BUGFIXES:
+    * The Last.fm service did not work without KWallet. (BR 235861)
     * Show actual KDE version in the "About Amarok" dialog, instead of the
       version used at compile time.
     * Fixed a crash when trying to save a playlist to a file where the format
diff --git a/src/services/lastfm/LastFmServiceConfig.cpp b/src/services/lastfm/LastFmServiceConfig.cpp
index 6847a33..6ac3ff6 100644
--- a/src/services/lastfm/LastFmServiceConfig.cpp
+++ b/src/services/lastfm/LastFmServiceConfig.cpp
@@ -50,6 +50,8 @@ LastFmServiceConfig::LastFmServiceConfig()
 
 LastFmServiceConfig::~LastFmServiceConfig()
 {
+    DEBUG_BLOCK
+
     if( m_askDiag )
         m_askDiag->deleteLater();
     if( m_wallet )
@@ -141,8 +143,8 @@ LastFmServiceConfig::askAboutMissingKWallet()
         m_askDiag->setButtons( KDialog::Yes | KDialog::No );
         m_askDiag->setModal( true );
 
-        connect( m_askDiag, SIGNAL( okClicked() ), this, SLOT( textDialogOK() ) );
-        connect( m_askDiag, SIGNAL( cancelClicked() ), this, SLOT( textDialogCancel() ) );
+        connect( m_askDiag, SIGNAL( yesClicked() ), this, SLOT( textDialogYes() ) );
+        connect( m_askDiag, SIGNAL( noClicked() ), this, SLOT( textDialogNo() ) );
     }
     m_askDiag->exec();
 }
@@ -161,8 +163,10 @@ LastFmServiceConfig::reset()
 
 
 void
-LastFmServiceConfig::textDialogOK()
+LastFmServiceConfig::textDialogYes() //SLOT
 {
+    DEBUG_BLOCK
+
     KConfigGroup config = KGlobal::config()->group( configSectionName() );
     config.writeEntry( "ignoreWallet", "yes" );
     config.sync();
@@ -170,8 +174,10 @@ LastFmServiceConfig::textDialogOK()
 
 
 void
-LastFmServiceConfig::textDialogCancel()
+LastFmServiceConfig::textDialogNo() //SLOT
 {
+    DEBUG_BLOCK
+
     KConfigGroup config = KGlobal::config()->group( configSectionName() );
     config.writeEntry( "ignoreWallet", "no" );
     config.sync();
diff --git a/src/services/lastfm/LastFmServiceConfig.h b/src/services/lastfm/LastFmServiceConfig.h
index 642410e..99b46c2 100644
--- a/src/services/lastfm/LastFmServiceConfig.h
+++ b/src/services/lastfm/LastFmServiceConfig.h
@@ -57,8 +57,8 @@ public:
     void setFetchSimilar( bool fetchSimilar ) { m_fetchSimilar = fetchSimilar; }
 
 private slots:
-    void textDialogOK();
-    void textDialogCancel();
+    void textDialogYes();
+    void textDialogNo();
 
 private:
     void askAboutMissingKWallet();