mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 12:03:23 +00:00
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:
parent
9e85d76766
commit
ed97f9f315
2 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -62,7 +62,6 @@ public:
|
|||
QString otu() const;
|
||||
|
||||
private:
|
||||
int m_number;
|
||||
int m_id;
|
||||
int m_rating;
|
||||
QString m_date;
|
||||
|
|
Loading…
Add table
Reference in a new issue