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

Remove dead code

parent 9de176ab
Branches
Tags
No related merge requests found
...@@ -19,18 +19,3 @@ ...@@ -19,18 +19,3 @@
***************************************************************************/ ***************************************************************************/
#include <CallModel.h> #include <CallModel.h>
//template<> QString CallModel<InternalCallModelStruct>::priorAccountId;
//template<> AccountList* CallModel<InternalCallModelStruct>::accountList;
//template<> bool CallModel<InternalCallModelStruct>::instanceInit(false);
//template<> bool CallModel<InternalCallModelStruct>::callInit(false);
//template<> bool CallModel<InternalCallModelStruct>::historyInit(false);
//template<> QHash<QString, Call*> CallModel<InternalCallModelStruct>::activeCalls;
//template<> QHash<QString, Call*> CallModel<InternalCallModelStruct>::historyCalls;
//template<> QHash<Call*, InternalCallModelStruct*> CallModel<InternalCallModelStruct>::privateCallList_call;
//template<> QHash<QString, InternalCallModelStruct*> CallModel<InternalCallModelStruct>::privateCallList_callId;
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/ **************************************************************************/
#ifndef CALL_MODEL_H #ifndef CALL_MODEL_H
#define CALL_MODEL_H #define CALL_MODEL_H
...@@ -44,20 +44,6 @@ ...@@ -44,20 +44,6 @@
* @note This model intend to be reimplemented by the view, not used alone * @note This model intend to be reimplemented by the view, not used alone
* @note Most of the member are static to preserve ressources and QObject::connect() * @note Most of the member are static to preserve ressources and QObject::connect()
*/ */
// template <typename T, typename Index> class CallModel;
// template <typename Widget, typename Index> class InternalCallModelStruct : public QModelIndex {
//
// friend class CallModel<Widget,Index>;
// //InternalCallModelStruct* parent;
// Widget* call;
// Call* call_real;
// Index* treeItem; //For the view
// QList<InternalCallModelStruct*> children; //For the view
// bool conference;
// };
template <typename CallWidget, typename Index> template <typename CallWidget, typename Index>
class LIB_EXPORT CallModel { class LIB_EXPORT CallModel {
//Q_OBJECT //Q_OBJECT
...@@ -71,6 +57,9 @@ class LIB_EXPORT CallModel { ...@@ -71,6 +57,9 @@ class LIB_EXPORT CallModel {
CallModel(ModelType type); CallModel(ModelType type);
virtual ~CallModel() {} virtual ~CallModel() {}
virtual bool initCall();
virtual bool initHistory();
virtual Call* addCall(Call* call, Call* parent =0); virtual Call* addCall(Call* call, Call* parent =0);
int size(); int size();
Call* findCallByCallId(QString callId); Call* findCallByCallId(QString callId);
...@@ -154,11 +143,7 @@ class LIB_EXPORT CallModel { ...@@ -154,11 +143,7 @@ class LIB_EXPORT CallModel {
typedef QHash<Index, InternalCallModelStruct*> InternalIndex; typedef QHash<Index, InternalCallModelStruct*> InternalIndex;
static QHash<QString, Call*> activeCalls; static QHash<QString, Call*> activeCalls;
static QHash<QString, Call*> historyCalls;/* static QHash<QString, Call*> historyCalls;
static QHash<Call*, InternalCallModelStruct<T, Index>* > privateCallList_call;
static QHash<QString, InternalCallModelStruct<T, Index>* > privateCallList_callId;
static QHash<T, InternalCallModelStruct<T, Index>* > privateCallList_widget;
static QHash<Index, InternalCallModelStruct<T, Index>* > privateCallList_index;*/
static InternalCall privateCallList_call; static InternalCall privateCallList_call;
static InternalCallId privateCallList_callId; static InternalCallId privateCallList_callId;
...@@ -170,8 +155,6 @@ class LIB_EXPORT CallModel { ...@@ -170,8 +155,6 @@ class LIB_EXPORT CallModel {
static AccountList* accountList; static AccountList* accountList;
static bool callInit; static bool callInit;
static bool historyInit; static bool historyInit;
virtual bool initCall();
virtual bool initHistory();
private: private:
static bool instanceInit; static bool instanceInit;
......
...@@ -67,11 +67,12 @@ template<typename CallWidget, typename Index> bool CallModel<CallWidget,Index>:: ...@@ -67,11 +67,12 @@ template<typename CallWidget, typename Index> bool CallModel<CallWidget,Index>::
//Fill the history list //Fill the history list
//@warning This solution wont scale to multiple call or history model implementation. Some static addCall + foreach for each call would be needed if this case ever become unavoidable //@warning This solution wont scale to multiple call or history model implementation. Some static addCall + foreach for each call would be needed if this case ever become unavoidable
template<typename CallWidget, typename Index> bool CallModel<CallWidget,Index>::initHistory() template<typename CallWidget, typename Index> bool CallModel<CallWidget,Index>::initHistory()
{ {qDebug() << "\n\n\n\nInit history";
if (!historyInit) { if (!historyInit) {qDebug() << "In if";
ConfigurationManagerInterface& configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); ConfigurationManagerInterface& configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
QStringList historyMap = configurationManager.getHistory().value(); QStringList historyMap = configurationManager.getHistory().value();
foreach (QString historyCallId, historyMap) { qDebug() << historyMap.size();
foreach (QString historyCallId, historyMap) {qDebug() << "Here";
QStringList param = historyCallId.split("|"); QStringList param = historyCallId.split("|");
if (param.count() <= 10) { if (param.count() <= 10) {
//If this ever change, look at the gnome client //If this ever change, look at the gnome client
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment