summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-06-18 13:29:37 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-06-18 13:31:12 -0700
commit0a9205276586deb0ec000bb211384e2d415eb38b (patch)
tree8faf63501868a3b0adb6f10bd5b9fa2dd52e6bfc /qt-ui/models.h
parent370673cc999f9738f247d1c0544ab49733c25a39 (diff)
downloadsubsurface-0a9205276586deb0ec000bb211384e2d415eb38b.tar.gz
Fix yearly statistics
This commit fixes two issues. One is that there were situations where the code would read an uninitialized parent pointer, the second was that instead of the monthly statistics the tree view would show the yearly statistics again under the yearly entries. I assume that the second part of the fix (initializing the parent pointers) actually takes care of both of them (that patch was suggested by Tomaz), but the first part that just makes sure the pointer is at least initialized to NULL seems to be at least not harmful, so I kept it as well. With this the yearly / monthly statistics seem to be pretty much at feature parity. Fixes: #115 Suggested-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.h')
-rw-r--r--qt-ui/models.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/models.h b/qt-ui/models.h
index 35ed529e3..f6fb3f5c0 100644
--- a/qt-ui/models.h
+++ b/qt-ui/models.h
@@ -128,7 +128,7 @@ struct TreeItem {
Q_DECLARE_TR_FUNCTIONS (TreeItemDT);
public:
virtual ~TreeItem();
-
+ TreeItem();
virtual QVariant data (int column, int role) const;
int row() const;
QList<TreeItem*> children;