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

Restore and improve support for Call history

parent 12554b38
No related branches found
No related tags found
No related merge requests found
...@@ -91,7 +91,8 @@ class LIB_EXPORT CallModel { ...@@ -91,7 +91,8 @@ class LIB_EXPORT CallModel {
void removeConference(Call* call); void removeConference(Call* call);
void removeCall(Call* call); void removeCall(Call* call);
QStringList getHistory(); const QHash<QString, Call*> getHistory();
QStringList getHistoryCallId();
//Account related members //Account related members
static Account* getCurrentAccount(); static Account* getCurrentAccount();
......
...@@ -73,10 +73,11 @@ template<typename CallWidget, typename Index> bool CallModel<CallWidget,Index>:: ...@@ -73,10 +73,11 @@ 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() << "\n\n\n\n\n\n\n\nCall History = " << historyMap<<"\n\n\n\n\n\n"; qDebug() << "\n\n\n\n\n\n\n\nCall History = " ;
foreach (QString historyCallId, historyMap) { foreach (QString historyCallId, historyMap) {
QStringList param = historyCallId.split("|"); QStringList param = historyCallId.split("|");
if (param.count() < 10) { qDebug() << "Param count" << param.size();
if (param.count() <= 10) {
//If this ever change, look at the gnome client //If this ever change, look at the gnome client
QString history_state = param[0]; QString history_state = param[0];
QString peer_number = param[1]; QString peer_number = param[1];
...@@ -344,7 +345,7 @@ template<typename CallWidget, typename Index> void CallModel<CallWidget,Index>:: ...@@ -344,7 +345,7 @@ template<typename CallWidget, typename Index> void CallModel<CallWidget,Index>::
****************************************************************************/ ****************************************************************************/
///Return a list of all previous calls ///Return a list of all previous calls
template<typename CallWidget, typename Index> QStringList CallModel<CallWidget,Index>::getHistory() template<typename CallWidget, typename Index> QStringList CallModel<CallWidget,Index>::getHistoryCallId()
{ {
QStringList toReturn; QStringList toReturn;
foreach(Call* call, historyCalls) { foreach(Call* call, historyCalls) {
...@@ -353,6 +354,11 @@ template<typename CallWidget, typename Index> QStringList CallModel<CallWidget,I ...@@ -353,6 +354,11 @@ template<typename CallWidget, typename Index> QStringList CallModel<CallWidget,I
return toReturn; return toReturn;
} }
template<typename CallWidget, typename Index> const QHash<QString, Call*> CallModel<CallWidget,Index>::getHistory()
{
return historyCalls;
}
/***************************************************************************** /*****************************************************************************
* * * *
* Account related code * * Account related code *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment