Hi,

The attached patches initialize some members in several classes of the
qt-ui package...

All the best,
Marcos
From ce09cbd713d75b768ac396433fa357034ee5b67c Mon Sep 17 00:00:00 2001
From: Marcos CARDINOT <[email protected]>
Date: Sun, 22 Mar 2015 23:14:12 -0300
Subject: [PATCH 1/8] Globe::doubleClick - initializes member

Non-static class member doubleClick is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Marcos CARDINOT <[email protected]>
---
 qt-ui/globe.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp
index ea0c0f2..9def70b 100644
--- a/qt-ui/globe.cpp
+++ b/qt-ui/globe.cpp
@@ -38,7 +38,8 @@ GlobeGPS::GlobeGPS(QWidget *parent) : MarbleWidget(parent),
 	fixZoomTimer(new QTimer(this)),
 	currentZoomLevel(0),
 	needResetZoom(false),
-	editingDiveLocation(false)
+	editingDiveLocation(false),
+	doubleClick(false)
 {
 #ifdef MARBLE_SUBSURFACE_BRANCH
 	// we need to make sure this gets called after the command line arguments have
-- 
1.9.1

From cb18220404353019dd18885f825a6760b863ed4f Mon Sep 17 00:00:00 2001
From: Marcos CARDINOT <[email protected]>
Date: Sun, 22 Mar 2015 23:26:21 -0300
Subject: [PATCH 2/8] UpdateManager::isAutomaticCheck - initializes member

Non-static class member isAutomaticCheck is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Marcos CARDINOT <[email protected]>
---
 qt-ui/updatemanager.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/qt-ui/updatemanager.cpp b/qt-ui/updatemanager.cpp
index 8a22400..da3d309 100644
--- a/qt-ui/updatemanager.cpp
+++ b/qt-ui/updatemanager.cpp
@@ -8,7 +8,8 @@
 #include "version.h"
 #include "mainwindow.h"
 
-UpdateManager::UpdateManager(QObject *parent) : QObject(parent)
+UpdateManager::UpdateManager(QObject *parent) : QObject(parent),
+						isAutomaticCheck(false)
 {
 	// is this the first time this version was run?
 	QSettings settings;
-- 
1.9.1

From b189fd50d0b046c039b91a87abd81de454067454 Mon Sep 17 00:00:00 2001
From: Marcos CARDINOT <[email protected]>
Date: Sun, 22 Mar 2015 23:44:54 -0300
Subject: [PATCH 3/8] DivelogsDeWebServices::multipart - initializes member

Non-static class member multipart is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Marcos CARDINOT <[email protected]>
---
 qt-ui/subsurfacewebservices.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp
index fcb565f..402b7ee 100644
--- a/qt-ui/subsurfacewebservices.cpp
+++ b/qt-ui/subsurfacewebservices.cpp
@@ -680,7 +680,7 @@ void DivelogsDeWebServices::uploadDives(QIODevice *dldContent)
 	}
 }
 
