summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-25 08:38:58 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-25 08:39:40 -0700
commit98027be1c1895013bfc3c4071c5d61d10fb70092 (patch)
tree90532bc6011ca5f5532ee79fc833ac25465187e9 /qt-ui
parent8a884d2cf7d7680bc2c94000954684e3b95d0c12 (diff)
downloadsubsurface-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.cpp6
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; }