subsurface/qt-models
Jan Mulder fed2c5b6a1 mobile cleanup: unduplicate code and do not loop over dives (1)
This is the first of a set of commits that are (very) similar.
It appeared that a number of more or less static lists, which are
constructed by a loop over all dives in the logbook, were executed
when changing focus to a next dive. For example, the in this
commit addressed list of used dive suits.

What was wrong was that the suitList was linked to a dive. There
is only a need to construct the list of used suits when data is
changed (and obviously, once on startup of the app). Further, it
appeared that a lot of code was duplicated and that we can use
(in this case) the same code from the desktop completionmodels.cpp.

Basically, this commit involves the following changes:
- include completionmodels.cpp in mobile and desktop (so move
it from the desktop only category to the generic category).
- remove double code from DiveObjectHelper.cpp
- Do not differentiate in the init phase and the normal refresh
of the list
- the per dive logic is now only the getting of a previously
constructed list (in init or update of the divelist).

There are no visible changes in the UI, other than a better
performance when scrolling over dive details.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-01-31 14:48:14 +01:00
..
cleanertablemodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
cleanertablemodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
CMakeLists.txt mobile cleanup: unduplicate code and do not loop over dives (1) 2018-01-31 14:48:14 +01:00
completionmodels.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
completionmodels.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
cylindermodel.cpp Initialise cylinder start pressure with working pressure 2018-01-26 07:04:45 +01:00
cylindermodel.h Planner: Autom. move first datapoint gas to first gaslist position 2017-10-16 17:14:17 +02:00
divecomputerextradatamodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
divecomputerextradatamodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
divecomputermodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
divecomputermodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
diveimportedmodel.cpp Only call autogroup when it's enabled 2017-11-25 08:12:28 -08:00
diveimportedmodel.h QML UI: clear the previous list when downloading 2017-06-16 01:22:44 -07:00
divelistmodel.cpp mobile: fix crash on delete dive from divelist 2018-01-10 20:34:16 +01:00
divelistmodel.h mobile: fix crash on delete dive from divelist 2018-01-10 20:34:16 +01:00
divelocationmodel.cpp Use better aliases for icons. 2017-11-30 23:14:46 -08:00
divelocationmodel.h Remove unused method LocationInformationModel::addDiveSite() 2017-11-26 23:37:01 +01:00
divepicturemodel.cpp beginInsertRows requires last >= first 2017-12-24 08:25:21 -08:00
divepicturemodel.h Implement different zoom levels for dive photos tab 2017-12-18 12:07:10 -08:00
diveplannermodel.cpp Initialise cylinder start pressure with working pressure 2018-01-26 07:04:45 +01:00
diveplannermodel.h Move function to proper place 2018-01-10 11:04:24 +01:00
diveplotdatamodel.cpp Typo: indice -> index 2018-01-10 21:25:02 +01:00
diveplotdatamodel.h Unused code: remove CCRMax() and used macro 2018-01-10 16:45:42 +01:00
divetripmodel.cpp Use helper function empty_string() instead of manual checks 2018-01-11 06:07:13 +01:00
divetripmodel.h Display units in dive list table based on prefs option 2017-10-09 11:49:29 +03:00
filtermodels.cpp cleanup: Argument cannot be negative 2017-12-28 17:30:25 +01:00
filtermodels.h Introduce negate-toggle buttons to filter lists 2017-12-26 13:08:49 -08:00
gpslistmodel.cpp Unused code: GpsListModel::addGpsFix() 2018-01-10 16:45:42 +01:00
gpslistmodel.h Unused code: GpsListModel::addGpsFix() 2018-01-10 16:45:42 +01:00
maplocationmodel.cpp cleanup: Uninitialized scalar field 2017-12-28 17:30:25 +01:00
maplocationmodel.h map-widget: allow real-time updates of edited markers 2017-11-09 12:40:25 -08:00
messagehandlermodel.cpp Android: write appLog to file 2017-07-09 17:40:29 -07:00
messagehandlermodel.h Make message handler write to console as well 2017-06-11 13:55:41 -07:00
models.cpp Move function to proper place 2018-01-10 11:04:24 +01:00
models.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
ssrfsortfilterproxymodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
ssrfsortfilterproxymodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
tankinfomodel.cpp Remove superfluous QScopedPointer<>s in singletons 2017-12-24 11:04:10 -08:00
tankinfomodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
treemodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
treemodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
weightmodel.cpp Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
weightmodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
weigthsysteminfomodel.cpp Remove superfluous QScopedPointer<>s in singletons 2017-12-24 11:04:10 -08:00
weigthsysteminfomodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00
yearlystatisticsmodel.cpp Creation of dive duration string and surface interval string 2017-05-26 15:50:52 -07:00
yearlystatisticsmodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00