refs #883, improved detection if core is running

* use proxy to really ping core (not only checking connection)
* avoid closing Qt default connections -> crash
* some refactoring
This commit is contained in:
Klaus Basan
2017-02-17 20:07:13 +01:00
committed by Mathew Sutcliffe
parent d918ee4cfd
commit 6c72f8491c
4 changed files with 107 additions and 33 deletions

View File

@@ -74,6 +74,11 @@ namespace BlackCore
virtual bool existsFile(const QString &fileName) const override;
//! @}
//! Used to test if there is a core running?
//! \note creates and connects via proxy object, so not meant for very frequent tests
//! \sa CDBusServer::isDBusAvailable as lightweight, but less accurate alternative
static bool isContextResponsive(const QString &dbusAddress, QString &msg, int timeoutMs = 1500);
protected:
//! Constructor
CContextApplicationProxy(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime) : IContextApplication(mode, runtime), m_dBusInterface(nullptr) {}