summaryrefslogtreecommitdiffstats
path: root/tools/designer
diff options
context:
space:
mode:
authorJarek Kobus <jkobus@trolltech.com>2010-03-15 13:37:40 (GMT)
committerJarek Kobus <jkobus@trolltech.com>2010-03-15 13:41:58 (GMT)
commit3ed25aafdf5a197e3e1ea9715997b698a394b99f (patch)
treef7faa4ea222b5543003bc9d7bbfc9af7abbb2c18 /tools/designer
parentdf285c2b98a305b38e878337a205e952ecb0a555 (diff)
downloadQt-3ed25aafdf5a197e3e1ea9715997b698a394b99f.zip
Qt-3ed25aafdf5a197e3e1ea9715997b698a394b99f.tar.gz
Qt-3ed25aafdf5a197e3e1ea9715997b698a394b99f.tar.bz2
Apply the stdset attribute for resource properties
In case of resource property we recreate a dom property using resource builder. We had forgot to apply stdset attribute for that case. Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Task-number: QTBUG-8881
Diffstat (limited to 'tools/designer')
-rw-r--r--tools/designer/src/lib/uilib/properties.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/designer/src/lib/uilib/properties.cpp b/tools/designer/src/lib/uilib/properties.cpp
index 8eccee1..615aa8a 100644
--- a/tools/designer/src/lib/uilib/properties.cpp
+++ b/tools/designer/src/lib/uilib/properties.cpp
@@ -655,16 +655,21 @@ DomProperty *variantToDomProperty(QAbstractFormBuilder *afb, const QMetaObject *
case QVariant::Brush:
dom_prop->setElementBrush(afb->saveBrush(qvariant_cast<QBrush>(v)));
break;
- default:
+ default: {
+ const bool hadAttributeStdset = dom_prop->hasAttributeStdset();
+ const bool attributeStdset = dom_prop->attributeStdset();
delete dom_prop;
if (afb->resourceBuilder()->isResourceType(v)) {
dom_prop = afb->resourceBuilder()->saveResource(afb->workingDirectory(), v);
- if (dom_prop)
+ if (dom_prop) {
dom_prop->setAttributeName(pname);
+ if (hadAttributeStdset)
+ dom_prop->setAttributeStdset(attributeStdset);
+ }
break;
}
uiLibWarning(msgCannotWriteProperty(pname, v));
- return 0;
+ } return 0;
}
return dom_prop;
}