Files
GUI/src/errorhandle/GUIErrorLE.cpp
2021-12-28 10:43:59 +08:00

22 lines
474 B
C++

//
// 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);
}