-DivelogsDeWebServices::DivelogsDeWebServices(QWidget *parent, Qt::WindowFlags f) : WebServices(parent, f), uploadMode(false)
+DivelogsDeWebServices::DivelogsDeWebServices(QWidget *parent, Qt::WindowFlags f) : WebServices(parent, f), multipart(NULL), uploadMode(false)
 {
 	QSettings s;
 	ui.userID->setText(s.value("divelogde_user").toString());
-- 
1.9.1

From 2b657552546ba2c98f0f357d1f65d6642c3098b2 Mon Sep 17 00:00:00 2001
From: Marcos CARDINOT <[email protected]>
Date: Mon, 23 Mar 2015 00:05:56 -0300
Subject: [PATCH 4/8] DivePlannerPointsModel::recalc - initilizes member

Non-static class member recalc is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Marcos CARDINOT <[email protected]>
---
 qt-ui/diveplanner.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index db00721..1325b17 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -722,6 +722,7 @@ int DivePlannerPointsModel::rowCount(const QModelIndex &parent) const
 
 DivePlannerPointsModel::DivePlannerPointsModel(QObject *parent) : QAbstractTableModel(parent),
 	mode(NOTHING),
+	recalc(false),
 	tempGFHigh(100),
 	tempGFLow(100)
 {
-- 
1.9.1

From 11d9947159ae3bf1518fef8c3c4ec7888251645b Mon Sep 17 00:00:00 2001
From: Marcos CARDINOT <[email protected]>
Date: Mon, 23 Mar 2015 00:09:57 -0300
Subject: [PATCH 5/8] DiveShareExportDialog::exportSelected - initilizes member

Non-static class member exportSelected is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Marcos CARDINOT <[email protected]>
---
 qt-ui/diveshareexportdialog.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qt-ui/diveshareexportdialog.cpp b/qt-ui/diveshareexportdialog.cpp
index 40670d7..9d51c0d 100644
--- a/qt-ui/diveshareexportdialog.cpp
+++ b/qt-ui/diveshareexportdialog.cpp
@@ -12,6 +12,7 @@
 DiveShareExportDialog::DiveShareExportDialog(QWidget *parent) :
 	QDialog(parent),
 	ui(new Ui::DiveShareExportDialog),
+	exportSelected(false),
 	reply(NULL)
 {
 	ui->setupUi(this);
-- 
1.9.1

From 91685e4dc308fecf4124da02d116396895de408e Mon Sep 17 00:00:00 2001
From: Marcos CARDINOT <[email protected]>
Date: Mon, 23 Mar 2015 00:16:17 -0300
Subject: [PATCH 6/8] filtermodels - initilize members + remove extra ;

Signed-off-by: Marcos CARDINOT <[email protected]>
---
 qt-ui/filtermodels.cpp | 2 +-
 qt-ui/filtermodels.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qt-ui/filtermodels.cpp b/qt-ui/filtermodels.cpp
index f44ab7c..7b20486 100644
--- a/qt-ui/filtermodels.cpp
+++ b/qt-ui/filtermodels.cpp
@@ -292,7 +292,7 @@ void LocationFilterModel::repopulate()
 	anyChecked = false;
 }
 
-MultiFilterSortModel::MultiFilterSortModel(QObject *parent) : QSortFilterProxyModel(parent), justCleared(false)
+MultiFilterSortModel::MultiFilterSortModel(QObject *parent) : QSortFilterProxyModel(parent), divesDisplayed(0), justCleared(false)
 {
 }
 
diff --git a/qt-ui/filtermodels.h b/qt-ui/filtermodels.h
index 1406b82..9d87241 100644
--- a/qt-ui/filtermodels.h
+++ b/qt-ui/filtermodels.h
@@ -6,7 +6,7 @@
 
 class MultiFilterInterface {
 public:
-	MultiFilterInterface() : checkState(NULL){};
+	MultiFilterInterface() : checkState(NULL), anyChecked(false) {}
 	virtual bool doFilter(struct dive *d, QModelIndex &index0, QAbstractItemModel *sourceModel) const = 0;
 	virtual void clearFilter() = 0;
 	bool *checkState;
-- 
1.9.1

From 7a9a6fc9a53175d676ce3a4b7bf4505105872c18 Mon Sep 17 00:00:00 2001
From: Marcos CARDINOT <[email protected]>
Date: Mon, 23 Mar 2015 00:24:53 -0300
Subject: [PATCH 7/8] models.cpp - initilize members

DiveTripModel::currentLayout
ProfilePrintModel::diveId
ProfilePrintModel::fontSize

Signed-off-by: Marcos CARDINOT <[email protected]>
---
 qt-ui/models.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 6376bb8..417a3d9 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -1410,9 +1410,8 @@ int DiveItem::weight() const
 	return tw.grams;
 }
 
-DiveTripModel::DiveTripModel(QObject *parent) : TreeModel(parent)
+DiveTripModel::DiveTripModel(QObject *parent) : TreeModel(parent), columns(COLUMNS), currentLayout(CURRENT)
 {
-	columns = COLUMNS;
 }
 
 Qt::ItemFlags DiveTripModel::flags(const QModelIndex &index) const
@@ -2062,7 +2061,7 @@ int TablePrintModel::columnCount(const QModelIndex &parent) const
  * ################################################################
  */
 
-ProfilePrintModel::ProfilePrintModel(QObject *parent)
+ProfilePrintModel::ProfilePrintModel(QObject *parent) : diveId(0), fontSize(7.0)
 {
 }
 
-- 
1.9.1

From 4e5cb7e637c8f9c125688a670085958aaaa36827 Mon Sep 17 00:00:00 2001
From: Marcos CARDINOT <[email protected]>
Date: Mon, 23 Mar 2015 00:28:11 -0300
Subject: [PATCH 8/8] PrintOptions::printOptions - initilizes member

Non-static class member printOptions is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Marcos CARDINOT <[email protected]>
---
 qt-ui/printoptions.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/printoptions.cpp b/qt-ui/printoptions.cpp
index d3e148c..8c70561 100644
--- a/qt-ui/printoptions.cpp
+++ b/qt-ui/printoptions.cpp
@@ -1,7 +1,7 @@
 #include "printoptions.h"
 #include "display.h"
 
-PrintOptions::PrintOptions(QWidget *parent, struct print_options *printOpt)
+PrintOptions::PrintOptions(QWidget *parent, struct print_options *printOpt) : printOptions(printOpt)
 {
 	hasSetupSlots = false;
 	ui.setupUi(this);
-- 
1.9.1

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to