Review Request 112739: [logviewer] Open logs for contact/person passed via command line arguments

Dan Vrátil dvratil at redhat.com
Sun Sep 15 14:41:48 UTC 2013



> On Sept. 15, 2013, 4:26 p.m., David Edmundson wrote:
> > I'm confused. This seems to contain some other unrelated changes. 
> > Could you explain them?

The change in PersonEntityMergeModel is that the model now emits rowsInserted() signal for every new row, instead of one huge modelReset() signal. This allows the EntityView class to check whether the newly added row matches the arguments passed via command line. With modelReset() it would have to iterate over the entire model, which is slightly more complicated because the model can have different structure depending on whether KPeople is enabled or not.

The change in EntityView is to support matching contacts/persons by their Nepomuk URI passed via command line (as you can see it happens in rowsInserted() method - the original bug you reported was caused by the fact that the PersonEntityMergeModel did not emit rowsInserted() signal but modelReset())

The change in EntityFilterModel is so that the model does not filter out empty personas. This is because when the filter model received rowsInserted() signal from the source model (the Merge model) and the newly inserted row is a Person, it does not have yet any subcontacts to match, so the code would hide the row, even though subcontacts would be added later.

The change in DatesModel is so that the model emits datesReceived() signal when dates for all subcontacts (in case you select a person) are received.

LogViewer::slotMergeModelInitialized() is called, when the Merge model is fully loaded. In case EntityView::rowsInserted() has selected a person (because user has passed it's Nepomuk URI via command line args), we will now call onEntityListClicked() - emulating a user click on a person in the entity view. We can't call onEntityListClicked() directly from the EntityView, because when we match the person, it still does not have all subcontacts populated, and if you look int onEntityListClicked() you can see that in case of person we are iterating over all it's subcontacts, to received all log dates for that person.

LogViewer::onDatesReceived() is connected to the datesReceived() signal added in DatesModel and it will automatically select the first date in the model. This means that when you click on a person or a contact, the logviewer will automatically open the latest log. This is necessary so that when you pass a contact/person via command line, a log is opened after we fetch all the dates. It also restores behavior of the old logviewer, which did the same after selecting an entity.


- Dan


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


On Sept. 15, 2013, 3:21 p.m., Dan Vrátil wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112739/
> -----------------------------------------------------------
> 
> (Updated Sept. 15, 2013, 3:21 p.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Description
> -------
> 
> Fixes opening of a contact (when account ID and contact ID are passed via cmd line) and add support for opening a person/contact when a Nepomuk URI is passed via cmd line
> 
> 
> This addresses bug 324918.
>     http://bugs.kde.org/show_bug.cgi?id=324918
> 
> 
> Diffs
> -----
> 
>   logviewer/dates-model.h 14d2eae 
>   logviewer/dates-model.cpp 195765f 
>   logviewer/entity-filter-model.cpp 356e3d6 
>   logviewer/entity-view.h 18bf9d5 
>   logviewer/entity-view.cpp 77fefc0 
>   logviewer/log-viewer.h b3a53f0 
>   logviewer/log-viewer.cpp 8b2e779 
>   logviewer/person-entity-merge-model.h c07e066 
>   logviewer/person-entity-merge-model.cpp 0fcff92 
> 
> Diff: http://git.reviewboard.kde.org/r/112739/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Dan Vrátil
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20130915/7b10556a/attachment-0001.html>


More information about the KDE-Telepathy mailing list