History

Fix for sixense debug draw after move to plugin.

static variables used to hold a Singleton cannot be shared across dll boundaries by default. This uses the globalInstance template to store the instance as a property on the QApplication.

Anthony J. Thibault committed 10 years ago

Commit 1af780a1 parent e133bd81 file · +3 −2Browse files

Showing the changes to libraries/shared/src/DebugDraw.cpp (1 of 1 file). Show all

Unified · Split

libraries/shared/src/DebugDraw.cpp+3−2
@@ -8,10 +8,11 @@ · 7 unmodified lines
88 //
99
1010 #include "DebugDraw.h"
11+#include "SharedUtil.h"
1112
1213 DebugDraw& DebugDraw::getInstance() {
13− static DebugDraw instance;
14− return instance;
14+ static DebugDraw* instance = globalInstance<DebugDraw>("com.highfidelity.DebugDraw");
15+ return *instance;
1516 }
1617
1718 DebugDraw::DebugDraw() {

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