mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Address uninitialized member warnings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
85dfb88f51
commit
1ecc9b0cc0
19 changed files with 50 additions and 18 deletions
|
@ -1540,7 +1540,9 @@ void ReadSettingsThread::run()
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteSettingsThread::WriteSettingsThread(QObject *parent, device_data_t *data) : DeviceThread(parent, data)
|
WriteSettingsThread::WriteSettingsThread(QObject *parent, device_data_t *data) :
|
||||||
|
DeviceThread(parent, data),
|
||||||
|
m_deviceDetails(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ Printer::Printer(QPrinter *printer, print_options *printOptions)
|
||||||
{
|
{
|
||||||
this->printer = printer;
|
this->printer = printer;
|
||||||
this->printOptions = printOptions;
|
this->printOptions = printOptions;
|
||||||
|
dpi = 0;
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,10 @@
|
||||||
#include "graphicsview-common.h"
|
#include "graphicsview-common.h"
|
||||||
#include "divelist.h"
|
#include "divelist.h"
|
||||||
|
|
||||||
DivePlotDataModel::DivePlotDataModel(QObject *parent) : QAbstractTableModel(parent), diveId(0)
|
DivePlotDataModel::DivePlotDataModel(QObject *parent) :
|
||||||
|
QAbstractTableModel(parent),
|
||||||
|
diveId(0),
|
||||||
|
dcNr(0)
|
||||||
{
|
{
|
||||||
memset(&pInfo, 0, sizeof(pInfo));
|
memset(&pInfo, 0, sizeof(pInfo));
|
||||||
}
|
}
|
||||||
|
|
|
@ -350,7 +350,9 @@ int DiveItem::weight() const
|
||||||
return tw.grams;
|
return tw.grams;
|
||||||
}
|
}
|
||||||
|
|
||||||
DiveTripModel::DiveTripModel(QObject *parent) : TreeModel(parent)
|
DiveTripModel::DiveTripModel(QObject *parent) :
|
||||||
|
TreeModel(parent),
|
||||||
|
currentLayout(TREE)
|
||||||
{
|
{
|
||||||
columns = COLUMNS;
|
columns = COLUMNS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -292,7 +292,11 @@ void LocationFilterModel::repopulate()
|
||||||
anyChecked = false;
|
anyChecked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
MultiFilterSortModel::MultiFilterSortModel(QObject *parent) : QSortFilterProxyModel(parent), justCleared(false), curr_dive_site(NULL)
|
MultiFilterSortModel::MultiFilterSortModel(QObject *parent) :
|
||||||
|
QSortFilterProxyModel(parent),
|
||||||
|
justCleared(false),
|
||||||
|
curr_dive_site(NULL),
|
||||||
|
divesDisplayed(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
ProfilePrintModel::ProfilePrintModel(QObject *parent)
|
ProfilePrintModel::ProfilePrintModel(QObject *parent)
|
||||||
{
|
{
|
||||||
|
fontSize = 12.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProfilePrintModel::setDive(struct dive *divePtr)
|
void ProfilePrintModel::setDive(struct dive *divePtr)
|
||||||
|
|
|
@ -57,7 +57,6 @@ protected:
|
||||||
void dragMoveEvent(QDragMoveEvent *event);
|
void dragMoveEvent(QDragMoveEvent *event);
|
||||||
void dropEvent(QDropEvent *event);
|
void dropEvent(QDropEvent *event);
|
||||||
private:
|
private:
|
||||||
int currentDraggedIndex;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ColumnDropCSVView : public QTableView {
|
class ColumnDropCSVView : public QTableView {
|
||||||
|
|
|
@ -12,7 +12,8 @@
|
||||||
DiveShareExportDialog::DiveShareExportDialog(QWidget *parent) :
|
DiveShareExportDialog::DiveShareExportDialog(QWidget *parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
ui(new Ui::DiveShareExportDialog),
|
ui(new Ui::DiveShareExportDialog),
|
||||||
reply(NULL)
|
reply(NULL),
|
||||||
|
exportSelected(false)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f
|
||||||
printOptions.color_selected = true;
|
printOptions.color_selected = true;
|
||||||
printOptions.landscape = false;
|
printOptions.landscape = false;
|
||||||
printOptions.p_template = print_options::ONE_DIVE;
|
printOptions.p_template = print_options::ONE_DIVE;
|
||||||
|
printOptions.type = print_options::DIVELIST;
|
||||||
} else {
|
} else {
|
||||||
s.beginGroup(SETTINGS_GROUP);
|
s.beginGroup(SETTINGS_GROUP);
|
||||||
printOptions.type = (print_options::print_type)s.value("type").toInt();
|
printOptions.type = (print_options::print_type)s.value("type").toInt();
|
||||||
|
|
|
@ -407,7 +407,9 @@ QString TemperatureAxis::textForValue(double value)
|
||||||
return QString::number(mkelvin_to_C((int)value));
|
return QString::number(mkelvin_to_C((int)value));
|
||||||
}
|
}
|
||||||
|
|
||||||
PartialGasPressureAxis::PartialGasPressureAxis()
|
PartialGasPressureAxis::PartialGasPressureAxis() :
|
||||||
|
DiveCartesianAxis(),
|
||||||
|
model(NULL)
|
||||||
{
|
{
|
||||||
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -917,7 +917,9 @@ void PartialPressureGasItem::modelDataChanged(const QModelIndex &topLeft, const
|
||||||
alertPolygons.clear();
|
alertPolygons.clear();
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup("TecDetails");
|
s.beginGroup("TecDetails");
|
||||||
double threshold = *thresholdPtr;
|
double threshold = 0.0;
|
||||||
|
if (thresholdPtr)
|
||||||
|
threshold = *thresholdPtr;
|
||||||
bool inAlertFragment = false;
|
bool inAlertFragment = false;
|
||||||
for (int i = 0; i < dataModel->rowCount(); i++, entry++) {
|
for (int i = 0; i < dataModel->rowCount(); i++, entry++) {
|
||||||
double value = dataModel->index(i, vDataColumn).data().toDouble();
|
double value = dataModel->index(i, vDataColumn).data().toDouble();
|
||||||
|
@ -962,7 +964,8 @@ void PartialPressureGasItem::setThreshouldSettingsKey(double *prefPointer)
|
||||||
thresholdPtr = prefPointer;
|
thresholdPtr = prefPointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
PartialPressureGasItem::PartialPressureGasItem()
|
PartialPressureGasItem::PartialPressureGasItem() :
|
||||||
|
thresholdPtr(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1777,6 +1777,8 @@ void ProfileWidget2::plotPictures()
|
||||||
y = 10;
|
y = 10;
|
||||||
else if (fabs(x - lastX) < 4)
|
else if (fabs(x - lastX) < 4)
|
||||||
y = lastY + 3;
|
y = lastY + 3;
|
||||||
|
else
|
||||||
|
y = 10;
|
||||||
lastX = x;
|
lastX = x;
|
||||||
lastY = y;
|
lastY = y;
|
||||||
item->setPos(x, y);
|
item->setPos(x, y);
|
||||||
|
|
|
@ -8,7 +8,11 @@
|
||||||
|
|
||||||
#include "profile.h"
|
#include "profile.h"
|
||||||
|
|
||||||
RulerNodeItem2::RulerNodeItem2() : entry(NULL), ruler(NULL)
|
RulerNodeItem2::RulerNodeItem2() :
|
||||||
|
entry(NULL),
|
||||||
|
ruler(NULL),
|
||||||
|
timeAxis(NULL),
|
||||||
|
depthAxis(NULL)
|
||||||
{
|
{
|
||||||
memset(&pInfo, 0, sizeof(pInfo));
|
memset(&pInfo, 0, sizeof(pInfo));
|
||||||
setRect(-8, -8, 16, 16);
|
setRect(-8, -8, 16, 16);
|
||||||
|
|
|
@ -51,8 +51,6 @@ private:
|
||||||
QPointF startPoint, endPoint;
|
QPointF startPoint, endPoint;
|
||||||
RulerNodeItem2 *source, *dest;
|
RulerNodeItem2 *source, *dest;
|
||||||
QString text;
|
QString text;
|
||||||
int height;
|
|
||||||
int paint_direction;
|
|
||||||
DiveCartesianAxis *timeAxis;
|
DiveCartesianAxis *timeAxis;
|
||||||
DiveCartesianAxis *depthAxis;
|
DiveCartesianAxis *depthAxis;
|
||||||
QGraphicsRectItem *textItemBack;
|
QGraphicsRectItem *textItemBack;
|
||||||
|
|
|
@ -32,7 +32,7 @@ private:
|
||||||
struct dive diveCylinderStore;
|
struct dive diveCylinderStore;
|
||||||
struct plot_data *pInfoEntry;
|
struct plot_data *pInfoEntry;
|
||||||
int pInfoNr;
|
int pInfoNr;
|
||||||
qreal yPos, height;
|
qreal height;
|
||||||
QBrush air, nitrox, oxygen, trimix;
|
QBrush air, nitrox, oxygen, trimix;
|
||||||
QList<QGraphicsRectItem *> rects;
|
QList<QGraphicsRectItem *> rects;
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
#include "yearlystatisticsmodel.h"
|
#include "yearlystatisticsmodel.h"
|
||||||
#include <QModelIndex>
|
#include <QModelIndex>
|
||||||
|
|
||||||
YearlyStatisticsWidget::YearlyStatisticsWidget(QWidget *parent): QGraphicsView(parent)
|
YearlyStatisticsWidget::YearlyStatisticsWidget(QWidget *parent):
|
||||||
|
QGraphicsView(parent),
|
||||||
|
m_model(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -941,7 +941,9 @@ QNetworkReply* UserSurveyServices::sendSurvey(QString values)
|
||||||
return reply;
|
return reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
CloudStorageAuthenticate::CloudStorageAuthenticate(QObject *parent) : QObject(parent)
|
CloudStorageAuthenticate::CloudStorageAuthenticate(QObject *parent) :
|
||||||
|
QObject(parent),
|
||||||
|
reply(NULL)
|
||||||
{
|
{
|
||||||
userAgent = getUserAgent();
|
userAgent = getUserAgent();
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,9 @@
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "mainwindow.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?
|
// is this the first time this version was run?
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
|
|
@ -16,7 +16,8 @@ int getTotalWork()
|
||||||
return dives;
|
return dives;
|
||||||
}
|
}
|
||||||
|
|
||||||
TemplateLayout::TemplateLayout(print_options *PrintOptions)
|
TemplateLayout::TemplateLayout(print_options *PrintOptions) :
|
||||||
|
m_engine(NULL)
|
||||||
{
|
{
|
||||||
this->PrintOptions = PrintOptions;
|
this->PrintOptions = PrintOptions;
|
||||||
}
|
}
|
||||||
|
@ -80,7 +81,9 @@ QString TemplateLayout::generate()
|
||||||
return htmlContent;
|
return htmlContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dive::Dive()
|
Dive::Dive() :
|
||||||
|
m_number(-1),
|
||||||
|
dive(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue