D12837: Split replaceAccount from addAccountToCache
Valeriy Malov
noreply at phabricator.kde.org
Tue May 15 13:13:53 UTC 2018
valeriymalov added inline comments.
INLINE COMMENTS
> davidedmundson wrote in accountmodel.cpp:361
> On second look, I might have misunderstood.
>
> This isn't a replace, it's just making sure the current user is at the top?
Yes. Replace code was added to `addAccountToCache` at some point because of the "modify new user entry" logic (line 434 in the original), which broke `addAccountToCache` here. This patch moves the replace code out to `replaceAccount` so `addAccountToCache` does what the name says again.
In fact `replaceAccount` technically adds a user too but does it by replacing fake user entry ("+ Add new user" in the list) with it 😕 This whole bit might be worth refactoring to kick fake user entry out of model containers & add tests, but I don't think I'll be able to do it this week.
REPOSITORY
R128 User Manager
REVISION DETAIL
https://phabricator.kde.org/D12837
To: valeriymalov, #plasma, davidedmundson
Cc: davidedmundson, ngraham, rdieter, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180515/51d19d37/attachment.html>
More information about the Plasma-devel
mailing list