core: make logfile_name and dumpfile_name std::string

To avoid memory management woes. These shouldn't be global
variables, but let's fix that later.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-03-16 10:29:05 +01:00 committed by bstoeger
parent 64419f2b19
commit 3a1122048b
6 changed files with 23 additions and 27 deletions

View file

@ -574,8 +574,8 @@ QString ConfigureDiveComputer::dc_open(device_data_t *data)
FILE *fp = NULL;
dc_status_t rc;
if (data->libdc_log)
fp = subsurface_fopen(logfile_name, "w");
if (data->libdc_log && !logfile_name.empty())
fp = subsurface_fopen(logfile_name.c_str(), "w");
data->libdc_logfile = fp;