core: move data file version functions into version.cpp/h

It is unclear why these were located in divelist.cpp/h.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-25 14:33:36 +02:00 committed by bstoeger
parent 72bb38601d
commit 60c7b503cf
9 changed files with 44 additions and 34 deletions

View file

@ -15,21 +15,22 @@
#include "gettext.h"
#include "device.h"
#include "dive.h"
#include "divelog.h"
#include "divesite.h"
#include "event.h"
#include "errorhelper.h"
#include "sample.h"
#include "subsurface-string.h"
#include "event.h"
#include "format.h"
#include "trip.h"
#include "device.h"
#include "git-access.h"
#include "picture.h"
#include "qthelper.h"
#include "tag.h"
#include "sample.h"
#include "subsurface-string.h"
#include "subsurface-time.h"
#include "tag.h"
#include "trip.h"
#include "version.h"
// TODO: Should probably be moved to struct divelog to allow for multi-document
std::string saved_git_id;
@ -920,8 +921,8 @@ static void parse_settings_version(char *line, struct git_parser_state *)
{
int version = atoi(line);
report_datafile_version(version);
if (version > DATAFORMAT_VERSION)
report_error("Git save file version %d is newer than version %d I know about", version, DATAFORMAT_VERSION);
if (version > dataformat_version)
report_error("Git save file version %d is newer than version %d I know about", version, dataformat_version);
}
/* The argument string is the version string of subsurface that saved things, just FYI */