Commit b3119d19 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner: Using passive consistently in AbstractView api

Using "changed" for all methods of AbstractView.

Change-Id: Idd607d7e6087b83954b081fb49fd39e0bd196c3d
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent 414f49ea
......@@ -289,7 +289,7 @@ bool DebugView::hasWidget() const
return false;
}
void DebugView::instancePropertyChange(const QList<QPair<ModelNode, PropertyName> > &propertyList)
void DebugView::instancePropertyChanged(const QList<QPair<ModelNode, PropertyName> > &propertyList)
{
if (isDebugViewEnabled()) {
QTextStream message;
......@@ -308,7 +308,7 @@ void DebugView::instancePropertyChange(const QList<QPair<ModelNode, PropertyName
}
}
void DebugView::instanceErrorChange(const QVector<ModelNode> &/*errorNodeList*/)
void DebugView::instanceErrorChanged(const QVector<ModelNode> &/*errorNodeList*/)
{
}
......@@ -330,16 +330,16 @@ void DebugView::instancesCompleted(const QVector<ModelNode> &completedNodeList)
}
}
void DebugView::instanceInformationsChange(const QMultiHash<ModelNode, InformationName> &informationChangeHash)
void DebugView::instanceInformationsChanged(const QMultiHash<ModelNode, InformationName> &informationChangedHash)
{
if (isDebugViewEnabled()) {
QTextStream message;
QString string;
message.setString(&string);
foreach (const ModelNode &modelNode, informationChangeHash.keys()) {
foreach (const ModelNode &modelNode, informationChangedHash.keys()) {
message << modelNode;
message << informationChangeHash.value(modelNode);
message << informationChangedHash.value(modelNode);
}
logInstance(tr("Instance completed"), string);
......
......@@ -72,10 +72,10 @@ public:
WidgetInfo widgetInfo() override;
bool hasWidget() const override;
void instancePropertyChange(const QList<QPair<ModelNode, PropertyName> > &propertyList) override;
void instanceErrorChange(const QVector<ModelNode> &errorNodeList) override;
void instancePropertyChanged(const QList<QPair<ModelNode, PropertyName> > &propertyList) override;
void instanceErrorChanged(const QVector<ModelNode> &errorNodeList) override;
void instancesCompleted(const QVector<ModelNode> &completedNodeList) override;
void instanceInformationsChange(const QMultiHash<ModelNode, InformationName> &informationChangeHash) override;
void instanceInformationsChanged(const QMultiHash<ModelNode, InformationName> &informationChangedHash) override;
void instancesRenderImageChanged(const QVector<ModelNode> &nodeList) override;
void instancesPreviewImageChanged(const QVector<ModelNode> &nodeList) override;
void instancesChildrenChanged(const QVector<ModelNode> &nodeList) override;
......
......@@ -413,15 +413,15 @@ void FormEditorView::instancesCompleted(const QVector<ModelNode> &completedNodeL
currentTool()->instancesCompleted(itemNodeList);
}
void FormEditorView::instanceInformationsChange(const QMultiHash<ModelNode, InformationName> &informationChangeHash)
void FormEditorView::instanceInformationsChanged(const QMultiHash<ModelNode, InformationName> &informationChangedHash)
{
QList<FormEditorItem*> itemNodeList;
foreach (const ModelNode &node, informationChangeHash.keys().toSet()) {
foreach (const ModelNode &node, informationChangedHash.keys().toSet()) {
QmlItemNode qmlItemNode(node);
if (qmlItemNode.isValid() && scene()->hasItemForQmlItemNode(qmlItemNode)) {
scene()->synchronizeTransformation(qmlItemNode);
if (qmlItemNode.isRootModelNode() && informationChangeHash.values(node).contains(Size)) {
if (qmlItemNode.isRootModelNode() && informationChangedHash.values(node).contains(Size)) {
if (qmlItemNode.instanceBoundingRect().isEmpty() &&
!(qmlItemNode.propertyAffectedByCurrentState("width")
&& qmlItemNode.propertyAffectedByCurrentState("height"))) {
......@@ -523,7 +523,7 @@ QmlItemNode findRecursiveQmlItemNode(const QmlObjectNode &firstQmlObjectNode)
return QmlItemNode();
}
void FormEditorView::instancePropertyChange(const QList<QPair<ModelNode, PropertyName> > &propertyList)
void FormEditorView::instancePropertyChanged(const QList<QPair<ModelNode, PropertyName> > &propertyList)
{
typedef QPair<ModelNode, PropertyName> NodePropertyPair;
foreach (const NodePropertyPair &nodePropertyPair, propertyList) {
......
......@@ -98,10 +98,10 @@ public:
void auxiliaryDataChanged(const ModelNode &node, const PropertyName &name, const QVariant &data) override;
void instancesCompleted(const QVector<ModelNode> &completedNodeList) override;
void instanceInformationsChange(const QMultiHash<ModelNode, InformationName> &informationChangeHash) override;
void instanceInformationsChanged(const QMultiHash<ModelNode, InformationName> &informationChangedHash) override;
void instancesRenderImageChanged(const QVector<ModelNode> &nodeList) override;
void instancesChildrenChanged(const QVector<ModelNode> &nodeList) override;
void instancePropertyChange(const QList<QPair<ModelNode, PropertyName> > &propertyList) override;
void instancePropertyChanged(const QList<QPair<ModelNode, PropertyName> > &propertyList) override;
void rewriterBeginTransaction() override;
void rewriterEndTransaction() override;
......
......@@ -254,7 +254,7 @@ void NavigatorView::auxiliaryDataChanged(const ModelNode &modelNode, const Prope
}
}
void NavigatorView::instanceErrorChange(const QVector<ModelNode> &errorNodeList)
void NavigatorView::instanceErrorChanged(const QVector<ModelNode> &errorNodeList)
{
foreach (const ModelNode &currentModelNode, errorNodeList)
m_treeModel->updateItemRow(currentModelNode);
......
......@@ -69,7 +69,7 @@ public:
void selectedNodesChanged(const QList<ModelNode> &selectedNodeList ,
const QList<ModelNode> &lastSelectedNodeList) override;
void auxiliaryDataChanged(const ModelNode &node, const PropertyName &name, const QVariant &data) override;
void instanceErrorChange(const QVector<ModelNode> &errorNodeList) override;
void instanceErrorChanged(const QVector<ModelNode> &errorNodeList) override;
void bindingPropertiesChanged(const QList<BindingProperty> &propertyList, PropertyChangeFlags) override;
......
......@@ -627,13 +627,13 @@ void PropertyEditorView::bindingPropertiesChanged(const QList<BindingProperty>&
}
}
void PropertyEditorView::instanceInformationsChange(const QMultiHash<ModelNode, InformationName> &informationChangeHash)
void PropertyEditorView::instanceInformationsChanged(const QMultiHash<ModelNode, InformationName> &informationChangedHash)
{
if (!m_selectedNode.isValid())
return;
m_locked = true;
QList<InformationName> informationNameList = informationChangeHash.values(m_selectedNode);
QList<InformationName> informationNameList = informationChangedHash.values(m_selectedNode);
if (informationNameList.contains(Anchor)
|| informationNameList.contains(HasAnchor))
m_qmlBackEndForCurrentType->backendAnchorBinding().setup(QmlItemNode(m_selectedNode));
......@@ -687,7 +687,7 @@ void PropertyEditorView::currentStateChanged(const ModelNode &node)
delayedResetView();
}
void PropertyEditorView::instancePropertyChange(const QList<QPair<ModelNode, PropertyName> > &propertyList)
void PropertyEditorView::instancePropertyChanged(const QList<QPair<ModelNode, PropertyName> > &propertyList)
{
if (!m_selectedNode.isValid())
return;
......
......@@ -71,13 +71,13 @@ public:
void variantPropertiesChanged(const QList<VariantProperty>& propertyList, PropertyChangeFlags propertyChange) override;
void bindingPropertiesChanged(const QList<BindingProperty>& propertyList, PropertyChangeFlags propertyChange) override;
void instanceInformationsChange(const QMultiHash<ModelNode, InformationName> &informationChangeHash) override;
void instanceInformationsChanged(const QMultiHash<ModelNode, InformationName> &informationChangedHash) override;
void nodeIdChanged(const ModelNode& node, const QString& newId, const QString& oldId) override;
void resetView();
void currentStateChanged(const ModelNode &node) override;
void instancePropertyChange(const QList<QPair<ModelNode, PropertyName> > &propertyList) override;
void instancePropertyChanged(const QList<QPair<ModelNode, PropertyName> > &propertyList) override;
void rootNodeTypeChanged(const QString &type, int majorVersion, int minorVersion) override;
......
......@@ -195,10 +195,10 @@ public:
virtual void signalHandlerPropertiesChanged(const QVector<SignalHandlerProperty>& propertyList, PropertyChangeFlags propertyChange);
virtual void rootNodeTypeChanged(const QString &type, int majorVersion, int minorVersion);
virtual void instancePropertyChange(const QList<QPair<ModelNode, PropertyName> > &propertyList);
virtual void instanceErrorChange(const QVector<ModelNode> &errorNodeList);
virtual void instancePropertyChanged(const QList<QPair<ModelNode, PropertyName> > &propertyList);
virtual void instanceErrorChanged(const QVector<ModelNode> &errorNodeList);
virtual void instancesCompleted(const QVector<ModelNode> &completedNodeList);
virtual void instanceInformationsChange(const QMultiHash<ModelNode, InformationName> &informationChangeHash);
virtual void instanceInformationsChanged(const QMultiHash<ModelNode, InformationName> &informationChangeHash);
virtual void instancesRenderImageChanged(const QVector<ModelNode> &nodeList);
virtual void instancesPreviewImageChanged(const QVector<ModelNode> &nodeList);
virtual void instancesChildrenChanged(const QVector<ModelNode> &nodeList);
......
......@@ -188,11 +188,11 @@ void AbstractView::modelAboutToBeDetached(Model *)
Empty properties were removed.
*/
void AbstractView::instancePropertyChange(const QList<QPair<ModelNode, PropertyName> > &/*propertyList*/)
void AbstractView::instancePropertyChanged(const QList<QPair<ModelNode, PropertyName> > &/*propertyList*/)
{
}
void AbstractView::instanceInformationsChange(const QMultiHash<ModelNode, InformationName> &/*informationChangeHash*/)
void AbstractView::instanceInformationsChanged(const QMultiHash<ModelNode, InformationName> &/*informationChangeHash*/)
{
}
......@@ -224,7 +224,7 @@ void AbstractView::rewriterEndTransaction()
{
}
void AbstractView::instanceErrorChange(const QVector<ModelNode> &/*errorNodeList*/)
void AbstractView::instanceErrorChanged(const QVector<ModelNode> &/*errorNodeList*/)
{
}
......
......@@ -426,7 +426,7 @@ void ModelPrivate::notifyInstancePropertyChange(const QList<QPair<ModelNode, Pro
adaptedPropertyList.append(newPair);
}
view->instancePropertyChange(adaptedPropertyList);
view->instancePropertyChanged(adaptedPropertyList);
}
}
......@@ -439,7 +439,7 @@ void ModelPrivate::notifyInstanceErrorChange(const QVector<qint32> &instanceIds)
Q_ASSERT(view != 0);
foreach (qint32 instanceId, instanceIds)
errorNodeList.append(ModelNode(model()->d->nodeForInternalId(instanceId), model(), view));
view->instanceErrorChange(errorNodeList);
view->instanceErrorChanged(errorNodeList);
}
}
......@@ -490,7 +490,7 @@ void ModelPrivate::notifyInstancesInformationsChange(const QMultiHash<ModelNode,
try {
if (rewriterView())
rewriterView()->instanceInformationsChange(convertModelNodeInformationHash(informationChangeHash, rewriterView()));
rewriterView()->instanceInformationsChanged(convertModelNodeInformationHash(informationChangeHash, rewriterView()));
} catch (const RewritingException &e) {
description = e.description();
resetModel = true;
......@@ -498,11 +498,11 @@ void ModelPrivate::notifyInstancesInformationsChange(const QMultiHash<ModelNode,
foreach (const QPointer<AbstractView> &view, m_viewList) {
Q_ASSERT(view != 0);
view->instanceInformationsChange(convertModelNodeInformationHash(informationChangeHash, view.data()));
view->instanceInformationsChanged(convertModelNodeInformationHash(informationChangeHash, view.data()));
}
if (nodeInstanceView())
nodeInstanceView()->instanceInformationsChange(convertModelNodeInformationHash(informationChangeHash, nodeInstanceView()));
nodeInstanceView()->instanceInformationsChanged(convertModelNodeInformationHash(informationChangeHash, nodeInstanceView()));
if (resetModel)
resetModelByRewriter(description);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment