mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
Issue #15 Classes for sharing the history of log messages
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "blackcore/context/contextownaircraftimpl.h"
|
||||
#include "blackcore/context/contextsimulator.h"
|
||||
#include "blackmisc/sharedstate/datalinkdbus.h"
|
||||
#include "blackmisc/loghistory.h"
|
||||
#include "blackcore/context/contextsimulatorimpl.h"
|
||||
#include "blackcore/data/launchersetup.h"
|
||||
#include "blackcore/corefacadeconfig.h"
|
||||
@@ -123,6 +124,15 @@ namespace BlackCore
|
||||
qFatal("Invalid application context mode");
|
||||
}
|
||||
|
||||
// shared log history
|
||||
m_logHistorySource = new CLogHistorySource(this);
|
||||
m_logHistorySource->initialize(m_dataLinkDBus);
|
||||
if (m_config.hasLocalCore())
|
||||
{
|
||||
m_logHistory = new CLogHistory(this);
|
||||
m_logHistory->initialize(m_dataLinkDBus);
|
||||
}
|
||||
|
||||
// contexts
|
||||
if (m_contextApplication) { m_contextApplication->deleteLater(); }
|
||||
m_contextApplication = IContextApplication::create(this, m_config.getModeApplication(), m_dbusServer, m_dbusConnection);
|
||||
@@ -331,6 +341,10 @@ namespace BlackCore
|
||||
disconnect(this);
|
||||
|
||||
// tear down shared state infrastructure
|
||||
delete m_logHistory;
|
||||
m_logHistory = nullptr;
|
||||
delete m_logHistorySource;
|
||||
m_logHistorySource = nullptr;
|
||||
delete m_dataLinkDBus;
|
||||
m_dataLinkDBus = nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user