aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-03-08 16:04:26 +0100
committerLars Knoll <lars.knoll@qt.io>2018-03-08 16:22:40 +0000
commit4838687eaa63de6e4d6821f14cf865a13af9ebc1 (patch)
treec2586c240b71f634a2968e6ce8269b354370f8e3
parentc6a26c248e8abc421b87c3dd6b2466d490ea902e (diff)
Initialize all members of QQmlPropertyDatav5.11.0-beta2
This lead to quite a few valgrind warnings in test cases. Change-Id: Icef0fc5f93a68e4fe67e1ecd4755b456ad4778a9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/qml/qml/qqmlpropertycache_p.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h
index 51a191a41f..b78a2ddd20 100644
--- a/src/qml/qml/qqmlpropertycache_p.h
+++ b/src/qml/qml/qqmlpropertycache_p.h
@@ -81,6 +81,7 @@ template <typename T> class QQmlPropertyCacheAliasCreator;
// We have this somewhat awful split between RawData and Data so that RawData can be
// used in unions. In normal code, you should always use Data which initializes RawData
// to an invalid state on construction.
+// ### We should be able to remove this split nowadays
class QQmlPropertyRawData
{
public:
@@ -273,20 +274,20 @@ public:
private:
Flags _flags;
- qint16 _coreIndex;
- quint16 _propType;
+ qint16 _coreIndex = 0;
+ quint16 _propType = 0;
// The notify index is in the range returned by QObjectPrivate::signalIndex().
// This is different from QMetaMethod::methodIndex().
- qint16 _notifyIndex;
- qint16 _overrideIndex;
+ qint16 _notifyIndex = 0;
+ qint16 _overrideIndex = 0;
- quint8 _revision;
- quint8 _typeMinorVersion;
- qint16 _metaObjectOffset;
+ quint8 _revision = 0;
+ quint8 _typeMinorVersion = 0;
+ qint16 _metaObjectOffset = 0;
- QQmlPropertyCacheMethodArguments *_arguments;
- StaticMetaCallFunction _staticMetaCallFunction;
+ QQmlPropertyCacheMethodArguments *_arguments = nullptr;
+ StaticMetaCallFunction _staticMetaCallFunction = nullptr;
friend class QQmlPropertyData;
friend class QQmlPropertyCache;