aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvaluetypewrapper.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@theqtcompany.com>2015-05-22 13:03:25 +0200
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2015-06-03 04:29:06 +0000
commitdb9be0a9d6195bc52415ce28d605ace149d02782 (patch)
treea1b0dd262e53a08f7015efc8fb8a32ad0b82db9e /src/qml/qml/qqmlvaluetypewrapper.cpp
parentdb525935ccd64d2c5c674f8a66dbe7096d754e9f (diff)
Add left, right, top and bottom properties to basic QML rect type.
Task-number: QTBUG-45528 Task-number: QTBUG-45530 Change-Id: I83c4056b4bde37ef2dc4424ffddd823c1654d92e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlvaluetypewrapper.cpp')
-rw-r--r--src/qml/qml/qqmlvaluetypewrapper.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlvaluetypewrapper.cpp b/src/qml/qml/qqmlvaluetypewrapper.cpp
index 67092438a7..e87d9ede77 100644
--- a/src/qml/qml/qqmlvaluetypewrapper.cpp
+++ b/src/qml/qml/qqmlvaluetypewrapper.cpp
@@ -315,10 +315,12 @@ ReturnedValue QQmlValueTypeWrapper::method_toString(CallContext *ctx)
const QMetaObject *mo = w->d()->propertyCache->metaObject();
const int propCount = mo->propertyCount();
for (int i = 0; i < propCount; ++i) {
- QVariant value = mo->property(i).readOnGadget(w->d()->gadgetPtr);
- result += value.toString();
- if (i < propCount - 1)
- result += QStringLiteral(", ");
+ if (mo->property(i).isDesignable()) {
+ QVariant value = mo->property(i).readOnGadget(w->d()->gadgetPtr);
+ if (i > 0)
+ result += QLatin1String(", ");
+ result += value.toString();
+ }
}
result += QLatin1Char(')');
}