diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2017-12-23 15:25:54 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-12-24 08:24:11 -0800 |
commit | 668635e98eb32e3c5ffd3cb3e65da51c71db2975 (patch) | |
tree | dc2356729fdac453a412c5c00c785c19c651ac23 /desktop-widgets/mainwindow.ui | |
parent | 7eed752ba15bcb152d448868d2d291abde8748aa (diff) | |
download | subsurface-668635e98eb32e3c5ffd3cb3e65da51c71db2975.tar.gz |
Move *FilterModel functions into base class
The *FilterModels had a number of of virtual functions, which only
accessed members of the base class. Moreover, these functions were
identical and generated with macros. Therefore, move these functions
to the base class.
The one excption is data(), which uses different count functions
(passed as a macro parameter). Thus, introduce a virtual countDives()
function and likewise move data() to the base class. A function pointer
might be even more clear, but since the rest of the code/Qt relies
heavily on runtime polymorphism, let's do the same here.
The only macros left are those creating the singleton accessors.
This could be more clearly realized by templates, but let's
likewise keep it the way is.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/mainwindow.ui')
0 files changed, 0 insertions, 0 deletions