summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-10-22 14:52:21 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-31 10:49:25 (GMT)
commit088fe949570ce31aba6d9b97a4084195cbb3b9e1 (patch)
treec5582c489900b423abfef4483cf11bef3ceaee61 /tools
parentd358986d73049a3fb104355529dc1ebd7a83472c (diff)
downloadQt-088fe949570ce31aba6d9b97a4084195cbb3b9e1.zip
Qt-088fe949570ce31aba6d9b97a4084195cbb3b9e1.tar.gz
Qt-088fe949570ce31aba6d9b97a4084195cbb3b9e1.tar.bz2
Fix resetting of string properties.
Task-number: QTBUG-34171 Change-Id: Ib5fe8194d891eb999e41bafde19834be56c84103 Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com> (cherry picked from qttools/78d8ee2513bdf52da2e0141be93dfe7bab8a1488)
Diffstat (limited to 'tools')
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertysheet.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
index f4eb518..09d2a2f 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
@@ -1202,6 +1202,12 @@ bool QDesignerPropertySheet::reset(int index)
const QVariant classNameDefaultV = d->m_object->property("_q_classname");
if (classNameDefaultV.isValid())
value.setValue(classNameDefaultV.toString());
+ } else if (!isAdditionalProperty(index)) {
+ const QDesignerMetaPropertyInterface *property = d->m_meta->property(index);
+ if ((property->accessFlags() & QDesignerMetaPropertyInterface::ResetAccess) && property->reset(d->m_object))
+ value.setValue(property->read(d->m_object).toString());
+ else
+ return false;
}
setProperty(index, QVariant::fromValue(value));
return true;