OSDN Git Service

QmlDesigner.propertyEditor: only show writable properties
authorThomas Hartmann <Thomas.Hartmann@nokia.com>
Mon, 6 Dec 2010 16:39:08 +0000 (17:39 +0100)
committerThomas Hartmann <Thomas.Hartmann@nokia.com>
Mon, 6 Dec 2010 16:46:31 +0000 (17:46 +0100)
src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp

index 3a7f6b2..4577735 100644 (file)
@@ -588,7 +588,7 @@ QString templateGeneration(NodeMetaInfo type, NodeMetaInfo superType, const QmlO
             if (typeName == QLatin1String("alias") && objectNode.isValid())
                 typeName = objectNode.instanceType(name);
 
-        if (!superType.hasProperty(name)) {
+        if (!superType.hasProperty(name) && type.propertyIsWritable(name)) {
             if (typeName == "int") {
                 qmlTemplate +=  QString(QLatin1String(
                 "IntEditor { backendValue: backendValues.%2\n caption: \"%1\"\nbaseStateFlag: isBaseState\nslider: false\n}"