code format & class prefix

This commit is contained in:
王劲鹏
2021-02-04 16:59:58 +08:00
committed by osborn
parent 99afe83b19
commit be37a71699
90 changed files with 1196 additions and 1274 deletions

View File

@@ -0,0 +1,20 @@
#ifndef SINGLETON_H
#define SINGLETON_H
#include <QDebug>
class DoricSingleton {
private:
static DoricSingleton *local_instance;
DoricSingleton() { qDebug() << "constructor"; }
~DoricSingleton() { qDebug() << "destructor"; }
public:
static DoricSingleton *getInstance() {
static DoricSingleton locla_s;
return &locla_s;
}
};
#endif // SINGLETON_H

View File

@@ -1,28 +0,0 @@
#ifndef SINGLETON_H
#define SINGLETON_H
#include <QDebug>
class Singleton
{
private:
static Singleton *local_instance;
Singleton()
{
qDebug() << "constructor";
}
~Singleton()
{
qDebug() << "destructor";
}
public:
static Singleton *getInstance()
{
static Singleton locla_s;
return &locla_s;
}
};
#endif // SINGLETON_H