Review Request: Removed accounts not updated in Nepomuk
Daniele E. Domenichelli
daniele.domenichelli at gmail.com
Tue Apr 27 14:57:18 CEST 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3784/#review5255
-----------------------------------------------------------
I have some issues before uploading a new patch and I would like to know your opinions...
/trunk/playground/network/telepathy-integration-daemon/telepathyaccountmonitor.cpp
<http://reviewboard.kde.org/r/3784/#comment4749>
This queries returns all IMAccount that the "me" PersonContact has.
Actually also all contacts of removed accounts and removed contacts are not updated and status will always be the last status.
So I believe that a better query could be:
QString query = QString("select distinct ?a where { ?a a %1 }") .arg(Soprano::Node::resourceToN3(Nepomuk::Vocabulary::NCO::IMAccount()));
to unset the status for all contacts before creating accounts
/trunk/playground/network/telepathy-integration-daemon/telepathyaccountmonitor.cpp
<http://reviewboard.kde.org/r/3784/#comment4750>
I'm not sure if imStatusMessage should be cleaned, maybe it should represent last status when the user was online...
/trunk/playground/network/telepathy-integration-daemon/telepathyaccountmonitor.cpp
<http://reviewboard.kde.org/r/3784/#comment4752>
Pointer should be saved, to be able to call delete later (see below)
Probably something like this is needed:
(in .h)
QHash<QString, TelepathyAccount*> m_accounts;
(here)
m_accounts.insert(path, new TelepathyAccount(path, this));
/trunk/playground/network/telepathy-integration-daemon/telepathyaccountmonitor.cpp
<http://reviewboard.kde.org/r/3784/#comment4751>
This function should probably just call TelepathyAccount::~TelepathyAccount instead of doing all this stuff.
All this can be done by the destructor.
Also all contacts in the buddy list for removed account should be unset by TelepathyAccount destructor.
/trunk/playground/network/telepathy-integration-daemon/telepathyaccountmonitor.cpp
<http://reviewboard.kde.org/r/3784/#comment4748>
This is the bug! I don't know why this is here, probably I dragged and dropped it by accident...
it should be inside while block...
- Daniele E.
On 2010-04-23 11:13:26, Daniele E. Domenichelli wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/3784/
> -----------------------------------------------------------
>
> (Updated 2010-04-23 11:13:26)
>
>
> Review request for telepathy and George Goldberg.
>
>
> Summary
> -------
>
> When an account is removed from telepathy-mission-control, Nepomuk data is not updated.
> This means that, for example, if last status for a removed account was online, querying Nepomuk will always return that account among other existing accounts and will always affirm that removed account is online.
>
> This patch sets statusType property to Tp::ConnectionPresenceTypeUnset in Nepomuk before creating accounts. Later, statusType is updated only for existing accounts, not for removed ones.
> Also adds "onAccountRemoved" slot that resets statusType to Tp::ConnectionPresenceTypeUnset when account is removed.
>
>
> Diffs
> -----
>
> /trunk/playground/network/telepathy-integration-daemon/telepathyaccountmonitor.h 1116405
> /trunk/playground/network/telepathy-integration-daemon/telepathyaccountmonitor.cpp 1116405
>
> Diff: http://reviewboard.kde.org/r/3784/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> Daniele E.
>
>
More information about the KDE-Telepathy
mailing list