~ci-train-bot/history-service/history-service-ubuntu-yakkety-landing-052

« back to all changes in this revision

Viewing changes to src/voiceevent.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:
1
1
/*
2
 
 * Copyright (C) 2013 Canonical, Ltd.
 
2
 * Copyright (C) 2013-2015 Canonical, Ltd.
3
3
 *
4
4
 * Authors:
5
5
 *  Gustavo Pichorim Boiko <gustavo.boiko@canonical.com>
40
40
                                   bool theMissed,
41
41
                                   const QTime &theDuration,
42
42
                                   const QString &theRemoteParticipant,
43
 
                                   const QStringList &theParticipants)
 
43
                                   const Participants &theParticipants)
44
44
    : EventPrivate(theAccountId, theThreadId, theEventId, theSender, theTimestamp, theNewEvent, theParticipants),
45
45
      missed(theMissed), duration(theDuration), remoteParticipant(theRemoteParticipant)
46
46
{
86
86
                     bool missed,
87
87
                     const QTime &duration,
88
88
                     const QString &remoteParticipant,
89
 
                     const QStringList &participants)
 
89
                     const Participants &participants)
90
90
    : Event(*new VoiceEventPrivate(accountId, threadId, eventId, sender, timestamp, newEvent, missed, duration, remoteParticipant, participants))
91
91
{
92
92
}
125
125
    QString senderId = properties[FieldSenderId].toString();
126
126
    QDateTime timestamp = QDateTime::fromString(properties[FieldTimestamp].toString(), Qt::ISODate);
127
127
    bool newEvent = properties[FieldNewEvent].toBool();
128
 
    QStringList participants = properties[FieldParticipants].toStringList();
 
128
    Participants participants = Participants::fromVariant(properties[FieldParticipants]);
129
129
    bool missed = properties[FieldMissed].toBool();
130
130
    QTime duration = QTime(0,0,0).addSecs(properties[FieldDuration].toInt());
131
131
    QString remoteParticipant = properties[FieldRemoteParticipant].toString();