Refactor Hyperion JSON-API (#1727)

This commit is contained in:
LordGrey
2024-05-08 22:06:32 +02:00
committed by GitHub
parent 94850d890a
commit cf287f5adb
64 changed files with 4203 additions and 2962 deletions

View File

@@ -35,7 +35,7 @@ OsEventHandlerBase::OsEventHandlerBase()
_log = Logger::getInstance("EVENTS-OS");
QCoreApplication* app = QCoreApplication::instance();
if (!qobject_cast<QApplication*>(app))
if (qobject_cast<QApplication*>(app) == nullptr)
{
_isService = true;
}
@@ -46,6 +46,7 @@ OsEventHandlerBase::OsEventHandlerBase()
OsEventHandlerBase::~OsEventHandlerBase()
{
quit();
QObject::disconnect(this, &OsEventHandlerBase::signalEvent, EventHandler::getInstance().data(), &EventHandler::handleEvent);
OsEventHandlerBase::unregisterLockHandler();
@@ -130,6 +131,11 @@ void OsEventHandlerBase::lock(bool isLocked)
}
}
void OsEventHandlerBase::quit()
{
emit signalEvent(Event::Quit);
}
#if defined(_WIN32)
OsEventHandlerWindows* OsEventHandlerWindows::getInstance()