diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-04-25 08:38:58 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-04-25 08:39:40 -0700 |
commit | 98027be1c1895013bfc3c4071c5d61d10fb70092 (patch) | |
tree | 90532bc6011ca5f5532ee79fc833ac25465187e9 /qt-ui | |
parent | 8a884d2cf7d7680bc2c94000954684e3b95d0c12 (diff) | |
download | subsurface-98027be1c1895013bfc3c4071c5d61d10fb70092.tar.gz |
Minor cleanup of constructors and one accessor for DiveItem
Suggested-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/models.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 7894aa279..2fbfa9f88 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -294,9 +294,9 @@ void TankInfoModel::update() class DiveItem { public: - explicit DiveItem(): dive() { parentItem = 0; } + DiveItem(): dive(NULL), parentItem(NULL) {} - explicit DiveItem(struct dive *d, DiveItem *parent = 0); + DiveItem(struct dive *d, DiveItem *parent = NULL); ~DiveItem() { qDeleteAll(childlist); } @@ -319,7 +319,7 @@ public: QString displayTemperature() const; QString displayWeight() const; QString displaySac() const; - const QString diveLocation() const { return dive->location; } + const QString diveLocation() const { return QString::fromUtf8(dive->location); } const QString diveSuit() const { return dive->suit; } DiveItem *parent() const { return parentItem; } const QList<DiveItem *>& children() const { return childlist; } |