mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
Ref T730, context shutdown
* virtual function for "about to shutdown" * graceful shutdown
This commit is contained in:
committed by
Mat Sutcliffe
parent
857e3581b0
commit
f69edff5c0
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "blackcore/context/context.h"
|
||||
#include "blackcore/application.h"
|
||||
#include "blackmisc/logcategorylist.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
@@ -21,6 +22,15 @@ namespace BlackCore
|
||||
return cats;
|
||||
}
|
||||
|
||||
IContext::IContext(CCoreFacadeConfig::ContextMode mode, QObject *parent) :
|
||||
QObject(parent), m_mode(mode), m_contextId(QDateTime::currentMSecsSinceEpoch())
|
||||
{
|
||||
if (sApp && !sApp->isShuttingDown())
|
||||
{
|
||||
QObject::connect(sApp, &CApplication::aboutToShutdown, this, &IContext::onAboutToShutdown);
|
||||
}
|
||||
}
|
||||
|
||||
IContextNetwork *IContext::getIContextNetwork()
|
||||
{
|
||||
return this->getRuntime()->getIContextNetwork();
|
||||
|
||||
Reference in New Issue
Block a user