Ref T730, context shutdown

* virtual function for "about to shutdown"
* graceful shutdown
This commit is contained in:
Klaus Basan
2019-10-07 17:46:55 +02:00
committed by Mat Sutcliffe
parent 857e3581b0
commit f69edff5c0
6 changed files with 42 additions and 10 deletions

View File

@@ -145,9 +145,7 @@ namespace BlackCore
bool m_debugEnabled = false; //!< debug messages enabled
//! Constructor
IContext(CCoreFacadeConfig::ContextMode mode, QObject *parent) :
QObject(parent), m_mode(mode), m_contextId(QDateTime::currentMSecsSinceEpoch())
{}
IContext(CCoreFacadeConfig::ContextMode mode, QObject *parent);
//! Path and context id
QString buildPathAndContextId(const QString &path) const
@@ -164,6 +162,9 @@ namespace BlackCore
BlackMisc::CLogMessage(this, BlackMisc::CLogCategory::contextSlot()).warning(u"Empty context called, details: %1") << functionName;
}
//! Called when shutdown is about to be called
virtual void onAboutToShutdown() {}
//! Standard message when status message is returned in empty context
static const BlackMisc::CStatusMessage &statusMessageEmptyContext();
};