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