Removed json callback

This commit is contained in:
Atlante45 2014-07-02 15:18:56 -07:00
parent 3acbaa7ab6
commit 90a27bb118

View file

@ -83,17 +83,10 @@ void UserActivityLogger::close(int delayTime) {
// In order to get the end of the session, we need to give the account manager enough time to send the packet.
QEventLoop loop;
// Here we connect the callbacks to stop the event loop
JSONCallbackParameters params;
params.jsonCallbackReceiver = &loop;
params.errorCallbackReceiver = &loop;
params.jsonCallbackMethod = "quit";
params.errorCallbackMethod = "quit";
// In case something goes wrong, we also setup a timer so that the delai is not greater than delayTime
QTimer timer;
connect(&timer, &QTimer::timeout, &loop, &QEventLoop::quit);
// Now we can log it
logAction(ACTION_NAME, QJsonObject(), params);
logAction(ACTION_NAME, QJsonObject());
timer.start(delayTime);
loop.exec();
}