summaryrefslogtreecommitdiffstats
path: root/tools/designer
diff options
context:
space:
mode:
Diffstat (limited to 'tools/designer')
-rw-r--r--tools/designer/src/components/propertyeditor/propertyeditor.cpp4
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertyeditor.cpp16
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h8
3 files changed, 23 insertions, 5 deletions
diff --git a/tools/designer/src/components/propertyeditor/propertyeditor.cpp b/tools/designer/src/components/propertyeditor/propertyeditor.cpp
index ea7f148..9c4a925 100644
--- a/tools/designer/src/components/propertyeditor/propertyeditor.cpp
+++ b/tools/designer/src/components/propertyeditor/propertyeditor.cpp
@@ -1175,11 +1175,11 @@ void PropertyEditor::slotValueChanged(QtProperty *property, const QVariant &valu
Q_ASSERT(ok);
QVariant v;
qVariantSetValue(v, e);
- emit propertyValueChanged(property->propertyName(), v, true);
+ emitPropertyValueChanged(property->propertyName(), v, true);
return;
}
- emit propertyValueChanged(property->propertyName(), value, enableSubPropertyHandling);
+ emitPropertyValueChanged(property->propertyName(), value, enableSubPropertyHandling);
}
bool PropertyEditor::isDynamicProperty(const QtBrowserItem* item) const
diff --git a/tools/designer/src/lib/shared/qdesigner_propertyeditor.cpp b/tools/designer/src/lib/shared/qdesigner_propertyeditor.cpp
index 3c1a2b5..e550308 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertyeditor.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_propertyeditor.cpp
@@ -92,7 +92,8 @@ static const PropertyNameTypeMap &stringPropertyTypes()
}
QDesignerPropertyEditor::QDesignerPropertyEditor(QWidget *parent, Qt::WindowFlags flags) :
- QDesignerPropertyEditorInterface(parent, flags)
+ QDesignerPropertyEditorInterface(parent, flags),
+ m_propertyChangedForwardingBlocked(false)
{
// Make old signal work for compatibility
connect(this, SIGNAL(propertyChanged(QString,QVariant)), this, SLOT(slotPropertyChanged(QString,QVariant)));
@@ -147,9 +148,20 @@ QDesignerPropertyEditor::StringPropertyParameters QDesignerPropertyEditor::textP
return StringPropertyParameters(ValidationSingleLine, true);
}
+void QDesignerPropertyEditor::emitPropertyValueChanged(const QString &name, const QVariant &value, bool enableSubPropertyHandling)
+{
+ // Avoid duplicate signal emission - see below
+ m_propertyChangedForwardingBlocked = true;
+ emit propertyValueChanged(name, value, enableSubPropertyHandling);
+ emit propertyChanged(name, value);
+ m_propertyChangedForwardingBlocked = false;
+}
+
void QDesignerPropertyEditor::slotPropertyChanged(const QString &name, const QVariant &value)
{
- emit propertyValueChanged(name, value, true);
+ // Forward signal from Integration using the old interfaces.
+ if (!m_propertyChangedForwardingBlocked)
+ emit propertyValueChanged(name, value, true);
}
}
diff --git a/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h b/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h
index 14ee983..27092fa 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h
+++ b/tools/designer/src/lib/shared/qdesigner_propertyeditor_p.h
@@ -79,7 +79,6 @@ public:
static StringPropertyParameters textPropertyValidationMode(QDesignerFormEditorInterface *core,
const QObject *object, const QString &propertyName, bool isMainContainer);
-
Q_SIGNALS:
void propertyValueChanged(const QString &name, const QVariant &value, bool enableSubPropertyHandling);
void resetProperty(const QString &name);
@@ -97,6 +96,13 @@ public Q_SLOTS:
private Q_SLOTS:
void slotPropertyChanged(const QString &name, const QVariant &value);
+
+protected:
+ void emitPropertyValueChanged(const QString &name, const QVariant &value, bool enableSubPropertyHandling);
+
+private:
+ bool m_propertyChangedForwardingBlocked;
+
};
} // namespace qdesigner_internal