Address uninitialized member warnings

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-06-22 06:42:02 -07:00
parent 85dfb88f51
commit 1ecc9b0cc0
19 changed files with 50 additions and 18 deletions

View file

@ -57,7 +57,6 @@ protected:
void dragMoveEvent(QDragMoveEvent *event);
void dropEvent(QDropEvent *event);
private:
int currentDraggedIndex;
};
class ColumnDropCSVView : public QTableView {

View file

@ -12,7 +12,8 @@
DiveShareExportDialog::DiveShareExportDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::DiveShareExportDialog),
reply(NULL)
reply(NULL),
exportSelected(false)
{
ui->setupUi(this);
}

View file

@ -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();

View file

@ -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()));
}

View file

@ -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)
{
}

View file

@ -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);

View file

@ -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);

View file

@ -51,8 +51,6 @@ private:
QPointF startPoint, endPoint;
RulerNodeItem2 *source, *dest;
QString text;
int height;
int paint_direction;
DiveCartesianAxis *timeAxis;
DiveCartesianAxis *depthAxis;
QGraphicsRectItem *textItemBack;

View file

@ -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;
};

View file

@ -2,7 +2,9 @@
#include "yearlystatisticsmodel.h"
#include <QModelIndex>
YearlyStatisticsWidget::YearlyStatisticsWidget(QWidget *parent): QGraphicsView(parent)
YearlyStatisticsWidget::YearlyStatisticsWidget(QWidget *parent):
QGraphicsView(parent),
m_model(NULL)
{
}

View file

@ -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();
}

View file

@ -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;