single instance log & add global broadcast
This commit is contained in:
parent
bb48faaf47
commit
4c3b5b1278
@ -10,9 +10,9 @@
|
||||
class DORIC_EXPORT DoricContextManager {
|
||||
private:
|
||||
static DoricContextManager *local_instance;
|
||||
DoricContextManager() {}
|
||||
DoricContextManager() { qDebug() << "DoricContextManager constructor"; }
|
||||
|
||||
~DoricContextManager() {}
|
||||
~DoricContextManager() { qDebug() << "DoricContextManager destructor"; }
|
||||
|
||||
QAtomicInt *counter = new QAtomicInt();
|
||||
QMap<QString, DoricContext *> *contextMap =
|
||||
|
@ -11,9 +11,9 @@
|
||||
class DORIC_EXPORT DoricNativeDriver : public DoricInterfaceDriver {
|
||||
private:
|
||||
static DoricNativeDriver *local_instance;
|
||||
DoricNativeDriver() {}
|
||||
DoricNativeDriver() { qDebug() << "DoricNativeDriver constructor"; }
|
||||
|
||||
~DoricNativeDriver() {}
|
||||
~DoricNativeDriver() { qDebug() << "DoricNativeDriver destructor"; }
|
||||
|
||||
DoricJSEngine jsEngine;
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include "shader/slider/DoricSliderNode.h"
|
||||
|
||||
DoricRegistry::DoricRegistry() {
|
||||
qDebug() << "DoricRegistry constructor";
|
||||
|
||||
registerNativePlugin<DoricShaderPlugin>("shader");
|
||||
registerNativePlugin<DoricModalPlugin>("modal");
|
||||
registerNativePlugin<DoricPopoverPlugin>("popover");
|
||||
|
@ -14,7 +14,7 @@ class DORIC_EXPORT DoricRegistry {
|
||||
private:
|
||||
static DoricRegistry *local_instance;
|
||||
|
||||
~DoricRegistry() { qDebug() << "destructor"; }
|
||||
~DoricRegistry() { qDebug() << "DoricRegistry destructor"; }
|
||||
|
||||
public:
|
||||
static DoricRegistry *getInstance() {
|
||||
|
@ -62,6 +62,7 @@ SOURCES += \
|
||||
utils/DoricContextHolder.cpp \
|
||||
utils/DoricDialogBridge.cpp \
|
||||
utils/DoricDraggableBridge.cpp \
|
||||
utils/DoricGlobalBroadcast.cpp \
|
||||
utils/DoricImageBridge.cpp \
|
||||
utils/DoricInputBridge.cpp \
|
||||
utils/DoricLayouts.cpp \
|
||||
@ -151,6 +152,7 @@ HEADERS += \
|
||||
utils/DoricCountDownLatch.h \
|
||||
utils/DoricDialogBridge.h \
|
||||
utils/DoricDraggableBridge.h \
|
||||
utils/DoricGlobalBroadcast.h \
|
||||
utils/DoricImageBridge.h \
|
||||
utils/DoricInputBridge.h \
|
||||
utils/DoricLayouts.h \
|
||||
|
1
doric-Qt/example/doric/utils/DoricGlobalBroadcast.cpp
Normal file
1
doric-Qt/example/doric/utils/DoricGlobalBroadcast.cpp
Normal file
@ -0,0 +1 @@
|
||||
#include "DoricGlobalBroadcast.h"
|
20
doric-Qt/example/doric/utils/DoricGlobalBroadcast.h
Normal file
20
doric-Qt/example/doric/utils/DoricGlobalBroadcast.h
Normal file
@ -0,0 +1,20 @@
|
||||
#ifndef DORICGLOBALBROADCAST_H
|
||||
#define DORICGLOBALBROADCAST_H
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
class DoricGlobalBroadcast {
|
||||
private:
|
||||
static DoricGlobalBroadcast *local_instance;
|
||||
DoricGlobalBroadcast() { qDebug() << "DoricGlobalBroadcast constructor"; }
|
||||
|
||||
~DoricGlobalBroadcast() { qDebug() << "DoricGlobalBroadcast destructor"; }
|
||||
|
||||
public:
|
||||
static DoricGlobalBroadcast *getInstance() {
|
||||
static DoricGlobalBroadcast instance;
|
||||
return &instance;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // DORICGLOBALBROADCAST_H
|
@ -70,11 +70,11 @@ private:
|
||||
|
||||
static DoricNetworkService *local_instance;
|
||||
DoricNetworkService() {
|
||||
qDebug() << "constructor";
|
||||
qDebug() << "DoricNetworkService constructor";
|
||||
thread.start();
|
||||
}
|
||||
|
||||
~DoricNetworkService() { qDebug() << "destructor"; }
|
||||
~DoricNetworkService() { qDebug() << "DoricNetworkService destructor"; }
|
||||
|
||||
public:
|
||||
static DoricNetworkService *getInstance() {
|
||||
|
Reference in New Issue
Block a user