mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 06:15:26 +00:00
Save Subsurface version to libdivecomputer logfile
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
parent
1bc5050eff
commit
2a29d4a4ba
2 changed files with 6 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <libxslt/transform.h>
|
||||
#include <QStringList>
|
||||
#include <QXmlStreamWriter>
|
||||
#include "core/version.h"
|
||||
|
||||
ConfigureDiveComputer::ConfigureDiveComputer() : readThread(0),
|
||||
writeThread(0),
|
||||
|
@ -630,6 +631,8 @@ QString ConfigureDiveComputer::dc_open(device_data_t *data)
|
|||
if (fp) {
|
||||
dc_context_set_loglevel(data->context, DC_LOGLEVEL_ALL);
|
||||
dc_context_set_logfunc(data->context, logfunc, fp);
|
||||
fprintf(data->libdc_logfile, "Subsurface: v%s, ", subsurface_git_version());
|
||||
fprintf(data->libdc_logfile, "built with libdivecomputer v%s\n", dc_version(NULL));
|
||||
}
|
||||
|
||||
#if defined(SSRF_CUSTOM_IO)
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include <libdivecomputer/version.h>
|
||||
#include "libdivecomputer.h"
|
||||
#include "core/version.h"
|
||||
|
||||
#if !defined(SSRF_LIBDC_VERSION) || SSRF_LIBDC_VERSION < 2
|
||||
#pragma message "Subsurface requires a reasonably current version of the Subsurface-branch"
|
||||
|
@ -1086,6 +1087,8 @@ const char *do_libdivecomputer_import(device_data_t *data)
|
|||
if (fp) {
|
||||
dc_context_set_loglevel(data->context, DC_LOGLEVEL_ALL);
|
||||
dc_context_set_logfunc(data->context, logfunc, fp);
|
||||
fprintf(data->libdc_logfile, "Subsurface: v%s, ", subsurface_git_version());
|
||||
fprintf(data->libdc_logfile, "built with libdivecomputer v%s\n", dc_version(NULL));
|
||||
}
|
||||
|
||||
err = translate("gettextFromC", "Unable to open %s %s (%s)");
|
||||
|
|
Loading…
Add table
Reference in a new issue