Author: JirkaH Date: 2010-02-24 10:45:26 +0100 (Wed, 24 Feb 2010) New Revision: 1844 Modified: trunk/client/elvys-client/src/Makefile trunk/client/elvys-client/src/category.cpp Log: make even more sure that statistical events will be delivered Modified: trunk/client/elvys-client/src/Makefile =================================================================== --- trunk/client/elvys-client/src/Makefile 2010-02-24 09:31:17 UTC (rev 1843) +++ trunk/client/elvys-client/src/Makefile 2010-02-24 09:45:26 UTC (rev 1844) @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: ../bin/elvys-client -# Generated by qmake (2.01a) (Qt 4.5.3) on: Tue Feb 23 20:39:27 2010 +# Generated by qmake (2.01a) (Qt 4.5.3) on: Wed Feb 24 10:43:16 2010 # Project: src.pro # Template: app # Command: /usr/bin/qmake -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=release -o Makefile src.pro Modified: trunk/client/elvys-client/src/category.cpp =================================================================== --- trunk/client/elvys-client/src/category.cpp 2010-02-24 09:31:17 UTC (rev 1843) +++ trunk/client/elvys-client/src/category.cpp 2010-02-24 09:45:26 UTC (rev 1844) @@ -491,11 +491,11 @@ */ void Category::sendStatEvent(ElvysNs::StatisticEventType type, int docId, int posId, int panelId) { - StatisticEvent * e = new StatisticEvent((QEvent::Type)AppConfig::getInstance()->getStatisticEventType()); + StatisticEvent e((QEvent::Type)AppConfig::getInstance()->getStatisticEventType()); - e->setSubType(type); - e->setDocId(docId); - e->setPosId(posId); + e.setSubType(type); + e.setDocId(docId); + e.setPosId(posId); /* Panel * panel = NULL; // we send panel order instead of panel id - so lets find the panel @@ -508,11 +508,11 @@ int pId = indexOf(panel); e->setPanelId(indexOf(panel)); */ - e->setPanelId(panelId); - e->setCatId(id()); - e->setLayoutId(layoutMaint->currentLayoutId()); + e.setPanelId(panelId); + e.setCatId(id()); + e.setLayoutId(layoutMaint->currentLayoutId()); - QCoreApplication::postEvent(Statistics::getInstance(), e); + QCoreApplication::sendEvent(Statistics::getInstance(), &e); } void Category::zoomEventHandler(int documentId, int layoutPosition, int panelId) {