summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qproperty.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h
index 9ee7a1ef3f..8b400e7285 100644
--- a/src/corelib/kernel/qproperty.h
+++ b/src/corelib/kernel/qproperty.h
@@ -651,10 +651,12 @@ public:
T value() const
{
- T result;
- if (iface)
+ if (iface) {
+ T result;
iface->getter(data, &result);
- return result;
+ return result;
+ }
+ return T{};
}
void setValue(const T &value)