Version: 2.5.0 (using KDE 4.7.4)
When wallet is not open yet (no other app is using wallet), and Amarok is started, the wallet is closed immediately after giving the KWallet password that last.fm plugin needs. This does not happen with, e.g., Kopete.
KWallet is in "close when last application stops using it"-mode.
Steps to Reproduce:
1. Enable Last.fm plugin from Amarok settings, use KWallet for storing password.
2. Close Amarok
3. Close KWallet from system tray (check in system tray settings that KWallet is in "auto" mode, in "Entries" section)
4. Start Amarok, a KWallet password is requested
5. Enter password.
Open wallet icon is displayed for a second and then gets hidden as KWallet is closed.
Wallet stays open (and "open mode" icon is shown)
Note that if Kopete is running before starting Amarok (step 4.) and KWallet is open due to that, then the wallet is not closed.
So the invalid wallet handling is reproduced if the Last.fm plugin is accessing a closed wallet.
Git commit d9a72268a5cfe5f53d84f8fd57c5f8611f54fd76 by Matěj Laitl.
Committed on 12/12/2012 at 23:31.
Pushed by laitl into branch 'master'.
Last.fm plugin: major rework of configuration and more
This work started as an attempt to fix bug 306134. I figured out that
the synchronous KWallet API is simply dangerous, and the async one must
be used. But that meant to make LastFmServiceConfig a "living" object
with updated() signal, which triggered refactoring of all its usage.
Users of LastFmServiceConfig now watch for its changes and should act
appropriately. The LastFmServiceConfig now has only one instance shared
between LastFmService and LastFmServiceSettings - I had to introduce
another shared library because KCM modules use separate library, silly.
Moreover, some extremely ugly things in Last.fm plugin got reworked to
me clean and maintainable, reducing code duplication.
Patrick, please tests whether this still builds on Windows, I hope I've
done KDE_EXPORT/KDE_IMPORT right, but I cannot test under Linux.
* When configuring Last.fm plug-in, the changes are now applied
immediately in most places.
* Fix suboptimal KWallet usage in Last.fm plugin.
* Fix crash in Last.fm plugin caused by sloppy KWallet usage.
Related: bug 311331, bug 306134
DIGEST: Last.fm plugin configuration reworked for smoother experience
CCMAIL: Patrick von Reth <firstname.lastname@example.org>
M +4 -0 ChangeLog
M +15 -2 src/services/lastfm/CMakeLists.txt
M +166 -147 src/services/lastfm/LastFmService.cpp
M +9 -5 src/services/lastfm/LastFmService.h
M +5 -7 src/services/lastfm/LastFmServiceCollection.cpp
M +1 -2 src/services/lastfm/LastFmServiceCollection.h
M +160 -110 src/services/lastfm/LastFmServiceConfig.cpp
M +50 -24 src/services/lastfm/LastFmServiceConfig.h
M +37 -41 src/services/lastfm/LastFmServiceSettings.cpp
M +3 -1 src/services/lastfm/LastFmServiceSettings.h
M +4 -4 src/services/lastfm/LastFmTreeModel.cpp
M +1 -2 src/services/lastfm/LastFmTreeModel.h
M +3 -4 src/services/lastfm/ScrobblerAdapter.cpp
M +3 -2 src/services/lastfm/ScrobblerAdapter.h
M +5 -6 src/services/lastfm/SynchronizationAdapter.cpp
M +3 -2 src/services/lastfm/SynchronizationAdapter.h
C +16 -35 src/services/lastfm/amarok_lastfm_shared_export.h [from: src/services/lastfm/LastFmServiceSettings.h - 058% similarity]
M +0 -9 src/services/lastfm/meta/LastFmMeta.cpp
M +1 -1 src/services/lastfm/meta/LastFmMeta.h