Files
GUI/src/errorhandle/GUIErrorLE.cpp

22 lines
474 B
C++
Raw Normal View History

2021-12-16 17:21:45 +08:00
//
// Created by Krad on 2021/12/16.
//
#include "GUIErrorLE.h"
#include "event/EventCenter.h"
2021-12-28 10:43:59 +08:00
#include <QDebug>
2021-12-16 17:21:45 +08:00
#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);
}