mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Minor cleanup of constructors and one accessor for DiveItem
Suggested-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8a884d2cf7
commit
98027be1c1
1 changed files with 3 additions and 3 deletions
|
@ -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; }
|
||||
|
|
Loading…
Add table
Reference in a new issue