aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-11-01 14:26:18 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-01 16:05:08 +0100
commit13ebff257cb56a32d688456634ea0ce6164232ba (patch)
tree0d66c0df48114b588f6d95271e31081240265c2d /tests/auto/qml/qqmlecmascript
parente1d2cafc060facfc3c211a3d90973451d5f2eb13 (diff)
Fix valgrind errors in tst_qqmlecmascript::revision
The QML code looks like this: MyRevisionedClass { prop1: prop2 } and MyRevisionedClass is C++ based. We need to return an initialized value when reading prop2. Change-Id: I33792c04aa1ba0d8e38c1351b8fb4de7abbe4891 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript')
-rw-r--r--tests/auto/qml/qqmlecmascript/testtypes.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlecmascript/testtypes.h b/tests/auto/qml/qqmlecmascript/testtypes.h
index 0fdcdafb95..52a619637c 100644
--- a/tests/auto/qml/qqmlecmascript/testtypes.h
+++ b/tests/auto/qml/qqmlecmascript/testtypes.h
@@ -993,7 +993,7 @@ class MyRevisionedClass : public MyRevisionedBaseClassUnregistered
Q_PROPERTY(qreal prop2 READ prop2 WRITE setProp2 NOTIFY prop2Changed REVISION 1)
public:
- MyRevisionedClass() {}
+ MyRevisionedClass() : m_p1(0), m_p2(0) {}
qreal prop1() const { return m_p1; }
void setProp1(qreal p) {