swift
identifiable.cpp
1 // SPDX-FileCopyrightText: Copyright (C) 2015 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
4 #include "misc/identifiable.h"
5 
6 namespace swift::misc
7 {
8  CIdentifiable::CIdentifiable(QObject *object) : m_identifier(object->objectName())
9  {
10  // if the object name changes we update our originator
11  m_connection = QObject::connect(object, &QObject::objectNameChanged,
12  [this, object]() { m_identifier = CIdentifier(object->objectName()); });
13  }
14 
15  CIdentifiable::~CIdentifiable() { QObject::disconnect(m_connection); }
16 } // namespace swift::misc
CIdentifiable()
Construct without a name.
Definition: identifiable.h:43
Value object encapsulating information identifying a component of a modular distributed swift process...
Definition: identifier.h:29
Free functions in swift::misc.