diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-11-23 19:33:22 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-12-04 07:00:49 +0000 |
commit | b5e0d854bd22e56e1567d0e6dd89e9eb7035338f (patch) | |
tree | 532d2c4021d05f96428e787125f2d4729702607d /examples/widgets/itemviews/simpledommodel/domitem.h | |
parent | 1cfe064632099e036f964832c23afe266e54d59e (diff) |
Cleanup SimpleDomModel example
Cleanup the SimpleDomModel example:
- include own headers first
- use nullptr
- use const where possible
- init members in initialization list
Change-Id: If7029a774793927b9a3a9115ea4a7053402a86a1
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Diffstat (limited to 'examples/widgets/itemviews/simpledommodel/domitem.h')
-rw-r--r-- | examples/widgets/itemviews/simpledommodel/domitem.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/widgets/itemviews/simpledommodel/domitem.h b/examples/widgets/itemviews/simpledommodel/domitem.h index b5db16009c..4a74db5139 100644 --- a/examples/widgets/itemviews/simpledommodel/domitem.h +++ b/examples/widgets/itemviews/simpledommodel/domitem.h @@ -58,16 +58,16 @@ class DomItem { public: - DomItem(QDomNode &node, int row, DomItem *parent = 0); + DomItem(const QDomNode &node, int row, DomItem *parent = nullptr); ~DomItem(); DomItem *child(int i); DomItem *parent(); QDomNode node() const; - int row(); + int row() const; private: QDomNode domNode; - QHash<int,DomItem*> childItems; + QHash<int, DomItem *> childItems; DomItem *parentItem; int rowNumber; }; |