summaryrefslogtreecommitdiffstats
path: root/profile-widget/qmlprofile.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-12-23 20:52:41 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-24 06:16:39 +0900
commit19b8c9a33ae8d29b189d06264d1e60c409373439 (patch)
tree3aa1726d61c46e98702baa84735aff312db73cc3 /profile-widget/qmlprofile.h
parent967f0e56d79c4c25e54619ef8f56770baa9edaa8 (diff)
downloadsubsurface-19b8c9a33ae8d29b189d06264d1e60c409373439.tar.gz
Cleanup: Turn QMLProfile::diveId from QString to int
This property is used to render the profile of a given dive. Weirdly, even though the diveId is an integer, it was stored as a string. It is not clear why that is the case. Therefore, turn into the more natural int and avoid unnecessary conversion. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/qmlprofile.h')
-rw-r--r--profile-widget/qmlprofile.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/profile-widget/qmlprofile.h b/profile-widget/qmlprofile.h
index 07c3e77cc..17a88ba04 100644
--- a/profile-widget/qmlprofile.h
+++ b/profile-widget/qmlprofile.h
@@ -8,7 +8,7 @@
class QMLProfile : public QQuickPaintedItem
{
Q_OBJECT
- Q_PROPERTY(QString diveId MEMBER m_diveId WRITE setDiveId)
+ Q_PROPERTY(int diveId MEMBER m_diveId WRITE setDiveId)
Q_PROPERTY(qreal devicePixelRatio READ devicePixelRatio WRITE setDevicePixelRatio NOTIFY devicePixelRatioChanged)
public:
@@ -16,8 +16,8 @@ public:
void paint(QPainter *painter);
- QString diveId() const;
- void setDiveId(const QString &diveId);
+ int diveId() const;
+ void setDiveId(int diveId);
qreal devicePixelRatio() const;
void setDevicePixelRatio(qreal dpr);
@@ -25,7 +25,7 @@ public slots:
void setMargin(int margin);
void screenChanged(QScreen *screen);
private:
- QString m_diveId;
+ int m_diveId;
qreal m_devicePixelRatio;
int m_margin;
QScopedPointer<ProfileWidget2> m_profileWidget;