Fix logout miss bug

This commit is contained in:
Krad
2021-12-16 10:52:21 +08:00
parent ba0d59ef54
commit 5d8b983813
3 changed files with 49 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
//
// Created by Krad on 2021/12/16.
//
#include "GUIErrorBase.h"

View File

@@ -0,0 +1,40 @@
//
// Created by Krad on 2021/12/16.
//
#ifndef GUI_GUIERRORBASE_H
#define GUI_GUIERRORBASE_H
#include <QWidget>
/**
* GUI Error interface
*/
class GUIErrorBase {
public:
GUIErrorBase()= default;
/**
* parse error object from error msg
* @param errorMsg
*/
virtual void parse(const QString& errorMsg){};
/**
* setErrorHandleParent
* @param parent The parent widget of error handling
*/
void setErrorHandleParent(QWidget* parent){
this->parent = parent;
};
/**
* handle error, should be implement in sub class
*/
virtual void handle(){};
protected:
QWidget* parent = nullptr;
};
#endif //GUI_GUIERRORBASE_H