emit a signal when a device name is changed so plugins can act on it
This commit is contained in:
parent
b911ca13a5
commit
16cdd29eb8
@ -96,7 +96,10 @@ QString Device::name() const
|
||||
/*! Set the \a name for this Device. This is visible to the user.*/
|
||||
void Device::setName(const QString &name)
|
||||
{
|
||||
m_name = name;
|
||||
if (m_name != name) {
|
||||
m_name = name;
|
||||
emit nameChanged();
|
||||
}
|
||||
}
|
||||
|
||||
/*! Returns the parameter of this Device. It must match the parameter description in the associated \l{DeviceClass}. */
|
||||
|
||||
@ -73,6 +73,7 @@ public:
|
||||
|
||||
signals:
|
||||
void stateValueChanged(const QUuid &stateTypeId, const QVariant &value);
|
||||
void nameChanged();
|
||||
|
||||
private:
|
||||
Device(const PluginId &pluginId, const DeviceId &id, const DeviceClassId &deviceClassId, QObject *parent = nullptr);
|
||||
|
||||
Reference in New Issue
Block a user