History

Adding logger calls

Atlante45 committed 12 years ago

Commit f33ad8a1 parent e9dffc06 files · +55 −33Browse files

Showing the changes to interface/src/Application.cpp (1 of 6 files). Show all

Unified · Split

interface/src/Application.cpp+16−1
@@ -60,6 +60,7 @@ · 59 unmodified lines
6060 #include <ParticlesScriptingInterface.h>
6161 #include <PerfStat.h>
6262 #include <ResourceCache.h>
63+#include <UserActivityLogger.h>
6364 #include <UUID.h>
6465 #include <OctreeSceneStats.h>
6566 #include <LocalVoxelsList.h>
@@ -268,6 +269,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 202 unmodified lines
268269
269270 // set the account manager's root URL and trigger a login request if we don't have the access token
270271 accountManager.setAuthURL(DEFAULT_NODE_AUTH_URL);
272+ UserActivityLogger::getInstance().launch();
271273
272274 // once the event loop has started, check and signal for an access token
273275 QMetaObject::invokeMethod(&accountManager, "checkAndSignalForAccessToken", Qt::QueuedConnection);
@@ -396,7 +398,19 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 122 unmodified lines
396398 }
397399
398400 Application::~Application() {
399−
401+ int DELAI_TIME = 1000;
402+ QEventLoop loop;
403+ QTimer timer;
404+ connect(&timer, &QTimer::timeout, &loop, &QEventLoop::quit);
405+ JSONCallbackParameters params;
406+ params.jsonCallbackReceiver = &loop;
407+ params.errorCallbackReceiver = &loop;
408+ params.jsonCallbackMethod = "quit";
409+ params.errorCallbackMethod = "quit";
410+ UserActivityLogger::getInstance().close(params);
411+ timer.start(DELAI_TIME);
412+ loop.exec();
413+
400414 qInstallMessageHandler(NULL);
401415
402416 // make sure we don't call the idle timer any more
@@ -3558,6 +3572,7 @@ ScriptEngine* Application::loadScript(const QString& scriptName, bool loadScript · 3155 unmodified lines
35583572
35593573 _scriptEnginesHash.insertMulti(scriptURLString, scriptEngine);
35603574 _runningScriptsWidget->setRunningScripts(getRunningScripts());
3575+ UserActivityLogger::getInstance().loadedScript(scriptURLString);
35613576 }
35623577
35633578 // setup the packet senders and jurisdiction listeners of the script engine's scripting interfaces so

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t