code opt
This commit is contained in:
parent
be37a71699
commit
41640c1399
@ -12,8 +12,8 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
static DoricSingleton *getInstance() {
|
static DoricSingleton *getInstance() {
|
||||||
static DoricSingleton locla_s;
|
static DoricSingleton instance;
|
||||||
return &locla_s;
|
return &instance;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
#ifndef OBJECTFACTORY_H
|
||||||
|
#define OBJECTFACTORY_H
|
||||||
|
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QMetaObject>
|
#include <QMetaObject>
|
||||||
|
|
||||||
#ifndef OBJECTFACTORY_H
|
|
||||||
#define OBJECTFACTORY_H
|
|
||||||
|
|
||||||
class DoricObjectFactory {
|
class DoricObjectFactory {
|
||||||
public:
|
public:
|
||||||
template <typename T> static void registerClass(QString name) {
|
template <typename T> static void registerClass(QString name) {
|
||||||
|
Reference in New Issue
Block a user