summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-22 06:42:02 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-22 10:57:51 -0700
commit1ecc9b0cc0c4e7ad2b03236a788cf875189f1832 (patch)
tree15c9c28c046032e22a5ae155b59aa6f502c08848 /qt-ui
parent85dfb88f51098158a5fac52ce432a07625374c70 (diff)
downloadsubsurface-1ecc9b0cc0c4e7ad2b03236a788cf875189f1832.tar.gz
Address uninitialized member warnings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/divelogimportdialog.h1
-rw-r--r--qt-ui/diveshareexportdialog.cpp3
-rw-r--r--qt-ui/printdialog.cpp1
-rw-r--r--qt-ui/profile/divecartesianaxis.cpp4
-rw-r--r--qt-ui/profile/diveprofileitem.cpp7
-rw-r--r--qt-ui/profile/profilewidget2.cpp2
-rw-r--r--qt-ui/profile/ruleritem.cpp6
-rw-r--r--qt-ui/profile/ruleritem.h2
-rw-r--r--qt-ui/profile/tankitem.h2
-rw-r--r--qt-ui/statistics/statisticswidget.cpp4
-rw-r--r--qt-ui/subsurfacewebservices.cpp4
-rw-r--r--qt-ui/updatemanager.cpp4
12 files changed, 28 insertions, 12 deletions
diff --git a/qt-ui/divelogimportdialog.h b/qt-ui/divelogimportdialog.h
index e7d068a81..3be267f2c 100644
--- a/qt-ui/divelogimportdialog.h
+++ b/qt-ui/divelogimportdialog.h
@@ -57,7 +57,6 @@ protected:
void dragMoveEvent(QDragMoveEvent *event);
void dropEvent(QDropEvent *event);
private:
- int currentDraggedIndex;
};
class ColumnDropCSVView : public QTableView {
diff --git a/qt-ui/diveshareexportdialog.cpp b/qt-ui/diveshareexportdialog.cpp
index 40670d7fc..27436c66f 100644
--- a/qt-ui/diveshareexportdialog.cpp
+++ b/qt-ui/diveshareexportdialog.cpp
@@ -12,7 +12,8 @@
DiveShareExportDialog::DiveShareExportDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::DiveShareExportDialog),
- reply(NULL)
+ reply(NULL),
+ exportSelected(false)
{
ui->setupUi(this);
}
diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp
index 848183882..4a3314691 100644
--- a/qt-ui/printdialog.cpp
+++ b/qt-ui/printdialog.cpp
@@ -21,6 +21,7 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f
printOptions.color_selected = true;
printOptions.landscape = false;
printOptions.p_template = print_options::ONE_DIVE;
+ printOptions.type = print_options::DIVELIST;
} else {
s.beginGroup(SETTINGS_GROUP);
printOptions.type = (print_options::print_type)s.value("type").toInt();
diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp
index 41d94a9a0..46f1a9656 100644
--- a/qt-ui/profile/divecartesianaxis.cpp
+++ b/qt-ui/profile/divecartesianaxis.cpp
@@ -407,7 +407,9 @@ QString TemperatureAxis::textForValue(double value)
return QString::number(mkelvin_to_C((int)value));
}
-PartialGasPressureAxis::PartialGasPressureAxis()
+PartialGasPressureAxis::PartialGasPressureAxis() :
+ DiveCartesianAxis(),
+ model(NULL)
{
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
}
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp
index 373dd0027..5ae46003c 100644
--- a/qt-ui/profile/diveprofileitem.cpp
+++ b/qt-ui/profile/diveprofileitem.cpp
@@ -917,7 +917,9 @@ void PartialPressureGasItem::modelDataChanged(const QModelIndex &topLeft, const
alertPolygons.clear();
QSettings s;
s.beginGroup("TecDetails");
- double threshold = *thresholdPtr;
+ double threshold = 0.0;
+ if (thresholdPtr)
+ threshold = *thresholdPtr;
bool inAlertFragment = false;
for (int i = 0; i < dataModel->rowCount(); i++, entry++) {
double value = dataModel->index(i, vDataColumn).data().toDouble();
@@ -962,7 +964,8 @@ void PartialPressureGasItem::setThreshouldSettingsKey(double *prefPointer)
thresholdPtr = prefPointer;
}
-PartialPressureGasItem::PartialPressureGasItem()
+PartialPressureGasItem::PartialPressureGasItem() :
+ thresholdPtr(NULL)
{
}
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 9d9bb076c..d422f93f5 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -1777,6 +1777,8 @@ void ProfileWidget2::plotPictures()
y = 10;
else if (fabs(x - lastX) < 4)
y = lastY + 3;
+ else
+ y = 10;
lastX = x;
lastY = y;
item->setPos(x, y);
diff --git a/qt-ui/profile/ruleritem.cpp b/qt-ui/profile/ruleritem.cpp
index d5742ef1d..830985552 100644
--- a/qt-ui/profile/ruleritem.cpp
+++ b/qt-ui/profile/ruleritem.cpp
@@ -8,7 +8,11 @@
#include "profile.h"
-RulerNodeItem2::RulerNodeItem2() : entry(NULL), ruler(NULL)
+RulerNodeItem2::RulerNodeItem2() :
+ entry(NULL),
+ ruler(NULL),
+ timeAxis(NULL),
+ depthAxis(NULL)
{
memset(&pInfo, 0, sizeof(pInfo));
setRect(-8, -8, 16, 16);
diff --git a/qt-ui/profile/ruleritem.h b/qt-ui/profile/ruleritem.h
index 5d144f286..4fad0451c 100644
--- a/qt-ui/profile/ruleritem.h
+++ b/qt-ui/profile/ruleritem.h
@@ -51,8 +51,6 @@ private:
QPointF startPoint, endPoint;
RulerNodeItem2 *source, *dest;
QString text;
- int height;
- int paint_direction;
DiveCartesianAxis *timeAxis;
DiveCartesianAxis *depthAxis;
QGraphicsRectItem *textItemBack;
diff --git a/qt-ui/profile/tankitem.h b/qt-ui/profile/tankitem.h
index 907bc0e34..2ea8e0e57 100644
--- a/qt-ui/profile/tankitem.h
+++ b/qt-ui/profile/tankitem.h
@@ -32,7 +32,7 @@ private:
struct dive diveCylinderStore;
struct plot_data *pInfoEntry;
int pInfoNr;
- qreal yPos, height;
+ qreal height;
QBrush air, nitrox, oxygen, trimix;
QList<QGraphicsRectItem *> rects;
};
diff --git a/qt-ui/statistics/statisticswidget.cpp b/qt-ui/statistics/statisticswidget.cpp
index 9143c290c..3e91fa317 100644
--- a/qt-ui/statistics/statisticswidget.cpp
+++ b/qt-ui/statistics/statisticswidget.cpp
@@ -2,7 +2,9 @@
#include "yearlystatisticsmodel.h"
#include <QModelIndex>
-YearlyStatisticsWidget::YearlyStatisticsWidget(QWidget *parent): QGraphicsView(parent)
+YearlyStatisticsWidget::YearlyStatisticsWidget(QWidget *parent):
+ QGraphicsView(parent),
+ m_model(NULL)
{
}
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp
index 969025d9a..c7d8da0eb 100644
--- a/qt-ui/subsurfacewebservices.cpp
+++ b/qt-ui/subsurfacewebservices.cpp
@@ -941,7 +941,9 @@ QNetworkReply* UserSurveyServices::sendSurvey(QString values)
return reply;
}
-CloudStorageAuthenticate::CloudStorageAuthenticate(QObject *parent) : QObject(parent)
+CloudStorageAuthenticate::CloudStorageAuthenticate(QObject *parent) :
+ QObject(parent),
+ reply(NULL)
{
userAgent = getUserAgent();
}
diff --git a/qt-ui/updatemanager.cpp b/qt-ui/updatemanager.cpp
index 8a22400b9..e634a6bc9 100644
--- a/qt-ui/updatemanager.cpp
+++ b/qt-ui/updatemanager.cpp
@@ -8,7 +8,9 @@
#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;