subsurface/qt-models
Berthold Stoeger 920ff15f71 Planner: don't return static data in fake_dc()
fake_dc() used to return a statically allocated dc with statically
allocated samples. This is of course a questionable practice in
the light of multi-threading / resource ownership. Once these
problems were recognized, the parameter "alloc" was added. If set
to true, the function would still return a statically allocated
dc, but heap-allocated samples, which could then be copied in
a different dc.

All in all an ownership nightmare and a recipie for disaster.
The returned static dc was only used as a pointer to the samples
anyway. There are four callers of fake_dc() and they all have access
to a dc-structure without samples. Therefore, change the semantics
of fake_dc() to fill out the passed in dc. If the caller does
not care about the samples, it can simply reset the sample number
to zero after work.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-07 13:11:53 +03: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 cmake: move maplocationmodel to generic models 2018-03-22 07:33:41 -07: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 Cleanup: consistently use qPrintable() 2018-03-14 13:55:36 +02: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 Cleanup: introduce copy_qstring() function 2018-03-14 13:55:36 +02:00
divelocationmodel.h mobile cleanup: restyle construction of locationlist 2018-01-31 14:48:14 +01:00
divepicturemodel.cpp Debug: sprinkle debug messages in thumbnailing code 2018-04-01 15:59:46 +03:00
divepicturemodel.h Implement different zoom levels for dive photos tab 2017-12-18 12:07:10 -08:00
diveplannermodel.cpp Planner: don't return static data in fake_dc() 2018-05-07 13:11:53 +03:00
diveplannermodel.h Move function to proper place 2018-01-10 11:04:24 +01:00
diveplotdatamodel.cpp Plot OC-pO2 graph for SCR dives 2018-04-28 20:11:22 +03:00
diveplotdatamodel.h Plot OC-pO2 graph for SCR dives 2018-04-28 20:11:22 +03:00
divetripmodel.cpp Change taglist_get_tagstring to support 'unlimited' tag list size 2018-04-09 07:59:51 -07:00
divetripmodel.h Add "Tags" column in Desktop app's dive list view 2018-04-04 14:10:45 +03:00
filtermodels.cpp Cleanup: consistently use qPrintable() 2018-03-14 13:55:36 +02: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 iOS: log messages 2018-04-13 17:07:43 -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 Cleanup: introduce copy_qstring() function 2018-03-14 13:55:36 +02: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 Use temperature_t for temperatures in struct stats_t 2018-02-24 11:45:17 -08:00
yearlystatisticsmodel.h Add SPDX header to Qt models 2017-04-29 13:32:55 -07:00