profilewidget: remove QSettings

Update profilewidget to use qPrefDisplay (amended variable)

Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
jan Iversen 2018-08-15 17:04:51 +02:00 committed by Dirk Hohndel
parent ebc0e6d3f3
commit 31eb48c3c2
2 changed files with 2 additions and 9 deletions

View file

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

View file

@ -36,7 +36,6 @@
#include <QInputDialog>
#include <QDebug>
#include <QWheelEvent>
#include <QSettings>
#include <QMenu>
#include <QElapsedTimer>