aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--profile-widget/diveprofileitem.cpp2
-rw-r--r--profile-widget/diveprofileitem.h6
-rw-r--r--profile-widget/profilewidget2.cpp2
-rw-r--r--profile-widget/profilewidget2.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp
index 932586f12..ef47b0d59 100644
--- a/profile-widget/diveprofileitem.cpp
+++ b/profile-widget/diveprofileitem.cpp
@@ -999,7 +999,7 @@ void PartialPressureGasItem::paint(QPainter *painter, const QStyleOptionGraphics
painter->restore();
}
-void PartialPressureGasItem::setThresholdSettingsKey(double *prefPointerMin, double *prefPointerMax)
+void PartialPressureGasItem::setThresholdSettingsKey(const double *prefPointerMin, const double *prefPointerMax)
{
thresholdPtrMin = prefPointerMin;
thresholdPtrMax = prefPointerMax;
diff --git a/profile-widget/diveprofileitem.h b/profile-widget/diveprofileitem.h
index 3b9a49e82..f09c101d1 100644
--- a/profile-widget/diveprofileitem.h
+++ b/profile-widget/diveprofileitem.h
@@ -213,14 +213,14 @@ public:
PartialPressureGasItem();
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
- void setThresholdSettingsKey(double *prefPointerMin, double *prefPointerMax);
+ void setThresholdSettingsKey(const double *prefPointerMin, const double *prefPointerMax);
void setVisibilitySettingsKey(const QString &setVisibilitySettingsKey);
void setColors(const QColor &normalColor, const QColor &alertColor);
private:
QVector<QPolygonF> alertPolygons;
- double *thresholdPtrMin;
- double *thresholdPtrMax;
+ const double *thresholdPtrMin;
+ const double *thresholdPtrMax;
QString visibilityKey;
QColor normalColor;
QColor alertColor;
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index ac1af3951..ee462e8f5 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -378,7 +378,7 @@ void ProfileWidget2::replot(struct dive *d)
}
void ProfileWidget2::createPPGas(PartialPressureGasItem *item, int verticalColumn, color_index_t color, color_index_t colorAlert,
- double *thresholdSettingsMin, double *thresholdSettingsMax)
+ const double *thresholdSettingsMin, const double *thresholdSettingsMax)
{
setupItem(item, gasYAxis, verticalColumn, DivePlotDataModel::TIME, 0);
item->setThresholdSettingsKey(thresholdSettingsMin, thresholdSettingsMax);
diff --git a/profile-widget/profilewidget2.h b/profile-widget/profilewidget2.h
index 170019269..b7cdc8e66 100644
--- a/profile-widget/profilewidget2.h
+++ b/profile-widget/profilewidget2.h
@@ -171,7 +171,7 @@ private: /*methods*/
struct plot_data *getEntryFromPos(QPointF pos);
void addActionShortcut(const Qt::Key shortcut, void (ProfileWidget2::*slot)());
void createPPGas(PartialPressureGasItem *item, int verticalColumn, color_index_t color, color_index_t colorAlert,
- double *thresholdSettingsMin, double *thresholdSettingsMax);
+ const double *thresholdSettingsMin, const double *thresholdSettingsMax);
void clearPictures();
private:
DivePlotDataModel *dataModel;