Simplify: QML code handling series

The connection between the C++ core and the QML code leaves a lot of room
for improvement; the following series will do small but important updates
on the code regarding QML and QtWidget coexistence and behavior.

First: simplify wrapper class, removing uneeded variable.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2016-01-11 15:02:13 -02:00 committed by Dirk Hohndel
parent 9e85d76766
commit ed97f9f315
2 changed files with 2 additions and 3 deletions

View file

@ -33,7 +33,7 @@ static QString getFormattedCylinder(struct dive *dive, unsigned int idx)
return fmt;
}
DiveObjectHelper::DiveObjectHelper(struct dive *d) : m_number(d->number),
DiveObjectHelper::DiveObjectHelper(struct dive *d) :
m_id(d->id),
m_rating(d->rating),
m_timestamp(d->when),
@ -128,7 +128,7 @@ DiveObjectHelper::~DiveObjectHelper()
int DiveObjectHelper::number() const
{
return m_number;
return m_dive->number;
}
int DiveObjectHelper::id() const

View file

@ -62,7 +62,6 @@ public:
QString otu() const;
private:
int m_number;
int m_id;
int m_rating;
QString m_date;