forked from qt-creator/qt-creator
QmlDesigner: Add missing callback for adding signals
If a signal is added we have to add/update the property. Task-number: QDS-14449 Change-Id: I8c4071a3fbba7f880d81dd697b15a2649d8acb10 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
committed by
Thomas Hartmann
parent
f7831fdad2
commit
faf44a6498
@@ -258,6 +258,13 @@ void ConnectionView::bindingPropertiesChanged(const QList<BindingProperty> &prop
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ConnectionView::signalDeclarationPropertiesChanged(
|
||||||
|
const QVector<SignalDeclarationProperty> &propertyList, PropertyChangeFlags /* propertyChange */)
|
||||||
|
{
|
||||||
|
for (const SignalDeclarationProperty &property : propertyList)
|
||||||
|
d->dynamicPropertiesModel.updateItem(property);
|
||||||
|
}
|
||||||
|
|
||||||
void ConnectionView::signalHandlerPropertiesChanged(const QVector<SignalHandlerProperty> &propertyList,
|
void ConnectionView::signalHandlerPropertiesChanged(const QVector<SignalHandlerProperty> &propertyList,
|
||||||
AbstractView::PropertyChangeFlags /*propertyChange*/)
|
AbstractView::PropertyChangeFlags /*propertyChange*/)
|
||||||
{
|
{
|
||||||
|
@@ -50,6 +50,9 @@ public:
|
|||||||
void bindingPropertiesChanged(const QList<BindingProperty>& propertyList, PropertyChangeFlags propertyChange) override;
|
void bindingPropertiesChanged(const QList<BindingProperty>& propertyList, PropertyChangeFlags propertyChange) override;
|
||||||
void signalHandlerPropertiesChanged(const QVector<SignalHandlerProperty>& propertyList, PropertyChangeFlags propertyChange) override;
|
void signalHandlerPropertiesChanged(const QVector<SignalHandlerProperty>& propertyList, PropertyChangeFlags propertyChange) override;
|
||||||
|
|
||||||
|
void signalDeclarationPropertiesChanged(const QVector<SignalDeclarationProperty> &propertyList,
|
||||||
|
PropertyChangeFlags propertyChange) override;
|
||||||
|
|
||||||
void selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
void selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
||||||
const QList<ModelNode> &lastSelectedNodeList) override;
|
const QList<ModelNode> &lastSelectedNodeList) override;
|
||||||
|
|
||||||
|
@@ -148,7 +148,7 @@ void DynamicPropertiesModel::setCurrent(int internalId, PropertyNameView name)
|
|||||||
|
|
||||||
void DynamicPropertiesModel::updateItem(const AbstractProperty &property)
|
void DynamicPropertiesModel::updateItem(const AbstractProperty &property)
|
||||||
{
|
{
|
||||||
if (!property.isDynamic())
|
if (!property.isDynamic() && !property.isSignalDeclarationProperty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (auto *item = itemForProperty(property)) {
|
if (auto *item = itemForProperty(property)) {
|
||||||
|
@@ -1092,6 +1092,13 @@ void PropertyEditorView::auxiliaryDataChanged(const ModelNode &node,
|
|||||||
m_qmlBackEndForCurrentType->contextObject()->setInsightCategories(data.toStringList());
|
m_qmlBackEndForCurrentType->contextObject()->setInsightCategories(data.toStringList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PropertyEditorView::signalDeclarationPropertiesChanged(
|
||||||
|
const QVector<SignalDeclarationProperty> &propertyList, PropertyChangeFlags /* propertyChange */)
|
||||||
|
{
|
||||||
|
for (const SignalDeclarationProperty &property : propertyList)
|
||||||
|
m_dynamicPropertiesModel->updateItem(property);
|
||||||
|
}
|
||||||
|
|
||||||
void PropertyEditorView::instanceInformationsChanged(const QMultiHash<ModelNode, InformationName> &informationChangedHash)
|
void PropertyEditorView::instanceInformationsChanged(const QMultiHash<ModelNode, InformationName> &informationChangedHash)
|
||||||
{
|
{
|
||||||
if (noValidSelection())
|
if (noValidSelection())
|
||||||
|
@@ -59,6 +59,9 @@ public:
|
|||||||
AuxiliaryDataKeyView key,
|
AuxiliaryDataKeyView key,
|
||||||
const QVariant &data) override;
|
const QVariant &data) override;
|
||||||
|
|
||||||
|
void signalDeclarationPropertiesChanged(const QVector<SignalDeclarationProperty> &propertyList,
|
||||||
|
PropertyChangeFlags propertyChange) override;
|
||||||
|
|
||||||
void instanceInformationsChanged(const QMultiHash<ModelNode, InformationName> &informationChangedHash) override;
|
void instanceInformationsChanged(const QMultiHash<ModelNode, InformationName> &informationChangedHash) override;
|
||||||
|
|
||||||
void nodeIdChanged(const ModelNode& node, const QString& newId, const QString& oldId) override;
|
void nodeIdChanged(const ModelNode& node, const QString& newId, const QString& oldId) override;
|
||||||
|
Reference in New Issue
Block a user