diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-06-17 18:59:50 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-06-17 18:59:50 -0300 |
commit | ae68ae38bbbc981aab4b8eaf1e84a15b8ab05bf4 (patch) | |
tree | 1b8cd2c26c573aa444f701ee0848a22d4ad1d8e0 /qt-ui/modeldelegates.cpp | |
parent | 14ccbbf6e87b69267426ae69c402c1bae70ec5d5 (diff) | |
download | subsurface-ae68ae38bbbc981aab4b8eaf1e84a15b8ab05bf4.tar.gz |
Changed a lot of code to reduce boilerplate on models in the future.
So, I changed a lot of code to reduce boilerplate on models in the
future. Currently we do not have a lot of models, but this can increase
quite rapdly. There's a second TreeModel in the works, the Yearly
Statistics, this patch will save around 250 LOC for this new model,
and more and more models will give us a greater saving.
Iwll do that for the table models in the future too - I did the tree
models now because they are the most complex case and I didn't wanted
to create a second tree model without this.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/modeldelegates.cpp')
-rw-r--r-- | qt-ui/modeldelegates.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp index 01f5197ce..3aeaa02b5 100644 --- a/qt-ui/modeldelegates.cpp +++ b/qt-ui/modeldelegates.cpp @@ -26,7 +26,7 @@ void StarWidgetsDelegate::paint(QPainter* painter, const QStyleOptionViewItem& o if (!index.isValid()) return; - QVariant value = index.model()->data(index, TreeItemDT::STAR_ROLE); + QVariant value = index.model()->data(index, DiveTripModel::STAR_ROLE); if (!value.isValid()) return; |