Error handle
This commit is contained in:
21
src/errorhandle/GUIErrorLE.cpp
Normal file
21
src/errorhandle/GUIErrorLE.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// Created by Krad on 2021/12/16.
|
||||
//
|
||||
|
||||
#include "GUIErrorLE.h"
|
||||
#include "event/EventCenter.h"
|
||||
#include <qDebug>
|
||||
#include <QApplication>
|
||||
|
||||
void GUIErrorLE::parse(const QString &errorMsg) {
|
||||
if (errorMsg.isEmpty()) return;
|
||||
if (errorMsg[0] == 'e' && errorMsg[1] == ' ')
|
||||
{
|
||||
errorMessage = errorMsg.right(errorMsg.length()-2);
|
||||
}
|
||||
}
|
||||
|
||||
void GUIErrorLE::handle() {
|
||||
EventCenter::Default()->triggerEvent(DeviceErrorRaise, nullptr,(QObject*)&errorMessage);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user