PDA

View Full Version : Container's removing item problem.



zgulser
23rd July 2012, 11:53
Hi,



cs_manager->getUnansweredCalls().clear();


does not clear the list(unanswered calls).

But, the following clears the temp_list;



QList<CallSession*> temp_list = cs_manager->getUnansweredCalls();
temp_list .clear();



Any ideas?

amleto
23rd July 2012, 12:30
please check what getUnansweredCalls() returns (I'll bet it is a copy).

Since you did not show complete code it is impossible to say. Next time, please show complete compilable code.

zgulser
23rd July 2012, 12:36
Thanks for your quicky response.

I've found my error and it's very code specific. Thanks again.