diff options
author | jan Iversen <jani@apache.org> | 2018-08-15 17:04:51 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-25 11:49:47 -0700 |
commit | 31eb48c3c2e718b17c0986bea184b5325c5f579a (patch) | |
tree | 5918980dc2c4eb2f12d1301b460f0438334d33ce /profile-widget | |
parent | ebc0e6d3f3edb90851295399dd22e081fe00a0c8 (diff) | |
download | subsurface-31eb48c3c2e718b17c0986bea184b5325c5f579a.tar.gz |
profilewidget: remove QSettings
Update profilewidget to use qPrefDisplay (amended variable)
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'profile-widget')
-rw-r--r-- | profile-widget/divetooltipitem.cpp | 10 | ||||
-rw-r--r-- | profile-widget/profilewidget2.cpp | 1 |
2 files changed, 2 insertions, 9 deletions
diff --git a/profile-widget/divetooltipitem.cpp b/profile-widget/divetooltipitem.cpp index 363382324..d1bda0a01 100644 --- a/profile-widget/divetooltipitem.cpp +++ b/profile-widget/divetooltipitem.cpp @@ -6,7 +6,6 @@ #include "core/metrics.h" #include "core/settings/qPrefDisplay.h" #include <QPropertyAnimation> -#include <QSettings> #include <QGraphicsView> #include <QStyleOptionGraphicsItem> #include "core/qthelper.h" @@ -207,17 +206,12 @@ void ToolTipItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *optio void ToolTipItem::persistPos() { - QSettings s; - s.beginGroup("ProfileMap"); - s.setValue("tooltip_position", pos()); - s.endGroup(); + qPrefDisplay::set_tooltip_position(pos()); } void ToolTipItem::readPos() { - QSettings s; - s.beginGroup("ProfileMap"); - QPointF value = s.value("tooltip_position").toPoint(); + QPointF value = qPrefDisplay::tooltip_position(); if (!scene()->sceneRect().contains(value)) { value = QPointF(0, 0); } diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 9155b7511..ac1af3951 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -36,7 +36,6 @@ #include <QInputDialog> #include <QDebug> #include <QWheelEvent> -#include <QSettings> #include <QMenu> #include <QElapsedTimer> |