From 639c050077c1212798034c3edcedc169a28ec18b Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 4 Apr 2016 06:52:49 +1000 Subject: [PATCH] Fix coverity uninitialized variable warnings --- src/app/qgsfieldsproperties.h | 2 ++ src/core/qgseditformconfig.h | 1 + src/gui/qgsattributeform.h | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/src/app/qgsfieldsproperties.h b/src/app/qgsfieldsproperties.h index 705c094f691..2189e862a21 100644 --- a/src/app/qgsfieldsproperties.h +++ b/src/app/qgsfieldsproperties.h @@ -54,11 +54,13 @@ class APP_EXPORT QgsFieldsProperties : public QWidget, private Ui_QgsFieldsPrope DesignerTreeItemData() : mType( Field ) + , mColumnCount( 1 ) {} DesignerTreeItemData( Type type, const QString& name ) : mType( type ) , mName( name ) + , mColumnCount( 1 ) {} QString name() const { return mName; } diff --git a/src/core/qgseditformconfig.h b/src/core/qgseditformconfig.h index 6b0d1ec47fb..abe6ff47308 100644 --- a/src/core/qgseditformconfig.h +++ b/src/core/qgseditformconfig.h @@ -105,6 +105,7 @@ class CORE_EXPORT QgsAttributeEditorContainer : public QgsAttributeEditorElement QgsAttributeEditorContainer( const QString& name, QObject *parent ) : QgsAttributeEditorElement( AeTypeContainer, name, parent ) , mIsGroupBox( true ) + , mColumnCount( 1 ) {} //! Destructor diff --git a/src/gui/qgsattributeform.h b/src/gui/qgsattributeform.h index 42d89dfea5f..d806f1f343b 100644 --- a/src/gui/qgsattributeform.h +++ b/src/gui/qgsattributeform.h @@ -187,6 +187,12 @@ class GUI_EXPORT QgsAttributeForm : public QWidget struct WidgetInfo { + WidgetInfo() + : widget( nullptr ) + , labelOnTop( false ) + , labelAlignRight( false ) + {} + QWidget* widget; QString labelText; bool labelOnTop;