Review Request: Update KCM account list on external account removal.

Florian Reinhard florian.reinhard at googlemail.com
Wed Mar 2 09:57:39 CET 2011



> On March 2, 2011, 12:54 a.m., David Edmundson wrote:
> > That looked simple :-)
> > 
> > Does it work when you remove an account "normally" through the accounts KCM?
> > The way I read this it will call onAccountRemoved and then emit removed(), but the Tp::Account will also be emitting removed anyway, which means account-item will emit removed()
> > (if that makes sense)
> > Because of this I think remove() will get emitted twice.
> > 
> > Try taking out line 167 of account-item.cpp and it should all behave nicely.

Well spotted!

Removing an account via the kcmshell4 looks like it should on commanline:

09:38:13 kcmshell(11417) KCMTelepathyAccounts::onRemoveAccountClicked:
09:38:14 kcmshell(11417) AccountsListModel::removeAccount:
09:38:14 kcmshell(11417) AccountItem::remove: Account about to be removed
09:38:15 kcmshell(11417) AccountsListModel::onAccountItemRemoved:
09:38:15 kcmshell(11417) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
09:38:15 kcmshell(11417) AccountItem::~AccountItem:

with a removed Q_EMIT removed(); in onAccountRemoved it looks like this:

09:48:47 kcmshell(12432) KCMTelepathyAccounts::onRemoveAccountClicked:
09:48:48 kcmshell(12432) AccountsListModel::removeAccount:
09:48:48 kcmshell(12432) AccountItem::remove: Account about to be removed
09:48:49 kcmshell(12432) AccountsListModel::onAccountItemRemoved:
09:48:49 kcmshell(12432) KWidgetItemDelegateEventListener::eventFilter: User of KWidgetItemDelegate should not delete widgets created by createItemWidgets! 
09:48:49 kcmshell(12432) AccountItem::~AccountItem:

looks pretty much the same to me, that's why i didn't bother. but emitting the signal twice isn't a good practice so i guess it should be removed.


- Florian


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


On March 1, 2011, 9:21 p.m., Florian Reinhard wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100777/
> -----------------------------------------------------------
> 
> (Updated March 1, 2011, 9:21 p.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Summary
> -------
> 
> Remove an account from the list as it gets removed by some other app like empathy.
> 
> 
> Diffs
> -----
> 
>   src/account-item.cpp 20709790b89bc79780371b7823462d00815db05c 
> 
> Diff: http://git.reviewboard.kde.org/r/100777/diff
> 
> 
> Testing
> -------
> 
> * open the kcm module and empathy
> * remove an account in empathy and see it being deleted from the kcm
> 
> 
> Thanks,
> 
> Florian
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-telepathy/attachments/20110302/fe822309/attachment.htm 


More information about the KDE-Telepathy mailing list