diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2016-01-11 15:02:13 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-01-11 15:44:10 -0800 |
commit | ed97f9f3158fbf90f241fad8418de138bd242ef2 (patch) | |
tree | c29f69fb039ed69243421adf07146198831b1f54 | |
parent | 9e85d767668faec8feec51ed00ed7c5b3db90cb3 (diff) | |
download | subsurface-ed97f9f3158fbf90f241fad8418de138bd242ef2.tar.gz |
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>
-rw-r--r-- | subsurface-core/subsurface-qt/DiveObjectHelper.cpp | 4 | ||||
-rw-r--r-- | subsurface-core/subsurface-qt/DiveObjectHelper.h | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp index 7db882da2..94ba93726 100644 --- a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp +++ b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp @@ -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 diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.h b/subsurface-core/subsurface-qt/DiveObjectHelper.h index 5f6cdf60b..ee51b0ee3 100644 --- a/subsurface-core/subsurface-qt/DiveObjectHelper.h +++ b/subsurface-core/subsurface-qt/DiveObjectHelper.h @@ -62,7 +62,6 @@ public: QString otu() const; private: - int m_number; int m_id; int m_rating; QString m_date; |