Showing the changes to libraries/networking/src/UserActivityLoggerScriptingInterface.cpp (1 of 5 files). Show all
Unified · Split
| @@ -38,6 +38,21 @@ void UserActivityLoggerScriptingInterface::tutorialProgress( QString stepName, i · 37 unmodified lines | |||
| 38 | 38 | ||
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | void UserActivityLoggerScriptingInterface::palAction(QString action, QString target) { | ||
| 42 | QJsonObject payload; | ||
| 43 | payload["action"] = action; | ||
| 44 | if (target.length() > 0) { | ||
| 45 | payload["target"] = target; | ||
| 46 | } | ||
| 47 | logAction("pal_activity", payload); | ||
| 48 | } | ||
| 49 | |||
| 50 | void UserActivityLoggerScriptingInterface::palOpened(float secondsOpened) { | ||
| 51 | logAction("pal_opened", { | ||
| 52 | { "seconds_opened", secondsOpened } | ||
| 53 | }); | ||
| 54 | } | ||
| 55 | |||
| 41 | void UserActivityLoggerScriptingInterface::logAction(QString action, QJsonObject details) { | 56 | void UserActivityLoggerScriptingInterface::logAction(QString action, QJsonObject details) { |
| 42 | QMetaObject::invokeMethod(&UserActivityLogger::getInstance(), "logAction", | 57 | QMetaObject::invokeMethod(&UserActivityLogger::getInstance(), "logAction", |
| 43 | Q_ARG(QString, action), | 58 | Q_ARG(QString, action), |