Commit 4f03ea96 authored by Tim Jenssen's avatar Tim Jenssen

QmlDesigner: fix uninitialzed value warnings

Change-Id: Ieddd83953b2009656ceecea2f9fedecd54ac9ac8
Reviewed-by: default avatarRobert Loehning <robert.loehning@qt.io>
Reviewed-by: Thomas Hartmann's avatarThomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 432e0c54
...@@ -41,7 +41,6 @@ static TypeName properDelemitingOfType(const TypeName &typeName) ...@@ -41,7 +41,6 @@ static TypeName properDelemitingOfType(const TypeName &typeName)
} }
InstanceContainer::InstanceContainer() InstanceContainer::InstanceContainer()
: m_instanceId(-1), m_majorNumber(-1), m_minorNumber(-1)
{ {
} }
......
...@@ -67,14 +67,14 @@ public: ...@@ -67,14 +67,14 @@ public:
NodeMetaType metaType() const; NodeMetaType metaType() const;
private: private:
qint32 m_instanceId; qint32 m_instanceId = -1;
TypeName m_type; TypeName m_type;
qint32 m_majorNumber; qint32 m_majorNumber = -1;
qint32 m_minorNumber; qint32 m_minorNumber = -1;
QString m_componentPath; QString m_componentPath;
QString m_nodeSource; QString m_nodeSource;
qint32 m_nodeSourceType; qint32 m_nodeSourceType = 0;
qint32 m_metaType; qint32 m_metaType = 0;
}; };
QDebug operator <<(QDebug debug, const InstanceContainer &command); QDebug operator <<(QDebug debug, const InstanceContainer &command);
......
...@@ -231,7 +231,7 @@ private: ...@@ -231,7 +231,7 @@ private:
QString m_typeName; QString m_typeName;
QString m_itemId; QString m_itemId;
const ObjectValue *m_typeValue; const ObjectValue *m_typeValue = nullptr;
bool m_insideObject = false; bool m_insideObject = false;
}; };
......
...@@ -30,15 +30,13 @@ ...@@ -30,15 +30,13 @@
namespace QmlDesigner { namespace QmlDesigner {
SelectionContext::SelectionContext() : SelectionContext::SelectionContext()
m_toggled(false)
{ {
} }
SelectionContext::SelectionContext(AbstractView *view) : SelectionContext::SelectionContext(AbstractView *view) :
m_view(view), m_view(view)
m_toggled(false)
{ {
} }
......
...@@ -65,9 +65,9 @@ public: ...@@ -65,9 +65,9 @@ public:
private: private:
QPointer<AbstractView> m_view; QPointer<AbstractView> m_view;
ModelNode m_targetNode; ModelNode m_targetNode;
bool m_showSelectionTools; bool m_showSelectionTools = false;
QPointF m_scenePosition; QPointF m_scenePosition;
bool m_toggled; bool m_toggled = false;
}; };
} //QmlDesigner } //QmlDesigner
...@@ -57,8 +57,8 @@ private: ...@@ -57,8 +57,8 @@ private:
QPointF m_sourceAnchorLineSecondPoint; QPointF m_sourceAnchorLineSecondPoint;
QPointF m_targetAnchorLineFirstPoint; QPointF m_targetAnchorLineFirstPoint;
QPointF m_targetAnchorLineSecondPoint; QPointF m_targetAnchorLineSecondPoint;
AnchorLineType m_sourceAnchorLineType; AnchorLineType m_sourceAnchorLineType = AnchorLineInvalid;
AnchorLineType m_targetAnchorLineType; AnchorLineType m_targetAnchorLineType = AnchorLineInvalid;
QRectF m_boundingRect; QRectF m_boundingRect;
}; };
......
...@@ -45,7 +45,7 @@ protected: ...@@ -45,7 +45,7 @@ protected:
private: private:
QmlJS::Document::MutablePtr m_document; QmlJS::Document::MutablePtr m_document;
quint32 m_location; quint32 m_location = 0;
QString m_text; QString m_text;
}; };
......
...@@ -48,7 +48,7 @@ protected: ...@@ -48,7 +48,7 @@ protected:
private: private:
QmlJS::Document::MutablePtr m_doc; QmlJS::Document::MutablePtr m_doc;
quint32 m_offset; quint32 m_offset;
QmlJS::AST::UiObjectDefinition *m_firstObjectDefinition; QmlJS::AST::UiObjectDefinition *m_firstObjectDefinition = nullptr;
}; };
......
...@@ -67,8 +67,8 @@ private: ...@@ -67,8 +67,8 @@ private:
bool toEnd; bool toEnd;
quint32 beforeObjectLocation; quint32 beforeObjectLocation;
QmlJS::AST::UiObjectDefinition *movingObject; QmlJS::AST::UiObjectDefinition *movingObject = nullptr;
QmlJS::AST::UiObjectDefinition *beforeObject; QmlJS::AST::UiObjectDefinition *beforeObject = nullptr;
ASTPath movingObjectParents; ASTPath movingObjectParents;
}; };
......
...@@ -45,8 +45,8 @@ protected: ...@@ -45,8 +45,8 @@ protected:
private: private:
QmlJS::Document::MutablePtr m_doc; QmlJS::Document::MutablePtr m_doc;
quint32 m_offset; quint32 m_offset = 0;
quint32 m_length; quint32 m_length = 0;
}; };
} // namespace QmlDesigner } // namespace QmlDesigner
...@@ -193,7 +193,6 @@ private: //variables ...@@ -193,7 +193,6 @@ private: //variables
QHash<ModelNode, NodeInstance> m_nodeInstanceHash; QHash<ModelNode, NodeInstance> m_nodeInstanceHash;
QHash<ModelNode, QImage> m_statePreviewImage; QHash<ModelNode, QImage> m_statePreviewImage;
uint m_blockUpdates;
QPointer<NodeInstanceServerInterface> m_nodeInstanceServer; QPointer<NodeInstanceServerInterface> m_nodeInstanceServer;
QImage m_baseStatePreviewImage; QImage m_baseStatePreviewImage;
QTime m_lastCrashTime; QTime m_lastCrashTime;
......
...@@ -150,7 +150,7 @@ private: ...@@ -150,7 +150,7 @@ private:
QStringList m_scriptFunctionList; QStringList m_scriptFunctionList;
QString m_nodeSource; QString m_nodeSource;
int m_nodeSourceType; int m_nodeSourceType = 0;
}; };
uint qHash(const InternalNodePointer& node); uint qHash(const InternalNodePointer& node);
......
...@@ -54,7 +54,7 @@ private: ...@@ -54,7 +54,7 @@ private:
QPointer<AbstractView> m_view; QPointer<AbstractView> m_view;
QByteArray m_identifier; QByteArray m_identifier;
mutable bool m_valid; mutable bool m_valid;
int m_identifierNumber; int m_identifierNumber = 0;
static QList<QByteArray> m_identifierList; static QList<QByteArray> m_identifierList;
static bool m_activeIdentifier; static bool m_activeIdentifier;
bool m_ignoreSemanticChecks = false; bool m_ignoreSemanticChecks = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment