~ci-train-bot/history-service/history-service-ubuntu-zesty-2629

« back to all changes in this revision

Viewing changes to src/event.cpp

Request contact information for all known participants on history-daemon initialization, and use this cached information on the models.
Approved by: Tiago Salem Herrmann, PS Jenkins bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
                                       const QString &theEventId,
37
37
                                       const QString &theSenderId,
38
38
                                       const QDateTime &theTimestamp,
39
 
                                       bool theNewEvent, const QStringList &theParticipants) :
 
39
                                       bool theNewEvent,
 
40
                                       const Participants &theParticipants) :
40
41
    accountId(theAccountId), threadId(theThreadId), eventId(theEventId),
41
 
    senderId(theSenderId), timestamp(theTimestamp), newEvent(theNewEvent), participants(theParticipants)
 
42
    senderId(theSenderId), timestamp(theTimestamp), newEvent(theNewEvent),
 
43
    participants(theParticipants)
42
44
{
43
45
}
44
46
 
58
60
    map[FieldDate] = timestamp.date().toString(Qt::ISODate);
59
61
    map[FieldNewEvent] = newEvent;
60
62
    map[FieldType] = type();
61
 
    map[FieldParticipants] = participants;
 
63
    map[FieldParticipants] = participants.toVariantList();
62
64
 
63
65
    return map;
64
66
}
198
200
    return d->type();
199
201
}
200
202
 
201
 
QStringList Event::participants() const
 
203
Participants Event::participants() const
202
204
{
203
205
    Q_D(const Event);
204
206
    return d->participants;