This commit is contained in:
王劲鹏
2021-01-28 17:06:40 +08:00
committed by osborn
parent 0be7a9679a
commit 93b7cc2457
53 changed files with 1020 additions and 774 deletions

View File

@@ -1,25 +0,0 @@
#ifndef CUSTOM_CALLBACK_H
#define CUSTOM_CALLBACK_H
#include <QDebug>
#include "async/callback.h"
template <class R>
class CustomCallback : public Callback<R> {
public:
void onResult(R result) override {
qDebug() << result;
}
void onError(QException exception) override {
qDebug() << exception.what();
}
void onFinish() override {
}
};
#endif // CUSTOM_CALLBACK_H

View File

@@ -7,16 +7,19 @@ class Singleton
{
private:
static Singleton *local_instance;
Singleton() {
Singleton()
{
qDebug() << "constructor";
}
~Singleton() {
~Singleton()
{
qDebug() << "destructor";
}
public:
static Singleton *getInstance() {
static Singleton *getInstance()
{
static Singleton locla_s;
return &locla_s;
}