mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 20:40:29 +08:00
Ref T413, application context "identifable"
This commit is contained in:
@@ -30,7 +30,7 @@ namespace BlackCore
|
|||||||
namespace Context
|
namespace Context
|
||||||
{
|
{
|
||||||
CContextApplication::CContextApplication(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime) :
|
CContextApplication::CContextApplication(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime) :
|
||||||
IContextApplication(mode, runtime)
|
IContextApplication(mode, runtime), CIdentifiable(this)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
CContextApplication *CContextApplication::registerWithDBus(BlackMisc::CDBusServer *server)
|
CContextApplication *CContextApplication::registerWithDBus(BlackMisc::CDBusServer *server)
|
||||||
@@ -209,8 +209,7 @@ namespace BlackCore
|
|||||||
CIdentifier CContextApplication::getApplicationIdentifier() const
|
CIdentifier CContextApplication::getApplicationIdentifier() const
|
||||||
{
|
{
|
||||||
if (m_debugEnabled) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }
|
if (m_debugEnabled) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }
|
||||||
static const CIdentifier identifier("swift application");
|
return this->identifier();
|
||||||
return identifier;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CContextApplication::readFromFile(const QString &fileName) const
|
QString CContextApplication::readFromFile(const QString &fileName) const
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#include "blackcore/blackcoreexport.h"
|
#include "blackcore/blackcoreexport.h"
|
||||||
#include "blackcore/context/contextapplication.h"
|
#include "blackcore/context/contextapplication.h"
|
||||||
#include "blackcore/corefacadeconfig.h"
|
#include "blackcore/corefacadeconfig.h"
|
||||||
#include "blackmisc/identifier.h"
|
#include "blackmisc/identifiable.h"
|
||||||
#include "blackmisc/identifierlist.h"
|
#include "blackmisc/identifierlist.h"
|
||||||
#include "blackmisc/statusmessage.h"
|
#include "blackmisc/statusmessage.h"
|
||||||
#include "blackmisc/valuecache.h"
|
#include "blackmisc/valuecache.h"
|
||||||
@@ -36,7 +36,9 @@ namespace BlackCore
|
|||||||
namespace Context
|
namespace Context
|
||||||
{
|
{
|
||||||
//! Application context
|
//! Application context
|
||||||
class BLACKCORE_EXPORT CContextApplication : public IContextApplication
|
class BLACKCORE_EXPORT CContextApplication :
|
||||||
|
public IContextApplication,
|
||||||
|
public BlackMisc::CIdentifiable
|
||||||
{
|
{
|
||||||
Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTAPPLICATION_INTERFACENAME)
|
Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTAPPLICATION_INTERFACENAME)
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|||||||
@@ -51,6 +51,12 @@ namespace BlackMisc
|
|||||||
//! Destructor
|
//! Destructor
|
||||||
~CIdentifiable();
|
~CIdentifiable();
|
||||||
|
|
||||||
|
//! Copy constructor
|
||||||
|
CIdentifiable(const CIdentifiable &) = default;
|
||||||
|
|
||||||
|
//! Copy assignment operator
|
||||||
|
CIdentifiable &operator =(const CIdentifiable &) = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CIdentifier m_identifier;
|
CIdentifier m_identifier;
|
||||||
QMetaObject::Connection m_connection;
|
QMetaObject::Connection m_connection;
|
||||||
|
|||||||
Reference in New Issue
Block a user