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
60#include <ParticlesScriptingInterface.h>60#include <ParticlesScriptingInterface.h>
61#include <PerfStat.h>61#include <PerfStat.h>
62#include <ResourceCache.h>62#include <ResourceCache.h>
63#include <UserActivityLogger.h>
63#include <UUID.h>64#include <UUID.h>
64#include <OctreeSceneStats.h>65#include <OctreeSceneStats.h>
65#include <LocalVoxelsList.h>66#include <LocalVoxelsList.h>
@@ -268,6 +269,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 202 unmodified lines
268 269
269 // set the account manager's root URL and trigger a login request if we don't have the access token270 // set the account manager's root URL and trigger a login request if we don't have the access token
270 accountManager.setAuthURL(DEFAULT_NODE_AUTH_URL);271 accountManager.setAuthURL(DEFAULT_NODE_AUTH_URL);
272 UserActivityLogger::getInstance().launch();
271 273
272 // once the event loop has started, check and signal for an access token274 // once the event loop has started, check and signal for an access token
273 QMetaObject::invokeMethod(&accountManager, "checkAndSignalForAccessToken", Qt::QueuedConnection);275 QMetaObject::invokeMethod(&accountManager, "checkAndSignalForAccessToken", Qt::QueuedConnection);
@@ -396,7 +398,19 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 122 unmodified lines
396}398}
397 399
398Application::~Application() {400Application::~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
400 qInstallMessageHandler(NULL);414 qInstallMessageHandler(NULL);
401 415
402 // make sure we don't call the idle timer any more416 // 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
3558 3572
3559 _scriptEnginesHash.insertMulti(scriptURLString, scriptEngine);3573 _scriptEnginesHash.insertMulti(scriptURLString, scriptEngine);
3560 _runningScriptsWidget->setRunningScripts(getRunningScripts());3574 _runningScriptsWidget->setRunningScripts(getRunningScripts());
3575 UserActivityLogger::getInstance().loadedScript(scriptURLString);
3561 }3576 }
3562 3577
3563 // setup the packet senders and jurisdiction listeners of the script engine's scripting interfaces so3578 // 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