mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Refactor Hyperion JSON-API (#1727)
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user