Skip to content
Snippets Groups Projects
Commit 12554b38 authored by Emmanuel Lepage's avatar Emmanuel Lepage
Browse files

Port history to the new syntax

parent 3b188835
No related branches found
No related tags found
Loading
...@@ -73,20 +73,31 @@ template<typename CallWidget, typename Index> bool CallModel<CallWidget,Index>:: ...@@ -73,20 +73,31 @@ template<typename CallWidget, typename Index> bool CallModel<CallWidget,Index>::
if (!historyInit) { if (!historyInit) {
ConfigurationManagerInterface& configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); ConfigurationManagerInterface& configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
QStringList historyMap = configurationManager.getHistory().value(); QStringList historyMap = configurationManager.getHistory().value();
qDebug() << "Call History = " << historyMap; qDebug() << "\n\n\n\n\n\n\n\nCall History = " << historyMap<<"\n\n\n\n\n\n";
// QMapIterator<QString, QString> i(historyMap); foreach (QString historyCallId, historyMap) {
// while (i.hasNext()) { QStringList param = historyCallId.split("|");
// i.next(); if (param.count() < 10) {
// uint startTimeStamp = i.key().toUInt(); //If this ever change, look at the gnome client
// QStringList param = i.value().split("|"); QString history_state = param[0];
QString peer_number = param[1];
QString peer_name = param[2];
QString time_start = param[3];
QString time_stop = param[4];
QString callID = param[5];
QString accountID = param[6];
QString recordfile = param[7];
QString confID = param[8];
QString time_added = param[9];
historyCalls[time_start] = Call::buildHistoryCall(callID, time_start.toUInt(), time_stop.toUInt(), accountID, peer_name, peer_number, history_state);
addCall(historyCalls[time_start]);
}
// QString type2 = param[0]; // QString type2 = param[0];
// QString number = param[1]; // QString number = param[1];
// QString name = param[2]; // QString name = param[2];
// uint stopTimeStamp = param[3].toUInt(); // uint stopTimeStamp = param[3].toUInt();
// QString account = param[4]; // QString account = param[4];
// historyCalls[QString::number(startTimeStamp)] = Call::buildHistoryCall(generateCallId(), startTimeStamp, stopTimeStamp, account, name, number, type2); }
// addCall(historyCalls[QString::number(startTimeStamp)]);
// }
} }
historyInit = true; historyInit = true;
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment