Review Request 114643: Set accountUniqueIdentifier on contacts

David Edmundson david at davidedmundson.co.uk
Fri Dec 27 16:39:37 UTC 2013



> On Dec. 27, 2013, 3:41 p.m., Dan Vrátil wrote:
> > KTp/contact.cpp, line 50
> > <https://git.reviewboard.kde.org/r/114643/diff/1/?file=227058#file227058line50>
> >
> >     Shouldn't you call manager->connection()->property("accountUID") every time from here?
> >     
> >     Otherwise this value will not get updated, when the value of the property changes in KTp::Account::onConnectionChanged().
> >     
> >     Alternatively, you could listen to a signal in KTp::Contact and update the cached string.

No for two reasons:
Contact only has a WeakPtr to manager(), go offline and that will be null.
Secondly if the connection changes all previous ContactPtr objects are basically useless. You need to get new (active) contact objects from the new connection.
In any case the account will always be the same anyway.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/114643/#review46190
-----------------------------------------------------------


On Dec. 24, 2013, 12:01 p.m., David Edmundson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/114643/
> -----------------------------------------------------------
> 
> (Updated Dec. 24, 2013, 12:01 p.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Repository: ktp-common-internals
> 
> 
> Description
> -------
> 
> Set accountUniqueIdentifier on contacts
> 
> Tp::Connection has no method to get the holding Tp::AccountPtr
> 
> This makes it difficult to work out which account a contact belongs to.
> This can't be fixed in TpQt in 0.9.x
> 
> Instead create a KTp::Account which sets a property on connection
> whenever the connection chanages.
> 
> This is exposed from KTp::Contact
> 
> 
> Diffs
> -----
> 
>   KTp/CMakeLists.txt 29ee1ab 
>   KTp/account-factory.cpp PRE-CREATION 
>   KTp/account-factory_p.h PRE-CREATION 
>   KTp/contact.h f33a762 
>   KTp/contact.cpp 52a4f58 
>   KTp/core.cpp a221e68 
> 
> Diff: https://git.reviewboard.kde.org/r/114643/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> David Edmundson
> 
>

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


More information about the KDE-Telepathy mailing list