mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 19:35:32 +08:00
Detect if running with DBus (core + GUI) or just "standalone" (no swift DBus)
This commit is contained in:
@@ -903,6 +903,16 @@ namespace BlackCore
|
||||
return this->startWebDataServices();
|
||||
}
|
||||
|
||||
bool CApplication::isLocalContext() const
|
||||
{
|
||||
return this->getIContextApplication() && this->getIContextApplication()->isUsingImplementingObject();
|
||||
}
|
||||
|
||||
bool CApplication::isDBusContext() const
|
||||
{
|
||||
return this->getIContextApplication() && !this->getIContextApplication()->isUsingImplementingObject() && !this->getIContextApplication()->isEmptyObject();
|
||||
}
|
||||
|
||||
CStatusMessageList CApplication::startCoreFacadeAndWebDataServices()
|
||||
{
|
||||
Q_ASSERT_X(m_parsed, Q_FUNC_INFO, "Call this function after parsing");
|
||||
|
||||
@@ -364,6 +364,11 @@ namespace BlackCore
|
||||
//! Get the facade
|
||||
CCoreFacade *getCoreFacade() { return m_coreFacade.data(); }
|
||||
|
||||
//! Local or DBus application? @{
|
||||
bool isLocalContext() const;
|
||||
bool isDBusContext() const;
|
||||
//! @}
|
||||
|
||||
//! Get the facade
|
||||
const CCoreFacade *getCoreFacade() const { return m_coreFacade.data(); }
|
||||
//! @}
|
||||
|
||||
@@ -362,6 +362,7 @@ void SwiftGuiStd::setContextAvailability()
|
||||
if (m_coreAvailable)
|
||||
{
|
||||
// core has just become available (startup)
|
||||
// this HERE is called with and without DBus
|
||||
sGui->getIContextApplication()->synchronizeLogSubscriptions();
|
||||
sGui->getIContextApplication()->synchronizeLocalSettings();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user