mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
967f0e56d7
commit
19b8c9a33a
2 changed files with 8 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue