From 98027be1c1895013bfc3c4071c5d61d10fb70092 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 25 Apr 2013 08:38:58 -0700 Subject: Minor cleanup of constructors and one accessor for DiveItem Suggested-by: Thiago Macieira Signed-off-by: Dirk Hohndel --- qt-ui/models.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qt-ui/models.cpp') 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& children() const { return childlist; } -- cgit v1.2.3-70-g09d2