Review Request: Avoid calling KWallet::openWallet several times

Daniele Elmo Domenichelli daniele.domenichelli at gmail.com
Fri Nov 23 11:00:33 UTC 2012



> On Nov. 23, 2012, 3:09 a.m., David Edmundson wrote:
> > How many problems has that Wallet caused?!
> > 
> > Whilst I'm happy this patch is in. This has now turned into a right mess that needs fixing in master. PendingWallet still watches the wallet itself for being open. This should be changed to instead follow the KTp::WalletInterface.

The KTp::Wallet interface is a K_GLOBAL_STATIC, so if you want to make it emit a signal we have to make it a QObject and therefore change it not to be a K_GLOBAL_STATIC.
Perhaps we could make the private class a K_GLOBAL_STATIC instead...


- Daniele Elmo


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107426/#review22408
-----------------------------------------------------------


On Nov. 22, 2012, 9:27 p.m., Daniele Elmo Domenichelli wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107426/
> -----------------------------------------------------------
> 
> (Updated Nov. 22, 2012, 9:27 p.m.)
> 
> 
> Review request for Telepathy and David Edmundson.
> 
> 
> Description
> -------
> 
> In order to avoid the problem when kwallet is closed while kcm accounts is open, we introduced a bug: if more than one openWallet call is done at the same time, we reset the scoped pointer with a new wallet, the old wallet is deleted and therefore the signal is never emitted.
> This patch uses a QMutex to avoid trying the wallet several times if it is already being opened.
> In order to catch the signal from the KWallet, I needed a QObject, and since the KTp::WalletInterface is using K_GLOBAL_STATIC, I used the private class instead.
> 
> 
> This addresses bug 310505.
>     http://bugs.kde.org/show_bug.cgi?id=310505
> 
> 
> Diffs
> -----
> 
>   KTp/wallet-interface.cpp 428c02e48365c09fb579a26a73ec01efac029864 
> 
> Diff: http://git.reviewboard.kde.org/r/107426/diff/
> 
> 
> Testing
> -------
> 
> Disconnected all accounts, closed the wallet and reconnected all accounts several times (accepting and canceling the kwallet dialog)
> 
> Tried to randomly connect/disconnect accounts from kcm while randomly close kwallet and accepting/cancelling kwallet dialog.
> 
> 
> Thanks,
> 
> Daniele Elmo Domenichelli
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20121123/eba858e8/attachment.html>


More information about the KDE-Telepathy mailing list