summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--profile-widget/divetooltipitem.cpp10
-rw-r--r--profile-widget/profilewidget2.cpp1
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>