Fix logout miss bug
This commit is contained in:
5
src/errorhandle/GUIErrorBase.cpp
Normal file
5
src/errorhandle/GUIErrorBase.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
//
|
||||
// Created by Krad on 2021/12/16.
|
||||
//
|
||||
|
||||
#include "GUIErrorBase.h"
|
||||
40
src/errorhandle/GUIErrorBase.h
Normal file
40
src/errorhandle/GUIErrorBase.h
Normal 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
|
||||
Reference in New Issue
Block a user