Index: sources/MainTimer.cpp =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -r1da89b0452b8ef9448847618e75c118f3f58bd0c --- sources/MainTimer.cpp (.../MainTimer.cpp) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/MainTimer.cpp (.../MainTimer.cpp) (revision 1da89b0452b8ef9448847618e75c118f3f58bd0c) @@ -19,7 +19,7 @@ //Project #include "Logger.h" -//#include "FileHandler.h" +#include "ApplicationController.h" /*! * \brief MainTimer::MainTimer @@ -42,15 +42,24 @@ if (gFakeInterval) { startTimer(gFakeInterval); } - // disabled coco end - else { - startTimer(_interval); - } + + initConnections(); LOG_DEBUG(tr("%1 Initialized").arg(metaObject()->className())); return true; } /*! + * \brief ApplicationController::initConnections + * \details Initializes the required signal/slot connection between this class and other objects + * to be able to communicate. + */ +void MainTimer::initConnections() +{ + connect(&_ApplicationController , SIGNAL(didKeepAliveBegin()), + this , SLOT( onKeepAliveBegin())); +} + +/*! * \brief MainTimer::quit * \details Does nothing for now */ @@ -107,6 +116,18 @@ } /*! + * \brief MainTimer::onKeepAliveBegin + * \details the handler for the signal didKeepAliveBegin + * comming from ApplicationController + */ +void MainTimer::onKeepAliveBegin() +{ + if ( ! gFakeInterval ) { + startTimer(_interval); + } +} + +/*! * \brief MainTimer::timerEvent * \details This event handler has been re-implemented in here * to receive timer events for the object @@ -116,7 +137,7 @@ void MainTimer::timerEvent(QTimerEvent *) { #ifndef DISABLE_KEEP_ALIVE - emit didTimeout(); + ////POST//// emit didTimeout(); #endif // I'm not sure how often we need to check for this. // if it needs to be checked each second pass true