diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp index bdd7761e7f115df844aa74ac9b3f2189721b05f8..ada6f374a71403424951f3b1b0c13638f0d4fb9d 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp @@ -89,7 +89,7 @@ PropertyEditor::NodeType::NodeType(PropertyEditor *propertyEditor) : m_dummyPropertyEditorValue->setValue("#000000"); ctxt->setContextProperty("dummyBackendValue", m_dummyPropertyEditorValue.data()); - connect(&m_backendValuesPropertyMap, SIGNAL(valueChanged(const QString&)), propertyEditor, SLOT(changeValue(const QString&))); + connect(&m_backendValuesPropertyMap, SIGNAL(valueChanged(const QString&, const QVariant&)), propertyEditor, SLOT(changeValue(const QString&))); } PropertyEditor::NodeType::~NodeType() @@ -103,7 +103,7 @@ void setupPropertyEditorValue(const QString &name, QDeclarativePropertyMap *prop PropertyEditorValue *valueObject = qobject_cast<PropertyEditorValue*>(QDeclarativeMetaType::toQObject(propertyMap->value(propertyName))); if (!valueObject) { valueObject = new PropertyEditorValue(propertyMap); - QObject::connect(valueObject, SIGNAL(valueChanged(QString)), propertyMap, SIGNAL(valueChanged(QString))); + QObject::connect(valueObject, SIGNAL(valueChanged(QString, const QVariant&)), propertyMap, SIGNAL(valueChanged(QString, const QVariant&))); QObject::connect(valueObject, SIGNAL(expressionChanged(QString)), propertyEditor, SLOT(changeExpression(QString))); propertyMap->insert(propertyName, QVariant::fromValue(valueObject)); } @@ -122,7 +122,7 @@ void createPropertyEditorValue(const QmlObjectNode &fxObjectNode, const QString PropertyEditorValue *valueObject = qobject_cast<PropertyEditorValue*>(QDeclarativeMetaType::toQObject(propertyMap->value(propertyName))); if (!valueObject) { valueObject = new PropertyEditorValue(propertyMap); - QObject::connect(valueObject, SIGNAL(valueChanged(QString)), propertyMap, SIGNAL(valueChanged(QString))); + QObject::connect(valueObject, SIGNAL(valueChanged(QString, const QVariant&)), propertyMap, SIGNAL(valueChanged(QString, const QVariant&))); QObject::connect(valueObject, SIGNAL(expressionChanged(QString)), propertyEditor, SLOT(changeExpression(QString))); propertyMap->insert(propertyName, QVariant::fromValue(valueObject)); } @@ -175,7 +175,7 @@ void PropertyEditor::NodeType::setup(const QmlObjectNode &fxObjectNode, const QS valueObject->setName("className"); valueObject->setModelNode(fxObjectNode.modelNode()); valueObject->setValue(fxObjectNode.modelNode().simplifiedTypeName()); - QObject::connect(valueObject, SIGNAL(valueChanged(QString)), &m_backendValuesPropertyMap, SIGNAL(valueChanged(QString))); + QObject::connect(valueObject, SIGNAL(valueChanged(QString, const QVariant&)), &m_backendValuesPropertyMap, SIGNAL(valueChanged(QString, const QVariant&))); m_backendValuesPropertyMap.insert("className", QVariant::fromValue(valueObject)); // id @@ -184,7 +184,7 @@ void PropertyEditor::NodeType::setup(const QmlObjectNode &fxObjectNode, const QS valueObject = new PropertyEditorValue(&m_backendValuesPropertyMap); valueObject->setName("id"); valueObject->setValue(fxObjectNode.id()); - QObject::connect(valueObject, SIGNAL(valueChanged(QString)), &m_backendValuesPropertyMap, SIGNAL(valueChanged(QString))); + QObject::connect(valueObject, SIGNAL(valueChanged(QString, const QVariant&)), &m_backendValuesPropertyMap, SIGNAL(valueChanged(QString, const QVariant&))); m_backendValuesPropertyMap.insert("id", QVariant::fromValue(valueObject)); // anchors @@ -225,7 +225,7 @@ void PropertyEditor::NodeType::initialSetup(const QString &typeName, const QUrl valueObject->setName("className"); valueObject->setValue(typeName); - QObject::connect(valueObject, SIGNAL(valueChanged(QString)), &m_backendValuesPropertyMap, SIGNAL(valueChanged(QString))); + QObject::connect(valueObject, SIGNAL(valueChanged(QString, const QVariant&)), &m_backendValuesPropertyMap, SIGNAL(valueChanged(QString, const QVariant&))); m_backendValuesPropertyMap.insert("className", QVariant::fromValue(valueObject)); // id @@ -234,7 +234,7 @@ void PropertyEditor::NodeType::initialSetup(const QString &typeName, const QUrl valueObject = new PropertyEditorValue(&m_backendValuesPropertyMap); valueObject->setName("id"); valueObject->setValue("id"); - QObject::connect(valueObject, SIGNAL(valueChanged(QString)), &m_backendValuesPropertyMap, SIGNAL(valueChanged(QString))); + QObject::connect(valueObject, SIGNAL(valueChanged(QString, const QVariant&)), &m_backendValuesPropertyMap, SIGNAL(valueChanged(QString, const QVariant&))); m_backendValuesPropertyMap.insert("id", QVariant::fromValue(valueObject)); ctxt->setContextProperty("anchorBackend", &m_backendAnchorBinding); diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.h index b0b8c8781e0235df3393210f12f0efef307412fb..a0760f0acd4726a760a8cf433fb1f088fff1e2a1 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.h +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.h @@ -118,7 +118,7 @@ private slots: private: //functions QString qmlFileName(const NodeMetaInfo &nodeInfo) const; QUrl fileToUrl(const QString &filePath) const; - QUrl qmlForNode(const ModelNode &modelNode) const; + QUrl qmlForNode(const ModelNode &modelNode, QString &className) const; QString locateQmlFile(const QString &relativePath) const; void select(const ModelNode& node); diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp index 70aeb2ec95da0eab4325db5a1a7160c0a622f976..268cd78e7222dd95394dc0e92a864cac648cb715 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp @@ -86,7 +86,7 @@ void PropertyEditorValue::setValueWithEmit(const QVariant &value) return; setValue(newValue); m_isBound = false; - emit valueChanged(name()); + emit valueChanged(name(), value); emit isBoundChanged(); } } @@ -95,7 +95,7 @@ void PropertyEditorValue::setValue(const QVariant &value) { if ( m_value != value) { m_value = value; - emit valueChanged(QString()); + emit valueChanged(QString(), value); } emit isBoundChanged(); } @@ -183,7 +183,7 @@ void PropertyEditorValue::resetValue() if (m_value.isValid()) { setValue(QVariant()); m_isBound = false; - emit valueChanged(name()); + emit valueChanged(name(), QVariant()); } } @@ -308,11 +308,11 @@ void PropertyEditorNodeWrapper::setup() valueObject->setName(propertyName); valueObject->setValue(fxObjectNode.instanceValue(propertyName)); - connect(valueObject, SIGNAL(valueChanged(QString)), &m_valuesPropertyMap, SIGNAL(valueChanged(QString))); + connect(valueObject, SIGNAL(valueChanged(QString, const QVariant&)), &m_valuesPropertyMap, SIGNAL(valueChanged(QString, const QVariant&))); m_valuesPropertyMap.insert(propertyName, QVariant::fromValue(valueObject)); } } - connect(&m_valuesPropertyMap, SIGNAL(valueChanged(const QString &)), this, SLOT(changeValue(const QString&))); + connect(&m_valuesPropertyMap, SIGNAL(valueChanged(const QString &, const QVariant&)), this, SLOT(changeValue(const QString&))); emit propertiesChanged(); emit existsChanged(); diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h index a9c9e2824986e382ccbfbc9039de5128719156ae..9a81e17f25e4bf665fb074aae6c1693a6bccfea1 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.h @@ -123,7 +123,7 @@ public slots: void resetValue(); signals: - void valueChanged(const QString &name); + void valueChanged(const QString &name, const QVariant&); void expressionChanged(const QString &name);