Initialize data members in QML engine
authorMartin Jones <martin.jones@nokia.com>
Mon, 28 May 2012 23:04:05 +0000 (09:04 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 29 May 2012 01:15:27 +0000 (03:15 +0200)
Found by static analysis.  None look suspicious, but worthwhile cleaning
up.

Change-Id: Icb5046eb9e57493a9c68b3509ca0c7f546480b73
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
src/qml/qml/parser/qqmljsparser.cpp
src/qml/qml/qqmlcompiler.cpp
src/qml/qml/qqmlcompiler_p.h
src/qml/qml/qqmlpropertyvalueinterceptor.cpp

index bc89b2a..e2483c0 100644 (file)
@@ -85,6 +85,7 @@ Parser::Parser(Engine *engine):
     state_stack(0),
     location_stack(0),
     string_stack(0),
+    program(0),
     first_token(0),
     last_token(0)
 {
index 2e26d94..6e27995 100644 (file)
@@ -99,7 +99,7 @@ static QString qsTrId_string(QLatin1String("qsTrId"));
     Instantiate a new QQmlCompiler.
 */
 QQmlCompiler::QQmlCompiler(QQmlPool *pool)
-: pool(pool), output(0), engine(0), unitRoot(0), unit(0), cachedComponentTypeRef(-1),
+: compileState(0), pool(pool), output(0), engine(0), enginePrivate(0), unitRoot(0), unit(0), cachedComponentTypeRef(-1),
   cachedTranslationContextIndex(-1), componentStats(0)
 {
     if (compilerStatDump()) 
index c5d319c..f63c2cf 100644 (file)
@@ -437,7 +437,7 @@ private:
     // Compiler component statistics.  Only collected if QML_COMPILER_STATS=1
     struct ComponentStat
     {
-        ComponentStat() : ids(0), objects(0) {}
+        ComponentStat() : lineNumber(0), ids(0), objects(0) {}
 
         int lineNumber;
 
index 331b90d..31319db 100644 (file)
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
 /*!
     Constructs a QQmlPropertyValueInterceptor.
 */
-QQmlPropertyValueInterceptor::QQmlPropertyValueInterceptor()
+QQmlPropertyValueInterceptor::QQmlPropertyValueInterceptor() : m_next(0)
 {
 }