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